diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2021-01-17 20:27:29 +0100 |
---|---|---|
committer | neels <nhofmeyr@sysmocom.de> | 2021-01-19 10:50:41 +0000 |
commit | 18940b7c709c64edb2d49cfa7e4c9b47896e47cd (patch) | |
tree | 34813d386f50b2769c8d92b5b60c5bf25efda049 | |
parent | e42208c6ea9d2db67d26f85a1d906ab103ed57b5 (diff) |
handover_tests.sh: update stdout/stderr only on capital -U arg
On -u, update the handover_tests.ok file that lists all tests that are
expected to run. This is necessary for the regression tests to succeed.
Update all the numerous test_*.ho_vty.{err,ok} files only when the
update arg is a captial -U, because those are usually not interesting,
except for manual comparison of test runs.
Change-Id: Id280a8d084fd84b0b7486a5c8022e5b7a26f6095
-rwxr-xr-x | tests/handover/handover_tests.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/handover/handover_tests.sh b/tests/handover/handover_tests.sh index 240b78920..4be0c1018 100755 --- a/tests/handover/handover_tests.sh +++ b/tests/handover/handover_tests.sh @@ -6,7 +6,7 @@ update="$3" test -d "$tests_dir" test -d "$build_dir" -if [ -n "$update" -a "x$update" != "x-u" ]; then +if [ -n "$update" -a "x$update" != "x-u" -a "x$update" != "x-U" ]; then echo "unknown argument: $update" exit 1 fi @@ -21,7 +21,7 @@ one_test() { rc=$? expect_out="$test_path.ok" expect_err="$test_path.err" - if [ "x$rc" = "x0" -a "x$update" = "x-u" ]; then + if [ "x$rc" = "x0" -a "x$update" = "x-U" ]; then cp "$got_out" "$expect_out" cp "$got_err" "$expect_err" else @@ -50,7 +50,7 @@ done set +e cat "$results" failed="$(grep FAIL "$results")" -if [ -z "$failed" -a "x$update" = "x-u" ]; then +if [ -z "$failed" -a "x$update" != "x" ]; then cp "$results" "$tests_dir"/handover_tests.ok fi rm "$results" |