summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahoo-inc.com>2016-06-20 14:13:41 +0200
committerGeir Storli <geirst@yahoo-inc.com>2016-06-20 14:13:41 +0200
commitc9423c786b49ac7c75f0b3a7c1ada0ba5cec4878 (patch)
treef364b6e5de4e72a17086526a406e91b0c5ea851e /vespalib
parent77eb221fff4ab953b8288662bc140d56ad56275c (diff)
Fix unit test by allowing test functions to be executed in different order on CentOs.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/tests/testkit-subset/out.ref.2.txt20
-rwxr-xr-xvespalib/src/tests/testkit-subset/testkit-subset_test.sh1
2 files changed, 21 insertions, 0 deletions
diff --git a/vespalib/src/tests/testkit-subset/out.ref.2.txt b/vespalib/src/tests/testkit-subset/out.ref.2.txt
new file mode 100644
index 00000000000..b08880669f7
--- /dev/null
+++ b/vespalib/src/tests/testkit-subset/out.ref.2.txt
@@ -0,0 +1,20 @@
+testkit-subset_test.cpp: info: running test suite 'testkit-subset_test.cpp'
+testkit-subset_test.cpp: info: only running tests matching 'pass'
+testkit-subset_test.cpp: info: trace: thread '0(1)' (testkit-subset_test.cpp:5)
+testkit-subset_test.cpp: info: status_for_test 'will pass main': PASS
+testkit-subset_test.cpp: info: trace: thread '0(1)' (testkit-subset_extra.cpp:5)
+testkit-subset_test.cpp: info: status_for_test 'will pass extra': PASS
+testkit-subset_test.cpp: info: test summary --- 2 test(s) passed --- 0 test(s) failed
+testkit-subset_test.cpp: info: test summary --- 2 test(s) skipped
+testkit-subset_test.cpp: info: imported 2 passed check(s) from 1 thread(s)
+testkit-subset_test.cpp: info: summary --- 2 check(s) passed --- 0 check(s) failed
+testkit-subset_test.cpp: info: CONCLUSION: PASS
+testkit-subset_test.cpp: info: running test suite 'testkit-subset_test.cpp'
+testkit-subset_test.cpp: info: only running tests matching 'extra\.cpp:.*pass.*'
+testkit-subset_test.cpp: info: trace: thread '0(1)' (testkit-subset_extra.cpp:5)
+testkit-subset_test.cpp: info: status_for_test 'will pass extra': PASS
+testkit-subset_test.cpp: info: test summary --- 1 test(s) passed --- 0 test(s) failed
+testkit-subset_test.cpp: info: test summary --- 3 test(s) skipped
+testkit-subset_test.cpp: info: imported 1 passed check(s) from 1 thread(s)
+testkit-subset_test.cpp: info: summary --- 1 check(s) passed --- 0 check(s) failed
+testkit-subset_test.cpp: info: CONCLUSION: PASS
diff --git a/vespalib/src/tests/testkit-subset/testkit-subset_test.sh b/vespalib/src/tests/testkit-subset/testkit-subset_test.sh
index 6da1584a3f3..8d6556f30a8 100755
--- a/vespalib/src/tests/testkit-subset/testkit-subset_test.sh
+++ b/vespalib/src/tests/testkit-subset/testkit-subset_test.sh
@@ -3,4 +3,5 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
TEST_SUBSET=pass $VALGRIND ./vespalib_testkit-subset_test_app 2> out.txt
TEST_SUBSET="extra\.cpp:.*pass.*" $VALGRIND ./vespalib_testkit-subset_test_app 2>> out.txt
cat out.txt | grep "\.cpp: " | sed "s~$DIR~~g" > out.relpath.txt
+cmp -s out.relpath.txt out.ref.2.txt && exit 0
diff -u out.relpath.txt out.ref.txt