Skip to content
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

Update integrated test baseline storage #14

Merged
merged 46 commits into from
May 7, 2024
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
ff14ade
Adding python scripts to manage baseline io
cssherman Mar 15, 2024
d8b0e14
Wiring in new baseline management tools
cssherman Mar 15, 2024
f3d2860
Fixing typo in geos_ats parser
cssherman Mar 15, 2024
93fcf9c
Fixing package import bug
cssherman Mar 15, 2024
dccdc28
Updating geos_ats input args, various baseline method updates
cssherman Mar 18, 2024
6e4ce12
Updating geos ats command line parsing
cssherman Mar 21, 2024
bb68813
Adding yaml path to ats environment setup
cssherman Mar 29, 2024
d9b4c11
Splitting baseline archive packing, upload
cssherman Mar 29, 2024
97f063e
Fixing bug in baseline packing
cssherman Apr 2, 2024
80ae85c
Adding https baseline fetch option
cssherman Apr 2, 2024
0bacdce
Adding options to work with baseline cache files
cssherman Apr 2, 2024
7325ae0
Fixing baseline archive names
cssherman Apr 2, 2024
0b0591c
Fixing baseline archive structure, copying log files
cssherman Apr 2, 2024
a7facad
Fixing blob download name
cssherman Apr 2, 2024
8a17acc
Handling empty directories for baseline management
cssherman Apr 10, 2024
18aa1d9
Allowing integrated tests to run without baselines
cssherman Apr 10, 2024
02ee8ab
Adding baseline management error check
cssherman Apr 10, 2024
89ff130
Adding additional logging to baseline management code
cssherman Apr 10, 2024
6e9ae4e
Adding additional logging to baseline management code
cssherman Apr 10, 2024
6c1a49d
Fixing log copying bug
cssherman Apr 11, 2024
b35d7f8
Removing test messages from geos_ats
cssherman Apr 11, 2024
49af05e
Adding simple log check script
cssherman Apr 11, 2024
fead5c9
Updating log checker for geos ats
cssherman Apr 11, 2024
2ceda4f
Fixing log checker script
cssherman Apr 11, 2024
683f82b
Fixing log check script
cssherman Apr 12, 2024
b7da058
Attempting to use an anonymous gcp client for baseline fetch
cssherman Apr 12, 2024
070fc12
Fixing log check, allowing baselines to be packed to various folders
cssherman Apr 12, 2024
cbed575
Fixing geos ats blob name
cssherman Apr 12, 2024
37bcbfb
Adding whitelist for geos ats log check script
cssherman Apr 15, 2024
f752546
Adding yaml input option to geos_ats log checker
cssherman Apr 15, 2024
a4b40a7
Using relative file paths for geos_ats html logs
cssherman Apr 15, 2024
63d9624
Updating ats html table format
cssherman Apr 16, 2024
f154225
Updating html report style
cssherman Apr 17, 2024
107bebc
Removing auto page refresh from geos ats report
cssherman Apr 17, 2024
3e74652
Updating html report style
cssherman Apr 19, 2024
0f0e48e
Updating html report style
cssherman Apr 19, 2024
8669589
Adding additional assets to html report
cssherman Apr 19, 2024
64a5f4c
Fixing report label
cssherman Apr 20, 2024
a33c9d5
Fixing lightbox settings
cssherman Apr 20, 2024
a2d4194
Grouping lightbox captions
cssherman Apr 20, 2024
ab0bc6b
Adding baseline history file
cssherman Apr 22, 2024
97f7d41
Fixing the baseline log path
cssherman Apr 22, 2024
8d7c3dc
Separating logs from archives by default
cssherman Apr 29, 2024
cad1f59
Fixing parsing of geos ats options
cssherman Apr 30, 2024
218af63
Skipping baseline management for some test actions
cssherman Apr 30, 2024
b82a757
Adding an additional prerequisite to geos_ats
cssherman May 1, 2024
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
Prev Previous commit
Next Next commit
Adding yaml input option to geos_ats log checker
  • Loading branch information
cssherman committed Apr 15, 2024
commit f7525462afb7106f37b54b40cdc4435a81012e0e
36 changes: 34 additions & 2 deletions geos_ats_package/geos_ats/helpers/log_check.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,51 @@
from configparser import ConfigParser
import argparse
import os
import yaml
import socket
from typing import Iterable


def log_check( fname: str, ignored: Iterable[ str ] ) -> None:
def check_yaml( yaml_file: str ) -> Iterable[ str ]:
"""
Check the integrated test yaml file for tests to ignore

Args:
yaml_file (str): Integrated test yaml file

Returns:
list: List of tests to ignore
"""
hostname = socket.gethostname()
ignored_tests = []
with open( yaml_file ) as f:
test_options = yaml.safe_load( f )
allow_fail = test_options.get( 'allow_fail', {} )
for k, v in allow_fail.items():
if ( k in hostname ) or ( k == 'all' ):
if v:
ignored_tests.extend( [ x.strip() for x in v.split( ',' ) ] )

return ignored_tests


def log_check( fname: str, yaml_file: str, ignored: Iterable[ str ] ) -> None:
"""
Check logs produced by geos_ats

Args:
fname (str): Path to geos_ats log
yaml_file (str): Integrated test yaml file
ignored (list): List of test name failures to ignore
"""
log = ConfigParser()
log.read( os.path.expanduser( fname ) )

if yaml_file:
yaml_file = os.path.expanduser( yaml_file )
if os.path.isfile( yaml_file ):
ignored.extend( check_yaml( yaml_file ) )

Nignore = 0
ignore_names = []
Nfail = 0
Expand Down Expand Up @@ -70,14 +101,15 @@ def log_check( fname: str, ignored: Iterable[ str ] ) -> None:
def main():
parser = argparse.ArgumentParser( description="GEOS ATS Test Log Check" )
parser.add_argument( "log_file", type=str, help="Path to the log file" )
parser.add_argument( "-y", "--yaml-file", type=str, help="Integrated test yaml file", default='' )
parser.add_argument( "-i",
"--ignore-fail",
nargs='+',
default=[],
action="extend",
help='Ignore specific tests when evaluating success' )
args = parser.parse_args()
log_check( args.log_file, args.ignore_check )
log_check( args.log_file, args.yaml_file, args.ignore_fail )


if __name__ == '__main__':
Expand Down
Loading