Skip to content

Commit

Permalink
changed the test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
annaibm committed Mar 13, 2024
1 parent f930e69 commit 67dc842
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 deletions.
34 changes: 17 additions & 17 deletions examples/platformRequirements/playlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,72 +108,72 @@
<platformRequirements>^os.linux.ubuntu.20+</platformRequirements>
</test>
<test>
<testCaseName>test_microarchitecture_not_supported</testCaseName>
<testCaseName>test_not_microarch_supported</testCaseName>
<command>echo "test on microarchitecture not supported"; \
$(TEST_STATUS)</command>
<platformRequirements>arch.not.supported</platformRequirements>
</test>
<platformRequirements>^microarch.supported</platformRequirements>
</test>
<!-- Test for skylake microarchitecture -->
<test>
<testCaseName>test_microarchitecture_detection_skylake</testCaseName>
<testCaseName>test_microarch_skylake</testCaseName>
<command>echo "test microarchitecture detection for skylake"; \
$(TEST_STATUS)</command>
<platformRequirementsList>
<platformRequirements>arch.skylake</platformRequirements>
<platformRequirements>microarch.skylake</platformRequirements>
</platformRequirementsList>
</test>
<!-- Test for z15+ microarchitecture -->
<test>
<testCaseName>test_microarchitecture_detection_z15_and_above</testCaseName>
<testCaseName>test_microarch_z15plus</testCaseName>
<command>echo "test microarchitecture detection for z15";
$(TEST_STATUS)</command>
<platformRequirementsList>
<platformRequirements>arch.zos.z15+</platformRequirements>
<platformRequirements>microarch.z15+</platformRequirements>
</platformRequirementsList>
</test>
<!-- Test for z15 microarchitecture -->
<test>
<testCaseName>test_microarchitecture_detection_z15</testCaseName>
<testCaseName>test_microarch_z15</testCaseName>
<command>echo "test microarchitecture detection for z15"; \
$(TEST_STATUS)</command>
<platformRequirementsList>
<platformRequirements>arch.zos.z15</platformRequirements>
<platformRequirements>microarch.z15</platformRequirements>
</platformRequirementsList>
</test>
<!-- Test for z14+ microarchitecture -->
<test>
<testCaseName>test_microarchitecture_detection_z14_and_above</testCaseName>
<testCaseName>test_microarch_z14plus</testCaseName>
<command>echo "test microarchitecture detection for z14 and above"; \
$(TEST_STATUS)</command>
<platformRequirementsList>
<platformRequirements>arch.zos.14+</platformRequirements>
<platformRequirements>microarch.z14+</platformRequirements>
</platformRequirementsList>
</test>
<!-- Test for z14 microarchitecture -->
<test>
<testCaseName>test_microarchitecture_detection_z14</testCaseName>
<testCaseName>test_microarch_z14</testCaseName>
<command>echo "test microarchitecture detection for z14"; \
$(TEST_STATUS)</command>
<platformRequirementsList>
<platformRequirements>arch.zos.z14</platformRequirements>
<platformRequirements>microarch.z14</platformRequirements>
</platformRequirementsList>
</test>
<!-- Test for z13+ microarchitecture -->
<test>
<testCaseName>test_microarchitecture_detection_z13_and_above</testCaseName>
<testCaseName>test_microarch_z13plus</testCaseName>
<command>echo "test microarchitecture detection for z13 and above"; \
$(TEST_STATUS)</command>
<platformRequirementsList>
<platformRequirements>arch.zos.z13+</platformRequirements>
<platformRequirements>microarch.z13+</platformRequirements>
</platformRequirementsList>
</test>
<!-- Test for z13 microarchitecture -->
<test>
<testCaseName>test_microarchitecture_detection_z13</testCaseName>
<testCaseName>test_microarch_z13</testCaseName>
<command>echo "test microarchitecture detection for z13"; \
$(TEST_STATUS)</command>
<platformRequirementsList>
<platformRequirements>arch.zos.z13</platformRequirements>
<platformRequirements>microarch.z13</platformRequirements>
</platformRequirementsList>
</test>

Expand Down
50 changes: 25 additions & 25 deletions scripts/testTKG/test_platformRequirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,55 +118,55 @@ def run_test():
print("micro_arch in platform req: {}".format(micro_arch))
if micro_arch is not None:
micro_arch = micro_arch.group(1)
label_str = micro_arch.split(".")
label_str = micro_arch
print("Label_str:",label_str)
# micro_arch example: skylake
try:
ver = int(''.join(filter(str.isdigit, micro_arch.split()[-1])))
print("ver:",ver)
if label_str == "skylake":
passed.add('test_microarchitecture_detection_skylake_0')
passed.add('test_microarch_skylake_0')
if ver == 13:
passed.add('test_microarchitecture_detection_z13_0')
passed.add('test_microarch_z13_0')
elif ver > 13:
passed.add('test_microarchitecture_detection_z13_and_above_0')
passed.add('test_microarch_z13plus_0')
if ver == 14:
passed.add('test_microarchitecture_detection_z14_0')
passed.add('test_microarch_z14_0')
elif ver > 14:
passed.add('test_microarchitecture_detection_z14_and_above_0')
passed.add('test_microarch_z14plus_0')
if ver == 15:
passed.add('test_microarchitecture_detection_z15_0')
passed.add('test_microarch_z15_0')
elif ver > 15:
passed.add('test_microarchitecture_detection_z15_and_above_0')
passed.add('test_microarch_z15plus_0')
else:
skipped.add('test_microarchitecture_not_supported_0')
skipped.add('test_not_microarch_supported')

except ValueError as ve:
print("warning: os version value failed to convert to an integer")
skipped.add('test_microarchitecture_not_supported_0')
skipped.add('test_not_microarch_supported')
else:
skipped.add('test_microarchitecture_not_supported_0')
skipped.add('test_not_microarch_supported')

if 'test_microarchitecture_detection_z15_0' not in passed:
skipped.add('test_microarchitecture_detection_z15_0')
if 'test_microarch_z15_0' not in passed:
skipped.add('test_microarch_z15_0')

if 'test_microarchitecture_detection_z14_0' not in passed:
skipped.add('test_microarchitecture_detection_z14_0')
if 'test_microarch_z14_0' not in passed:
skipped.add('test_microarch_z14_0')

if 'test_microarchitecture_detection_z13_0' not in passed:
skipped.add('test_microarchitecture_detection_z13_0')
if 'test_microarch_z13_0' not in passed:
skipped.add('test_microarch_z13_0')

if 'test_microarchitecture_detection_z15_and_above_0' not in passed:
skipped.add('test_microarchitecture_detection_z15_and_above_0')
if 'test_microarch_z15plus_0' not in passed:
skipped.add('test_microarch_z15plus_0')

if 'test_microarchitecture_detection_z14_and_above_0' not in passed:
skipped.add('test_microarchitecture_detection_z14_and_above_0')
if 'test_microarch_z14plus_0' not in passed:
skipped.add('test_microarch_z14plus_0')

if 'test_microarchitecture_detection_z13_and_above_0' not in passed:
skipped.add('test_microarchitecture_detection_z13_and_above_0')
if 'test_microarch_z13plus_0' not in passed:
skipped.add('test_microarch_z13plus_0')

if 'test_microarchitecture_detection_skylake_0' not in passed:
skipped.add('test_microarchitecture_detection_skylake_0')
if 'test_microarch_skylake_0' not in passed:
skipped.add('test_microarch_skylake_0')


rt &= checkResult(result, passed, set(), set(), skipped)
Expand Down

0 comments on commit 67dc842

Please sign in to comment.