Skip to content

Commit

Permalink
update paths and .py inside rt.sh
Browse files Browse the repository at this point in the history
update rundir paths and run rt-status.py from within rt.sh
  • Loading branch information
FernandoAndrade-NOAA committed Sep 12, 2023
1 parent 3d5d1be commit 6794ef6
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -60,7 +60,6 @@ pipeline {
echo $(pwd)
cd ci/
./rt.sh -a ${ACCNR} -r `pwd`/rundir -t `pwd`/../
python ./rt-status.py
echo "rundir: ${rundir}" > rt.log.${machine}.temp
cat rt.log.${machine} | grep "test:" >> rt.log.${machine}.temp
cat rt.log.${machine} | grep "baseline" >> rt.log.${machine}.temp
@@ -86,7 +85,6 @@ pipeline {
cd ci/
./rt.sh -a ${ACCNR} -r `pwd`/rundir -t `pwd`/../
python ./rt-status.py
echo "rundir: ${rundir}" > rt.log.${machine}.temp
cat rt.log.${machine} | grep "test:" >> rt.log.${machine}.temp
cat rt.log.${machine} | grep "baseline" >> rt.log.${machine}.temp
cat rt.log.${machine}.temp > rt.log.${machine}
7 changes: 4 additions & 3 deletions ci/rt-status.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -26,7 +26,8 @@
# loop through every test case sub directory and files, then match with the test name
def check_for_diff(tests):
changed = False
rundir = os.environ['rundir']
rundir = os.getenv('rundir')
print('rundir = '+rundir)
for case_dir in os.listdir(rundir):
for file in os.listdir(rundir+'/{}'.format(case_dir)):
if file.endswith('.diff'):
@@ -37,7 +38,7 @@ def check_for_diff(tests):
if case_dir.endswith('pe_test'):
# the rap pe test currently has a false positive bug with WRFPRS
if 'rap' in case_dir and file == 'WRFPRS.GrbF16.diff':
with open('./rundir/{}/{}'.format(case_dir, file)) as f:
with open('{}/{}/{}'.format(rundir,case_dir, file)) as f:
data = f.readlines()
if len(data) == 1 and '708:195469472:CDCON:convective cloud layer:rpn_corr=-nan:rpn_rms=undefined' in data[0]:
continue
@@ -46,7 +47,7 @@ def check_for_diff(tests):
print('There are changes in results for case {} in {}'.format(diff_case, file.replace(".diff", "")))
changed = True
if changed:
print('Refer to .diff files in rundir: {}/rundir for details on differences in results for each case.'.format(rundir))
print('Refer to .diff files in rundir: {} for details on differences in results for each case.'.format(rundir))
sys.exit(1)
else:
print('No changes in test results detected.')
1 change: 1 addition & 0 deletions ci/rt.sh
Original file line number Diff line number Diff line change
@@ -243,3 +243,4 @@ for job_id in $jobid_list; do
fi
done

python ${test_v}/ci/rt-status.py

0 comments on commit 6794ef6

Please sign in to comment.