diff --git a/munit/modules/munit_base/source/runner/base_test_runner.magik b/munit/modules/munit_base/source/runner/base_test_runner.magik index cc57f8b3..5cfa49e4 100644 --- a/munit/modules/munit_base/source/runner/base_test_runner.magik +++ b/munit/modules/munit_base/source/runner/base_test_runner.magik @@ -154,18 +154,25 @@ _method base_test_runner.run_in_new_stream( a_test, _gather suite_args ) ## external_text_output stream based on the properties set on ## the current test runner and A_TEST. ## + + was_successful? << _false - _if a_test.runnable?() - _then - a_stream << _self.new_stream( a_test ) - _protect - new_runner << _self.new( a_stream, _scatter .properties.for_scatter() ) - new_runner.int!run( a_test, _scatter suite_args ) - a_stream.flush() - _protection - a_stream.close() - _endprotect - _endif + _if a_test.runnable?().not + _then _return _true + _endif + + a_stream << _self.new_stream( a_test ) + _protect + new_runner << _self.new( a_stream, _scatter .properties.for_scatter() ) + new_runner.int!run( a_test, _scatter suite_args ) + was_successful? << (test_result << new_runner.test_result) _isnt _unset _andif + test_result.was_successful?() + a_stream.flush() + _protection + a_stream.close() + _endprotect + + >> was_successful? _endmethod $ diff --git a/munit/modules/munit_core_mods/munit_core_mods_420/source/smallworld_product.magik b/munit/modules/munit_core_mods/munit_core_mods_420/source/smallworld_product.magik index b4a0df61..606d979d 100644 --- a/munit/modules/munit_core_mods/munit_core_mods_420/source/smallworld_product.magik +++ b/munit/modules/munit_core_mods/munit_core_mods_420/source/smallworld_product.magik @@ -21,11 +21,18 @@ _method smallworld_product.run_test_cases( _optional properties ) ## :test_runner_args ( no default ) ## + failed_products << 0 + _for a_product _over smallworld_product.products.fast_elements() _loop - a_product.run_test_cases( properties ) + was_successful? << a_product.run_test_cases( properties ) + _if was_successful?.not + _then failed_products +<< 1 + _endif _endloop + >> failed_products = 0 + _endmethod $ diff --git a/munit/modules/munit_core_mods/munit_core_mods_420/source/sw_module.magik b/munit/modules/munit_core_mods/munit_core_mods_420/source/sw_module.magik index 2e4ae912..8bf50750 100644 --- a/munit/modules/munit_core_mods/munit_core_mods_420/source/sw_module.magik +++ b/munit/modules/munit_core_mods/munit_core_mods_420/source/sw_module.magik @@ -44,10 +44,19 @@ _method sw_module.run_test_cases( _optional properties ) run_method << run_properties[:test_runner_method].default( :|run_in_foreground()| ) run_args << run_properties[:test_runner_args].default( {} ) + failed_test_cases << 0 + _for a_test _over _self.test_cases() _loop - run_class.perform( run_method, a_test, _scatter run_args ) + was_successful? << run_class.perform( run_method, a_test, _scatter run_args ) + + _if was_successful? _isnt _unset _andif + was_successful?.not + _then failed_test_cases +<< 1 + _endif _endloop + + >> failed_test_cases = 0 _endmethod $ diff --git a/munit/modules/munit_core_mods/munit_core_mods_420/source/sw_product.magik b/munit/modules/munit_core_mods/munit_core_mods_420/source/sw_product.magik index 8e875bf2..bad5c01c 100644 --- a/munit/modules/munit_core_mods/munit_core_mods_420/source/sw_product.magik +++ b/munit/modules/munit_core_mods/munit_core_mods_420/source/sw_product.magik @@ -8,14 +8,21 @@ _method sw_product.run_test_cases( _optional properties ) ## Run the test cases in this product ## + failed_test_cases << 0 + _for module _over _self.defined_modules.fast_elements() _loop _if module.loaded? _andif module.test_module? _then - module.run_test_cases( properties ) + was_successful? << module.run_test_cases( properties ) + _if was_successful?.not + _then failed_test_cases +<< 1 + _endif _endif _endloop + + >> failed_test_cases = 0 _endmethod $