Skip to content

Commit ee716de

Browse files
authored
Merge pull request #251 from mwestphall/SOFTWARE-6039-arm-vmu-test
SOFTWARE-6039: ARM VMU Tests
2 parents b7ad0d4 + 9141bb4 commit ee716de

File tree

10 files changed

+52
-35
lines changed

10 files changed

+52
-35
lines changed

bin/analyze-test-run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ for run in runs:
109109
total_jobs += 1
110110
if status == 1:
111111
jobs_died += 1
112-
tally_run_results(results_by_os, vmu.canonical_os_string(run['os_release']), status)
112+
tally_run_results(results_by_os, vmu.canonical_os_string(run['os_release'] + run['platform']), status)
113113
tally_run_results(results_by_pkg, PACKAGE_MAPPING[run['param_packages']], status)
114114
tally_run_results(results_by_src, vmu.canonical_src_string(run['param_sources']), status)
115115

bin/analyze_job_output.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@ def re_extract(regexp, data, flags=0, default=None, group=None):
4646
def extract_inet_address(run_job_log):
4747
eth0_block = re_extract(r'^\d:\s*eth0:(.*?)(?:^\d)', run_job_log, re.MULTILINE | re.DOTALL, group=1)
4848
ens3_block = re_extract(r'^\d:\s*ens3:(.*?)(?:^\d)', run_job_log, re.MULTILINE | re.DOTALL, group=1)
49+
enp1s0_block = re_extract(r'^\d:\s*enp1s0:(.*?)(?:^\d)', run_job_log, re.MULTILINE | re.DOTALL, group=1)
4950
if eth0_block:
5051
return re_extract(r'^\s+inet\s+(.*?)\/', eth0_block, re.MULTILINE, group=1)
5152
elif ens3_block:
5253
return re_extract(r'^\s+inet\s+(.*?)\/', ens3_block, re.MULTILINE, group=1)
54+
elif enp1s0_block:
55+
return re_extract(r'^\s+inet\s+(.*?)\/', enp1s0_block, re.MULTILINE, group=1)
5356
else:
5457
return None
5558

@@ -225,6 +228,12 @@ def parse_log(osg_test_log, test_exceptions, components):
225228
os_string = re.sub(r'release\s+', '', os_long_string)
226229
os_string = re.sub(r'\s*\(.*\)$', '', os_string)
227230
data['os_release'] = os_string
231+
232+
# Get the arch of the host
233+
# This can currently be found by RPM names in the logs, but we might want
234+
# to make it a first class log message
235+
platform = re_extract(r'el[0-9]\.(aarch64|x86_64).rpm', run_job_log, group=1)
236+
data['platform'] = platform
228237

229238
# Look for whole-run failures
230239
inet_address = extract_inet_address(run_job_log)

bin/run-job

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ if [[ -n `ip addr | grep eth0` ]]; then
8888
ip_address=`ip addr show eth0 | awk 'match($0, /inet ([0-9.]+)/, a) { print a[1] }'`
8989
elif [[ -n `ip addr | grep ens3` ]]; then
9090
ip_address=`ip addr show ens3 | awk 'match($0, /inet ([0-9.]+)/, a) { print a[1] }'`
91+
elif [[ -n `ip addr | grep enp1s0` ]]; then
92+
ip_address=`ip addr show enp1s0 | awk 'match($0, /inet ([0-9.]+)/, a) { print a[1] }'`
9193
else
9294
echo 'Could not find IP address'
9395
exit 1

bin/vmu-reporter

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def generate_table():
7777
# Get number of platforms per dver so we know the length of the dver columns
7878
num_el = {}
7979
for platform in TABLE_LABELS['platforms']:
80-
dver = platform[-1]
80+
dver = platform.split(' ')[-2]
8181
try:
8282
num_el[dver] += 1
8383
except KeyError:
@@ -91,7 +91,7 @@ def generate_table():
9191
# Print out all the OS flavors
9292
os_row = Tag('tr')
9393
for platform in TABLE_LABELS['platforms']:
94-
os_row.append_new_tag('th').append(' ' + platform[:-1])
94+
os_row.append_new_tag('th').append(' ' + platform)
9595

9696
header = Tag('thead').extend([dver_row, os_row])
9797
body = generate_table_body()
@@ -221,11 +221,11 @@ def generate_cell(run):
221221

222222
def sort_platforms_by_dver(platform_list):
223223
'''Sorts the OS's by dver so that we know which column to put each run
224-
Assumes the OS's have the format: <flavor>_<dver>_<arch>'''
224+
Assumes the OS's have the format: <flavor>_<dver>.<arch>'''
225225
dvers = {}
226226
for platform in platform_list:
227-
translated_platform = vmu.canonical_os_string(platform)
228-
dver = translated_platform[-1]
227+
translated_platform = vmu.canonical_os_string(platform, True)
228+
dver = translated_platform.split(' ')[-2]
229229
try:
230230
dvers[dver].add(translated_platform)
231231
except KeyError:
@@ -239,7 +239,7 @@ def sort_tests(tests):
239239
'''Sort each test into a nested dictionary for easier population of the results table'''
240240
sorted_tests = dict()
241241
for test in tests:
242-
platform = vmu.canonical_os_string(test['os_release'])
242+
platform = vmu.canonical_os_string(test['os_release'] + test['platform'])
243243
src = vmu.canonical_src_string(test['param_sources'])
244244
pkg = PACKAGE_MAPPING[test['param_packages']]
245245
try:

