optimization-test loops over directories that contain a file named create_test_cases.py. For each occurrence, it enters the directory that contains the file and executes it, and is then supposed to return to the previous directory.
The name .. was hardcoded in the script, and should be ../.. instead. Hardcoding that is finicky too, so wrap the directory change and script execution in a subshell instead. In case of errors executing create_test_cases.py, exit with status 1 to make the test run communicate failure properly. Signed-off-by: Petri Latvala <petri.latv...@intel.com> --- src/glsl/tests/optimization-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/tests/optimization-test b/src/glsl/tests/optimization-test index 26a51be..12ecc5e 100755 --- a/src/glsl/tests/optimization-test +++ b/src/glsl/tests/optimization-test @@ -12,7 +12,7 @@ pass=0 echo "====== Generating tests ======" for dir in tests/*/; do if [ -e "${dir}create_test_cases.py" ]; then - cd $dir; $PYTHON2 create_test_cases.py; cd .. + (cd $dir; $PYTHON2 create_test_cases.py) || exit 1 fi echo "$dir" done -- 2.0.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev