aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorhavardpe <havardpe@gmail.com>2016-06-20 16:44:04 +0200
committerGitHub <noreply@github.com>2016-06-20 16:44:04 +0200
commiteb60471a9ac7d2698a7e3fc7dbf5a291b6ea98b2 (patch)
tree895f71dab872563f82499a449ea399827d1462f7 /vespalib
parenta3057f2436aad98d7a07a6bd467c0cf7b3a3d924 (diff)
parentc9423c786b49ac7c75f0b3a7c1ada0ba5cec4878 (diff)
Merge pull request #106 from yahoo/geirst/fix-testkit-subset-unit-test
Fix unit test by allowing test functions to be executed in different …
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