Skip to content

Commit c9d846b

Browse files
committed
update CI unit tests to output verbose logs on failure
1 parent 62c8fd9 commit c9d846b

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

ci/unit_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ rm -rf .build/*
4040
mkdir -p .build/
4141
cd .build/
4242
cmake $cmake_args ..
43-
make all test coveralls
43+
make all test coveralls CTEST_OUTPUT_ON_FAILURE=TRUE
4444

4545
cmake_unit_tests=$?
4646

test/unit_tests/README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,36 @@ Generate build files:
1616
cmake ..
1717
```
1818

19+
Build and run the tests:
20+
21+
```bash
22+
device-os/test/unit_tests/build $ make all test
23+
```
24+
25+
Build and run just one set of tests (ncp_fw_update):
26+
27+
```bash
28+
device-os/test/unit_tests/build/ $ cd ncp_fw_update
29+
device-os/test/unit_tests/build/ncp_fw_update $ make all test
30+
```
31+
1932
Build and run the tests and coverage:
2033

2134
```bash
22-
make all test coverage
35+
device-os/test/unit_tests/build $ make all test coverage
36+
```
37+
38+
Build and run the tests and coverage, and output verbose errors on failure:
39+
40+
```bash
41+
device-os/test/unit_tests/build $ make all test coverage CTEST_OUTPUT_ON_FAILURE=TRUE
2342
```
2443

2544
Enable verbose output for monitoring all of those printf() statements while debugging tests
2645
(note: please don't forget to disable these printf's when finished debugging)
2746

28-
```
29-
make all test coverage ARGS=--verbose
47+
```bash
48+
device-os/test/unit_tests/build $ make all test coverage ARGS=--verbose
3049
```
3150

3251

0 commit comments

Comments
 (0)