1414load ("@rules_cc//cc:defs.bzl" , "cc_test" )
1515load ("@score_baselibs//third_party/itf:py_unittest_qnx_test.bzl" , "py_unittest_qnx_test" )
1616
17- def cc_unit_test_suites_for_host_and_qnx (name , cc_unit_tests = None , visibility = None , test_suites_from_sub_packages = None , excluded_tests_filter = None ):
17+ def cc_unit_test_suites_for_host_and_qnx (name , cc_unit_tests = None , visibility = None , test_suites_from_sub_packages = None , excluded_tests_filter = None , cc_test_qnx = None ):
1818 """
1919 This Bazel macro allows to add unit tests on qnx and host with a single macro.
2020
@@ -31,6 +31,8 @@ def cc_unit_test_suites_for_host_and_qnx(name, cc_unit_tests = None, visibility
3131 FooTest.Test1 - do not run Test1 from test suite FooTest
3232 FooTest.* - do not run any test from test suite FooTest
3333 *FooTest.* - runs all non FooTest tests.
34+ cc_test_qnx: Optional macro to wrap each cc_test for QNX execution.
35+ The calling project provides its own cc_test_qnx implementation.
3436
3537 Returns:
3638 Test suites for host and QNX
@@ -54,6 +56,7 @@ def cc_unit_test_suites_for_host_and_qnx(name, cc_unit_tests = None, visibility
5456 testonly = True ,
5557 test_cases = cc_unit_tests ,
5658 excluded_tests_filter = excluded_tests_filter ,
59+ cc_test_qnx = cc_test_qnx ,
5760 )
5861
5962 _qnx_test_suites_from_sub_packages = [test_suite + "_qnx" for test_suite in test_suites_from_sub_packages ] if test_suites_from_sub_packages else []
0 commit comments