Skip to content

Commit

Permalink
update CI unit tests to output verbose logs on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
technobly committed Jan 27, 2022
1 parent 9b69a14 commit 0b08e22
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ci/unit_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ rm -rf .build/*
mkdir -p .build/
cd .build/
cmake $cmake_args ..
make all test coveralls
make all test coveralls CTEST_OUTPUT_ON_FAILURE=TRUE

cmake_unit_tests=$?

Expand Down
25 changes: 22 additions & 3 deletions test/unit_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,36 @@ Generate build files:
cmake ..
```

Build and run the tests:

```bash
device-os/test/unit_tests/build $ make all test
```

Build and run just one set of tests (ncp_fw_update):

```bash
device-os/test/unit_tests/build/ $ cd ncp_fw_update
device-os/test/unit_tests/build/ncp_fw_update $ make all test
```

Build and run the tests and coverage:

```bash
make all test coverage
device-os/test/unit_tests/build $ make all test coverage
```

Build and run the tests and coverage, and output verbose errors on failure:

```bash
device-os/test/unit_tests/build $ make all test coverage CTEST_OUTPUT_ON_FAILURE=TRUE
```

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

```
make all test coverage ARGS=--verbose
```bash
device-os/test/unit_tests/build $ make all test coverage ARGS=--verbose
```


Expand Down

0 comments on commit 0b08e22

Please sign in to comment.