gem5-dev@gem5.org

The gem5 Developer List

View all threads

[S] Change in gem5/gem5[develop]: tests: Check if ARM/gem5.opt not built in test_hdf5.py

BB
Bobby Bruce (Gerrit)
Thu, Mar 23, 2023 8:16 PM

Bobby Bruce has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/69239?usp=email )

Change subject: tests: Check if ARM/gem5.opt not built in test_hdf5.py
......................................................................

tests: Check if ARM/gem5.opt not built in test_hdf5.py

This test was failing to load as ARM/gem5.opt is not built when this
test is pased during the Weekly tests. This bug is highlighed here:
https://gem5.atlassian.net/browse/GEM5-1073.

Comments have been added explaining this issue and the test not fails
more quitely. It, however, is not run.

Change-Id: I1f26f541a15438f6124a7541c01d44f70647762a

M tests/gem5/stats/test_hdf5.py
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/tests/gem5/stats/test_hdf5.py b/tests/gem5/stats/test_hdf5.py
index 993534a..8775d22 100644
--- a/tests/gem5/stats/test_hdf5.py
+++ b/tests/gem5/stats/test_hdf5.py
@@ -39,6 +39,12 @@
It just runs an SE simulation with the hdf5 stats and checks that the
simulation succeeds and the stats file exists.
No specific checks on the stats are performed.
+
+Important Note: This test has a major design flaw, noted here:
+https://gem5.atlassian.net/browse/GEM5-1073.
+It will not run if the build/ARM/gem5.opt has not been built. As this is
not
+built prior to this test being processed during the Weekly run, this test
is
+not run.
"""
import re
import os
@@ -54,6 +60,12 @@
have_hdf5_file = os.path.join(
config.base_dir, "build",
constants.arm_tag, "config", "have_hdf5.hh"
)

  • if not os.path.exists(have_hdf5_file):
  •    # This will most likely happen if the file has yet to have been
    
  •    # compiled. It should be noted that this case is likely. This is  
    

not

  •    # a good test as checking if hdf5 is available requires compilation
    
  •    # which is not assumed to be true at this stage in the test.
    
  •    return False
    with open(have_hdf5_file) as f:
        content = f.read()
    

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/69239?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I1f26f541a15438f6124a7541c01d44f70647762a
Gerrit-Change-Number: 69239
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby Bruce bbruce@ucdavis.edu
Gerrit-MessageType: newchange

Bobby Bruce has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/69239?usp=email ) Change subject: tests: Check if ARM/gem5.opt not built in test_hdf5.py ...................................................................... tests: Check if ARM/gem5.opt not built in test_hdf5.py This test was failing to load as ARM/gem5.opt is not built when this test is pased during the Weekly tests. This bug is highlighed here: https://gem5.atlassian.net/browse/GEM5-1073. Comments have been added explaining this issue and the test not fails more quitely. It, however, is not run. Change-Id: I1f26f541a15438f6124a7541c01d44f70647762a --- M tests/gem5/stats/test_hdf5.py 1 file changed, 12 insertions(+), 0 deletions(-) diff --git a/tests/gem5/stats/test_hdf5.py b/tests/gem5/stats/test_hdf5.py index 993534a..8775d22 100644 --- a/tests/gem5/stats/test_hdf5.py +++ b/tests/gem5/stats/test_hdf5.py @@ -39,6 +39,12 @@ It just runs an SE simulation with the hdf5 stats and checks that the simulation succeeds and the stats file exists. No specific checks on the stats are performed. + +**Important Note**: This test has a major design flaw, noted here: +https://gem5.atlassian.net/browse/GEM5-1073. +It will not run if the build/ARM/gem5.opt has not been built. As this is not +built prior to this test being processed during the Weekly run, this test is +not run. """ import re import os @@ -54,6 +60,12 @@ have_hdf5_file = os.path.join( config.base_dir, "build", constants.arm_tag, "config", "have_hdf5.hh" ) + if not os.path.exists(have_hdf5_file): + # This will most likely happen if the file has yet to have been + # compiled. It should be noted that this case is likely. This is not + # a good test as checking if hdf5 is available requires compilation + # which is not assumed to be true at this stage in the test. + return False with open(have_hdf5_file) as f: content = f.read() -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69239?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I1f26f541a15438f6124a7541c01d44f70647762a Gerrit-Change-Number: 69239 Gerrit-PatchSet: 1 Gerrit-Owner: Bobby Bruce <bbruce@ucdavis.edu> Gerrit-MessageType: newchange