On 05/10/17 19:13, Nash, George wrote:
> As Mats already pointed out you cannot filter from the scons script.  Once 
> they are built you can run them individually.
yes,  You can run a specific test on specific configuration:

scons LOGGING=1 VERBOSE=1 TEST=1 RELEASE=false SECURED=1 
resource/csdk/stack/test/

>
> This sometimes means tracking down the location of the unit test they are 
> placed all over the output folder.
>
> Then you can use the --gtest_filter option to selectively turn on or off 
> tests.
>
> Example:
> $ export LD_LIBRARY_PATH=<the out folder on you system>
> $ cd out/linux/x86_64/debug/resource/csdk/stack/test # <-- as an example
> $ ./stacktest --gtest_filter=OCIpv6* # will only run the tests that start 
> with OCIpv6 
> $ ./stacktest 
> --gtest_filter=-*StackStartSuccessClient:*CreateResrouceWithClientStackMode # 
> run all but the two tests listed (':' is a separator) note the '-' minus sign 
> at the start. 
> $ ./stacktest --gtest_filter=*DISABLED* --gtest_also_run_disabled_tests # run 
> tests that have been disabled in the code.
>
> Google test give a lot of control over what you run and don't run using a lot 
> of command line options.  Run the test with `-h` option to see more options 
> google test options.

Thanks George, may this be added to wiki page:

https://wiki.iotivity.org/test

in case someone read it :-)

By the way let me remind we have some TODOs in master branch:

find . -iname "SConscript" -exec grep -H 'TODO' {} \; | grep -i test

./resource/unittests/SConscript:# TODO: IOT-2039: Fix errors in the
following Windows tests.
./resource/csdk/security/provisioning/unittest/SConscript:        #
TODO: remove this workaround needed for g++-4.7
./resource/csdk/security/unittest/SConscript:    # TODO: Implement
feature check.
./service/notification/cpp-wrapper/unittest/SConscript:# TODO: Fix this
test for more configs and remove this commented line
./service/notification/unittest/SConscript:            '',  # TODO: Fix
this test for MLK and enable previous line
./service/notification/unittest/SConscript:            '',  # TODO: Fix
this test for MLK and enable previous line
./service/easy-setup/mediator/richsdk/unittests/SConscript:           
'',  # TODO: fix this test and enable previous line
./service/easy-setup/enrollee/unittests/SConscript:            '',  #
TODO enable previous line when valigrind error resolved in resource layer
./service/resource-encapsulation/src/resourceBroker/unittest/SConscript:        
   
'',  # TODO: fix this test on linux and enable previous line
./service/resource-container/unittests/SConscript:# TODO: fix this test
and edit commented lines and target_os
./service/resource-container/unittests/SConscript:    if target_os in
['TODO/linux'




-- 
mailto:[email protected] gpg:0x467094BC
https://blogs.s-osg.org/author/pcoval/

_______________________________________________
iotivity-dev mailing list
[email protected]
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to