#! /bin/bash export TEST_PHASE="perform" export tmp_dir="`echo ${gl_abs_srcdir}| sed -e 's,/scripts,,'`/tmp" echo "Cleaning up tmp dir ($tmp_dir)" test "$tmp_dir/*" != "/*" && rm -rf "$tmp_dir"/* echo "Perform called ($test_file)" export bin_dir="${test_path}/bin" export data_dir="${test_path}/data" export input_dir="${test_path}/input/`echo $test_file|sed -e s@.*/@@`" export output_dir="${test_path}/output/`echo $test_file|sed -e s@.*/@@`" if test "x$build_library_tree" \!= "x"; then output_dir="$output_dir/`echo $build_library_tree|sed 's,.*/,,'`"; test -d "$output_dir" || mkdir "$output_dir" fi if test "x$build_src_tree" \!= "x"; then output_dir="$output_dir/`echo $build_src_tree|sed 's,.*/,,'`"; test -d "$output_dir" || mkdir "$output_dir" fi export build_library_tree export build_src_tree export link_output $test_file $input_dir $output_dir $@ status="$?" # Keep temporary files if something goes # wrong if test "x$status" = "x0"; then echo "Cleaning up tmp dir ($tmp_dir)" test "$tmp_dir/*" != "/*" && rm -rf "$tmp_dir"/* fi