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

Fail loudly if new benchmark has no output. #135

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Changes from all commits
Commits
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
16 changes: 11 additions & 5 deletions regtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ def find_build_dirs(tests):
last_safe = False

for obj in tests:

# keep track of the build directory and which source tree it is
# in (e.g. the extra build dir)

# first find the list of unique build directories
dir_pair = (obj.buildDir, obj.extra_build_dir)
if build_dirs.count(dir_pair) == 0:
build_dirs.append(dir_pair)

# re-make all problems that specify an extra compile argument,
# and the test that comes after, just to make sure that any
# unique build commands are seen.
Expand All @@ -66,9 +66,9 @@ def find_build_dirs(tests):
obj.reClean = 0
else:
last_safe = True

return build_dirs

def cmake_setup(suite):
"Setup for cmake"

Expand Down Expand Up @@ -1177,11 +1177,14 @@ def test_suite(argv):
# archive (or delete) the output
#----------------------------------------------------------------------
suite.log.log("archiving the output...")
match_count = 0
for pfile in os.listdir(output_dir):

if (os.path.isdir(pfile) and
re.match(f"{test.name}.*_(plt|chk)[0-9]+", pfile)):

match_count += 1

if suite.purge_output == 1 and not pfile == output_file:

# delete the plt/chk file
Expand All @@ -1206,6 +1209,9 @@ def test_suite(argv):
except OSError:
suite.log.warn(f"unable to remove {pfile}")

if (match_count == 0):
suite.log.fail("ERROR: test output could not be found!")


#----------------------------------------------------------------------
# write the report for this test
Expand Down
Loading