Fix run-test to tell the truth.
Previously it claimed to be "running" long before it ran anything, even in
cases where it wasn't _going_ to run anything.
Change-Id: I86c6d915ca75c20d9ae9027d2ae52e5deca2809c
diff --git a/test/run-test b/test/run-test
index 9095dd3..739b589 100755
--- a/test/run-test
+++ b/test/run-test
@@ -214,8 +214,6 @@
cp "${progdir}/etc/default-build" build
fi
-echo "${test_dir}: running..." 1>&2
-
if [ '!' -r "$run" ]; then
cp "${progdir}/etc/default-run" run
fi
@@ -231,14 +229,16 @@
build_exit="$?"
echo "build exit status: $build_exit" 1>&2
if [ "$build_exit" = '0' ]; then
- "./${run}" $run_args "$@" 2>&1
- echo "run exit status: $?" 1>&2
- good="yes"
+ echo "${test_dir}: running..." 1>&2
+ "./${run}" $run_args "$@" 2>&1
+ echo "run exit status: $?" 1>&2
+ good="yes"
fi
elif [ "$update_mode" = "yes" ]; then
"./${build}" >"$build_output" 2>&1
build_exit="$?"
if [ "$build_exit" = '0' ]; then
+ echo "${test_dir}: running..." 1>&2
"./${run}" $run_args "$@" >"$output" 2>&1
sed -e 's/[[:cntrl:]]$//g' < "$output" >"${td_expected}"
good="yes"
@@ -264,6 +264,7 @@
"./${build}" >"$build_output" 2>&1
build_exit="$?"
if [ "$build_exit" = '0' ]; then
+ echo "${test_dir}: running..." 1>&2
"./${run}" $run_args "$@" >"$output" 2>&1
else
cp "$build_output" "$output"