From e7cd5691ac6192d8ae2764be6c57894ec39b22c9 Mon Sep 17 00:00:00 2001 From: Simon Rose <simon.rose@ess.eu> Date: Fri, 18 Jun 2021 10:04:58 +0200 Subject: [PATCH] Debugging weird error: it works on my machine... --- tests/test_versions/Makefile | 2 +- tests/test_versions/debug.txt | 9 +++++++++ tests/test_versions/test.sh | 8 ++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 tests/test_versions/debug.txt diff --git a/tests/test_versions/Makefile b/tests/test_versions/Makefile index 8bebd1c7..d757fcc6 100644 --- a/tests/test_versions/Makefile +++ b/tests/test_versions/Makefile @@ -4,7 +4,7 @@ default: test .PHONY: test test: check_env clean - @./test.sh test.txt + @./test.sh debug.txt .PHONY: check_env check_env: guard-EPICS_BASE guard-E3_REQUIRE_VERSION diff --git a/tests/test_versions/debug.txt b/tests/test_versions/debug.txt new file mode 100644 index 00000000..3edef119 --- /dev/null +++ b/tests/test_versions/debug.txt @@ -0,0 +1,9 @@ +# Basic set of tests. +# +# Note that the first entry is the requested test version (- means none requested) +# The second entry is what is expected to be loaded (- means it is expected to fail) +# The third and other entries are the versions to install. + + +# Only load exactly the given build number if specified. +0.0.1+0 - 0.0.1+1 diff --git a/tests/test_versions/test.sh b/tests/test_versions/test.sh index 8543dafb..7f4980a1 100755 --- a/tests/test_versions/test.sh +++ b/tests/test_versions/test.sh @@ -84,14 +84,18 @@ function test_require { search_string="^Loaded $MODULENAME version $expected\$" fi + echo "SEARCH STRING: $search_string" + # The funny sed command here is from https://unix.stackexchange.com/a/235016/445931 # The reason this is needed is because the "Starting iocInit" message seems to be threaded # differently than the regular flow of output and sometimes will separate the strings that # we are looking for. If we simply cut it out then we seem to be able to more consistently # get meaningful tests. + #echo exit | eval iocsh.bash "$iocsh_args" | + # sed -e '1 h; 2,$ H; $! d; g' -e 's/Starting iocInit\niocRun: All initialization complete\n//' | + # $__SEARCH_COMMAND__ "${search_string}" echo exit | eval iocsh.bash "$iocsh_args" | - sed -e '1 h; 2,$ H; $! d; g' -e 's/Starting iocInit\niocRun: All initialization complete\n//' | - $__SEARCH_COMMAND__ "${search_string}" + sed -e '1 h; 2,$ H; $! d; g' -e 's/Starting iocInit\niocRun: All initialization complete\n//' } function format_output { -- GitLab