summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2024-03-05 15:04:32 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2024-03-05 15:04:32 +0000
commit2f532358af3454da42efd13d980dd874bff86d03 (patch)
tree805c77f6d47d682aa0c0d08623a9011b5789b2de /vespalib
parent5cb7ce8c755244a81722a1dde95d2463d51eafe5 (diff)
avoid printing file name and line number inside parenthesis
... for better error parsing
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/tests/testapp-state/expect.txt44
-rw-r--r--vespalib/src/tests/testkit-subset/out.ref.2.txt6
-rw-r--r--vespalib/src/tests/testkit-subset/out.ref.txt6
-rw-r--r--vespalib/src/vespa/vespalib/testkit/test_master.cpp10
4 files changed, 33 insertions, 33 deletions
diff --git a/vespalib/src/tests/testapp-state/expect.txt b/vespalib/src/tests/testapp-state/expect.txt
index 0cd267e8245..936ab27edf8 100644
--- a/vespalib/src/tests/testapp-state/expect.txt
+++ b/vespalib/src/tests/testapp-state/expect.txt
@@ -1,22 +1,22 @@
- STATE[0]: 'foo' (statetest.cpp:25)
- STATE[1]: 'bar' (statetest.cpp:28)
- STATE[0]: 'foo' (statetest.cpp:25)
- STATE[2]: 'baz' (statetest.cpp:31)
- STATE[1]: 'bar' (statetest.cpp:28)
- STATE[0]: 'foo' (statetest.cpp:25)
- STATE[1]: 'bar' (statetest.cpp:28)
- STATE[0]: 'foo' (statetest.cpp:25)
- STATE[0]: 'foo' (statetest.cpp:25)
- STATE[0]: 'testSomething()' (statetest.cpp:41)
- STATE[1]: 'testInner()' (statetest.cpp:12)
- STATE[0]: 'testSomething()' (statetest.cpp:41)
- STATE[0]: 'testSomething()' (statetest.cpp:41)
- STATE[0]: 'something else' (statetest.cpp:44)
- STATE[1]: 'testSomethingElse()' (statetest.cpp:46)
- STATE[0]: 'something else' (statetest.cpp:44)
- STATE[2]: 'testInner()' (statetest.cpp:18)
- STATE[1]: 'testSomethingElse()' (statetest.cpp:46)
- STATE[0]: 'something else' (statetest.cpp:44)
- STATE[1]: 'testSomethingElse()' (statetest.cpp:46)
- STATE[0]: 'something else' (statetest.cpp:44)
- STATE[0]: 'something else' (statetest.cpp:44)
+ STATE[0]: 'foo' statetest.cpp:25
+ STATE[1]: 'bar' statetest.cpp:28
+ STATE[0]: 'foo' statetest.cpp:25
+ STATE[2]: 'baz' statetest.cpp:31
+ STATE[1]: 'bar' statetest.cpp:28
+ STATE[0]: 'foo' statetest.cpp:25
+ STATE[1]: 'bar' statetest.cpp:28
+ STATE[0]: 'foo' statetest.cpp:25
+ STATE[0]: 'foo' statetest.cpp:25
+ STATE[0]: 'testSomething()' statetest.cpp:41
+ STATE[1]: 'testInner()' statetest.cpp:12
+ STATE[0]: 'testSomething()' statetest.cpp:41
+ STATE[0]: 'testSomething()' statetest.cpp:41
+ STATE[0]: 'something else' statetest.cpp:44
+ STATE[1]: 'testSomethingElse()' statetest.cpp:46
+ STATE[0]: 'something else' statetest.cpp:44
+ STATE[2]: 'testInner()' statetest.cpp:18
+ STATE[1]: 'testSomethingElse()' statetest.cpp:46
+ STATE[0]: 'something else' statetest.cpp:44
+ STATE[1]: 'testSomethingElse()' statetest.cpp:46
+ STATE[0]: 'something else' statetest.cpp:44
+ STATE[0]: 'something else' statetest.cpp:44
diff --git a/vespalib/src/tests/testkit-subset/out.ref.2.txt b/vespalib/src/tests/testkit-subset/out.ref.2.txt
index b08880669f7..44187a4b36c 100644
--- a/vespalib/src/tests/testkit-subset/out.ref.2.txt
+++ b/vespalib/src/tests/testkit-subset/out.ref.2.txt
@@ -1,8 +1,8 @@
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: 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: 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
@@ -11,7 +11,7 @@ testkit-subset_test.cpp: info: summary --- 2 check(s) passed --- 0 check(s) fai
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: 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
diff --git a/vespalib/src/tests/testkit-subset/out.ref.txt b/vespalib/src/tests/testkit-subset/out.ref.txt
index 18dd7ea756d..7f3aa10730b 100644
--- a/vespalib/src/tests/testkit-subset/out.ref.txt
+++ b/vespalib/src/tests/testkit-subset/out.ref.txt
@@ -1,8 +1,8 @@
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_extra.cpp:5)
+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: trace: thread '0(1)' (testkit-subset_test.cpp:5)
+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: test summary --- 2 test(s) passed --- 0 test(s) failed
testkit-subset_test.cpp: info: test summary --- 2 test(s) skipped
@@ -11,7 +11,7 @@ testkit-subset_test.cpp: info: summary --- 2 check(s) passed --- 0 check(s) fai
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: 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
diff --git a/vespalib/src/vespa/vespalib/testkit/test_master.cpp b/vespalib/src/vespa/vespalib/testkit/test_master.cpp
index 264d4f527a5..20fa5a7e860 100644
--- a/vespalib/src/vespa/vespalib/testkit/test_master.cpp
+++ b/vespalib/src/vespa/vespalib/testkit/test_master.cpp
@@ -76,7 +76,7 @@ TestMaster::checkFailed(const lock_guard &guard,
if (!thread.traceStack.empty()) {
for (size_t i = thread.traceStack.size(); i-- > 0; ) {
const TraceItem &item = thread.traceStack[i];
- fprintf(stderr, " STATE[%zu]: '%s' (%s:%d)\n",
+ fprintf(stderr, " STATE[%zu]: '%s' %s:%d\n",
i, item.msg.c_str(), item.file.c_str(), item.line);
}
}
@@ -95,12 +95,12 @@ TestMaster::printDiff(const lock_guard &guard,
lhs.c_str(), rhs.c_str());
} else {
fprintf(_state.lhsFile,
- "[check failure #%zu] '%s' in thread '%s' (%s:%d)\n"
+ "[check failure #%zu] '%s' in thread '%s' %s:%d\n"
"%s\n",
_state.failCnt, text.c_str(), thread.name.c_str(),
file.c_str(), line, lhs.c_str());
fprintf(_state.rhsFile,
- "[check failure #%zu] '%s' in thread '%s' (%s:%d)\n"
+ "[check failure #%zu] '%s' in thread '%s' %s:%d\n"
"%s\n",
_state.failCnt, text.c_str(), thread.name.c_str(),
file.c_str(), line, rhs.c_str());
@@ -328,7 +328,7 @@ TestMaster::flush(const char *file, uint32_t line)
if (thread.passCnt > 0) {
lock_guard guard(_lock);
_state.passCnt += thread.passCnt;
- fprintf(stderr, "%s: info: flushed %zu passed check(s) from thread '%s' (%s:%d)\n",
+ fprintf(stderr, "%s: info: flushed %zu passed check(s) from thread '%s' %s:%d\n",
_name.c_str(), thread.passCnt, thread.name.c_str(), skip_path(file), line);
thread.passCnt = 0;
}
@@ -338,7 +338,7 @@ void
TestMaster::trace(const char *file, uint32_t line)
{
ThreadState &thread = threadState();
- fprintf(stderr, "%s: info: trace: thread '%s' (%s:%d)\n",
+ fprintf(stderr, "%s: info: trace: thread '%s' %s:%d\n",
_name.c_str(), thread.name.c_str(), skip_path(file), line);
}