Skip to content

Adding failrun status to geos_ats #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
22 changes: 19 additions & 3 deletions geos_ats_package/geos_ats/helpers/log_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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' )
Expand All @@ -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' )

Expand All @@ -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( '=======================' )
Expand Down
12 changes: 8 additions & 4 deletions geos_ats_package/geos_ats/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -32,6 +32,7 @@
HALTED.name: "brown",
LSFERROR.name: "brown",
FAILED.name: "red",
INVALID.name: "magenta",
}


Expand Down Expand Up @@ -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,
Expand Down
Loading