diff --git a/geos_ats_package/geos_ats/helpers/log_check.py b/geos_ats_package/geos_ats/helpers/log_check.py index ce324044..ade97573 100644 --- a/geos_ats_package/geos_ats/helpers/log_check.py +++ b/geos_ats_package/geos_ats/helpers/log_check.py @@ -49,9 +49,11 @@ def log_check( fname: str, yaml_file: str, ignored: Iterable[ str ] ) -> None: Nignore = 0 ignore_names = [] Nfail = 0 - status_fail = [ 'timedout', 'halted', 'lsferror', 'failed' ] + Nfailrun = 0 + status_fail = [ 'timedout', 'halted', 'lsferror', 'failed', 'invalid' ] overall_status = 'PASSED' fail_names = [] + failrun_names = [] print( '=======================' ) print( 'Integrated test results' ) @@ -69,12 +71,18 @@ def log_check( fname: str, yaml_file: str, ignored: Iterable[ str ] ) -> None: print( f'{status_code}: {Na} ({Nb} ignored)' ) else: print( f'{status_code}: {Na}' ) - Nfail += Na - fail_names.extend( tmp_a ) Nignore += Nb ignore_names.extend( tmp_b ) + if ( status_code == 'invalid' ): + Nfailrun += Na + failrun_names.extend( tmp_a ) + else: + Nfail += Na + fail_names.extend( tmp_a ) + else: print( f'{status_code}: {Na+Nb}' ) + else: print( f'{status_code}: 0' ) @@ -93,6 +101,14 @@ def log_check( fname: str, yaml_file: str, ignored: Iterable[ str ] ) -> None: for name in sorted( fail_names, key=lambda v: v.lower() ): print( name ) + if Nfailrun: + overall_status = 'FAIL RUN' + print( '=======================' ) + print( 'Run failures' ) + print( '=======================' ) + for name in sorted( failrun_names, key=lambda v: v.lower() ): + print( name ) + print( '=======================' ) print( f'Overall status: {overall_status}' ) print( '=======================' ) diff --git a/geos_ats_package/geos_ats/reporting.py b/geos_ats_package/geos_ats/reporting.py index 9222cb65..7353f518 100644 --- a/geos_ats_package/geos_ats/reporting.py +++ b/geos_ats_package/geos_ats/reporting.py @@ -12,13 +12,13 @@ from dataclasses import dataclass from ats import atsut from ats.times import hms -from ats import ( PASSED, FAILED, TIMEDOUT, EXPECTED, BATCHED, FILTERED, SKIPPED, CREATED, RUNNING, HALTED, LSFERROR ) +from ats import ( PASSED, FAILED, TIMEDOUT, EXPECTED, BATCHED, FILTERED, SKIPPED, CREATED, RUNNING, HALTED, LSFERROR, INVALID ) # Get the active logger instance logger = logging.getLogger( 'geos_ats' ) # Status value in priority order -STATUS = ( EXPECTED, CREATED, BATCHED, FILTERED, SKIPPED, RUNNING, PASSED, TIMEDOUT, HALTED, LSFERROR, FAILED ) +STATUS = ( EXPECTED, CREATED, BATCHED, FILTERED, SKIPPED, RUNNING, PASSED, TIMEDOUT, HALTED, LSFERROR, FAILED, INVALID ) COLORS: Mapping[ str, str ] = { EXPECTED.name: "black", @@ -32,6 +32,7 @@ HALTED.name: "brown", LSFERROR.name: "brown", FAILED.name: "red", + INVALID.name: "magenta", } @@ -101,8 +102,11 @@ def __init__( self, test_steps ): elapsed = t.endTime - t.startTime self.test_results[ test_name ].elapsed += elapsed - # Add the step - self.test_results[ test_name ].steps[ t.name ] = TestStepRecord( status=t.status, + # Add the step (Note: use the INVALID code to represent the FAILRUN state) + s = t.status + if ( 'geos' in t.name ) and ( s == FAILED ): + s = INVALID + self.test_results[ test_name ].steps[ t.name ] = TestStepRecord( status=s, log=t.outname, output=t.step_outputs, number=t.groupSerialNumber,