Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions munit/modules/munit_base/source/runner/base_test_runner.magik
Original file line number Diff line number Diff line change
Expand Up @@ -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
$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
$

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
$