bin/vmu.py

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,24 +73,26 @@ def package_mapping(flat_params):
7373
lists of packages as keys and their labels as values'''
7474
return dict((', '.join(x.packages), x.label) for x in flat_params['package_sets'])
7575

76-
def canonical_os_string(os_release):
76+
def canonical_os_string(os_release, param_name=False):
7777
'''Make the OS release from test parameters or /etc/redhat/release human readable'''
78-
# Handle OS string from /etc/redhat-release
79-
result = os_release.replace('Red Hat Enterprise Linux Server', 'RHEL')
80-
result = result.replace('Scientific Linux', 'SL')
81-
result = result.replace('CentOS Linux', 'CentOS')
82-
result = result.replace('CentOS Stream', 'C. Stream')
83-
result = result.replace('Rocky Linux', 'Rocky')
84-
result = result.replace('AlmaLinux', 'Alma')
85-
result = re.sub(r'(\d)\.\d+.*', r'\1', result)
86-
# Handle OS string from 'platforms' test parameters
87-
result = result.replace('rhel', 'RHEL')
88-
result = result.replace('sl', 'SL')
89-
result = result.replace('centos_stream', 'C. Stream')
90-
result = result.replace('centos', 'CentOS')
91-
result = result.replace('rocky', 'Rocky')
92-
result = result.replace('alma', 'Alma')
93-
result = re.sub(r'_(\d)_.*', r' \1', result)
78+
if not param_name:
79+
# Handle OS string from /etc/redhat-release
80+
result = os_release.replace('Red Hat Enterprise Linux Server', 'RHEL')
81+
result = result.replace('Scientific Linux', 'SL')
82+
result = result.replace('CentOS Linux', 'CentOS')
83+
result = result.replace('CentOS Stream', 'C. Stream')
84+
result = result.replace('Rocky Linux', 'Rocky')
85+
result = result.replace('AlmaLinux', 'Alma')
86+
result = re.sub(r'(\d)(\.\d+)?(.*)', r'\1 (\3)', result)
87+
else:
88+
# Handle OS string from 'platforms' test parameters
89+
result = os_release.replace('rhel', 'RHEL')
90+
result = result.replace('sl', 'SL')
91+
result = result.replace('centos_stream', 'C. Stream')
92+
result = result.replace('centos', 'CentOS')
93+
result = result.replace('rocky', 'Rocky')
94+
result = result.replace('alma', 'Alma')
95+
result = re.sub(r'_(\d)\.(.*)', r' \1 (\2)', result)
9496
return result
9597

9698
def canonical_src_string(sources):

jobs/single-test-run.sub

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ request_disk = 16GB
4848
txie-dsigpu4000.chtc.wisc.edu,\
4949
voyles2000.chtc.wisc.edu,\
5050
"
51-
requirements = (TARGET.HasVirshDefaultNetwork == True) && (TARGET.HasCHTCStaging == True) && !StringListMember(TARGET.Machine, MY.BadMachineList)
51+
requirements = (TARGET.Arch == split("$(platform)",".")[1]) && (TARGET.HasVirshDefaultNetwork == True) && (TARGET.HasCHTCStaging == True) && !StringListMember(TARGET.Machine, MY.BadMachineList)
52+
5253

5354
log = osg-test.log
5455

parameters.d/osg23-el8.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
###################
66

77
platforms:
8-
- rocky_8_x86_64
9-
- alma_8_x86_64
8+
- rocky_8.x86_64
9+
- alma_8.x86_64
1010

1111
sources:
1212
###################

parameters.d/osg23-el9.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
###################
66

77
platforms:
8-
- centos_stream_9_x86_64
9-
- rocky_9_x86_64
10-
- alma_9_x86_64
8+
- centos_stream_9.x86_64
9+
- rocky_9.x86_64
10+
- alma_9.x86_64
1111

1212
sources:
1313
###################

parameters.d/osg24-el8.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
###################
66

77
platforms:
8-
- rocky_8_x86_64
9-
- alma_8_x86_64
8+
- rocky_8.x86_64
9+
- alma_8.x86_64
1010

1111
sources:
1212
###################

parameters.d/osg24-el9.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
###################
66

77
platforms:
8-
- centos_stream_9_x86_64
9-
- rocky_9_x86_64
10-
- alma_9_x86_64
8+
- centos_stream_9.x86_64
9+
- rocky_9.x86_64
10+
- alma_9.x86_64
11+
- centos_stream_9.aarch64
12+
- rocky_9.aarch64
13+
- alma_9.aarch64
1114

1215
sources:
1316
###################

0 commit comments

Comments
 (0)