diff --git a/tests/scripts/run_upstream_python_binding.sh b/tests/scripts/run_upstream_python_binding.sh new file mode 100644 index 0000000..cd3a7e7 --- /dev/null +++ b/tests/scripts/run_upstream_python_binding.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +export TOP_SRCDIR="../source" +PB_DIR="bindings/python" + +die () { + echo "$1" >&2 + exit 1 +} + +# rename lasso.py to be sure that we test the installed one +find $TOP_SRCDIR/$PB_DIR -maxdepth 1 -name "*.py" -exec mv {} {}.backup \; + +# run the tests +TESTS="tests/binding_tests.py tests/profiles_tests.py" + +for t in $TESTS; do + echo -n "Test $t ... " + python3 "${TOP_SRCDIR}/${PB_DIR}/${t}" >"${TOP_SRCDIR}/${PB_DIR}/${t}.log" 2>&1 + RET=$? + if [ $RET = 0 ]; then + echo "ok" + else + echo "failed" + cat "${TOP_SRCDIR}/${PB_DIR}/${t}.log" + die "Test ${t} failed" + fi +done + +exit 0 diff --git a/tests/tests.yml b/tests/tests.yml index 8763ff5..d80623a 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,5 +1,9 @@ - hosts: localhost roles: + - role: standard-test-source + tags: + - always + - role: standard-test-basic tags: - classic @@ -7,6 +11,10 @@ - mod_auth_mellon: dir: scripts run: ./run_tests.sh + - python_binding_tests: + dir: scripts + run: ./run_upstream_python_binding.sh + save-files: ["../source/bindings/python/tests/*.log"] required_packages: - git - + - python3-lasso