Hi,
IMHO, we should at least include the number of tests that PASSED &
FAILED as well. Since it is super easy to forget adding TEST_CASE into
the TEST_SUITE body. At least I did, very often thinking it is already
tested.
On 04/10/2016 02:32, Sterling Hughes wrote:
Hey,
The thinking was that the user doesn't want to be bothered with a bunch
of text when there are no failures. That said, I agree that more
verbose output in the success case would be useful in some cases. You
can get something kind of like your example if you provide the -ldebug
command line option when you run the test, e.g.,
newt -ldebug test net/nimble/host
Executing test:
/home/ccollins/repos/mynewt/core/bin/targets/unittest/net_nimble_host_test/test/net/nimble/host/test/net_nimble_host_test
2016/10/03 08:00:49 [DEBUG]
/home/ccollins/repos/mynewt/core/bin/targets/unittest/net_nimble_host_test/test/net/nimble/host/test/net_nimble_host_test
2016/10/03 08:00:50 [DEBUG] o=[pass]
ble_att_clt_suite/ble_att_clt_test_tx_find_info
[pass] ble_att_clt_suite/ble_att_clt_test_rx_find_info
[pass] ble_att_clt_suite/ble_att_clt_test_tx_read
[...]
[pass]
ble_sm_sc_test_suite/ble_sm_sc_peer_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3
[pass]
ble_sm_sc_test_suite/ble_sm_sc_peer_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3
[pass]
ble_sm_sc_test_suite/ble_sm_sc_us_jw_iio3_rio3_b1_iat2_rat2_ik3_rk3
[pass]
ble_sm_sc_test_suite/ble_sm_sc_us_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3
[pass]
ble_sm_sc_test_suite/ble_sm_sc_us_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3
[pass] ble_uuid_test_suite/ble_uuid_test_128_to_16
Passed tests: [net/nimble/host/test]
All tests passed
The output is a bit rough, and -ldebug produces a lot of extra output
that is not relevant, so there is some work to do here. As an aside, I
think newt is not very consistent with its "-v" and "-ldebug" options.
As I understand it, "-v" is supposed to produce extra output about the
user's project; "-ldebug" is meant for debugging the newt tool itself,
and is supposed to generate output relating to newt's internals.
yes, we should clean that up prior to 1.0-rel.
for me, i’d prefer to have the default output show [pass] or [fail]
but not show “compiling…” when doing unit tests. i’m much more
accustomed to the pass/fail messages than a whole bunch of compiler
output. i’d then like -v to show me the compiling, and -vv show me
the commands.
sterling