Skip to content

Commit 0245cec

Browse files
authored
Merge pull request #1278 from mnordsletten/dev
unit_tests: added --pass to misc unit test run, to see passed tests
2 parents 0d629b6 + 3f50ae9 commit 0245cec

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

test/misc/run_unit_tests/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
INCLUDEOS_SRC=${INCLUDEOS_SRC-$HOME/IncludeOS}
44
pushd $INCLUDEOS_SRC/build/unittests
5-
./unittests
5+
./unittests --pass
66
popd

test/testrunner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import time
99
import multiprocessing # To figure out number of cpus
1010
import junit_xml as jx
11+
import codecs
1112

1213
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 1) # line buffering
1314
sys.path.insert(0, ".")
@@ -162,10 +163,10 @@ def wait_status(self):
162163
# Start and wait for the process
163164
self.proc_.communicate()
164165

165-
with open('{}/log_stdout.log'.format(self.path_), 'r') as log_stdout:
166+
with codecs.open('{}/log_stdout.log'.format(self.path_), encoding='utf-8', errors='replace') as log_stdout:
166167
self.output_.append(log_stdout.read())
167168

168-
with open('{}/log_stderr.log'.format(self.path_), 'r') as log_stderr:
169+
with codecs.open('{}/log_stderr.log'.format(self.path_), encoding='utf-8', errors='replace') as log_stderr:
169170
self.output_.append(log_stderr.read())
170171

171172

test/util/unit/chunk_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ CASE("Constructing a chunk with a shared buffer and size")
3737
Chunk c{buf, N};
3838

3939
EXPECT(c.size() == N);
40-
EXPECT(c);
40+
EXPECT(static_cast<bool>(c));
4141

4242
EXPECT(c.data() == buf.get());
4343
}

0 commit comments

Comments
 (0)