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

Add code coverage for multiple compilers with script schema #1515

Merged
merged 13 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
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
17 changes: 17 additions & 0 deletions tests/builders/stream_example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
buildspecs:
stream_openmp_c:
executor: generic.local.bash
type: script
description: "STREAM Microbenchmark C Test with OpenMP"
tags: ["benchmark"]
compilers:
name: ['^(builtin_gcc)']
default:
gcc:
cflags: -fopenmp -O2
env:
OMP_NUM_THREADS: 8
run: |
wget https://www.cs.virginia.edu/stream/FTP/Code/stream.c
$BUILDTEST_CC $BUILDTEST_CFLAGS stream.c -o stream
./stream
13 changes: 11 additions & 2 deletions tests/builders/test_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,20 @@ def test_file_count():
cmd.build()


def test_multicompilers_with_script_schema():
"""This test will run the stream benchmark with multiple compilers using the 'compilers' keyword in script schema"""
cmd = BuildTest(
buildspecs=[os.path.join(here, "stream_example.yml")],
buildtest_system=system,
configuration=config,
)
cmd.build()


def test_regex_check():
"""This test buildspec using status check with 'status_regex'"""
cmd = BuildTest(
buildspecs=[
os.path.join(here, "status_regex.yml")],
buildspecs=[os.path.join(here, "status_regex.yml")],
buildtest_system=system,
configuration=config,
)
Expand Down
4 changes: 2 additions & 2 deletions tutorials/test_status/status_regex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ buildspecs:
status_regex_stderr_pass:
executor: generic.local.bash
type: script
tags: [ system ]
tags: [system]
description: Pass test based on regular expression
run: echo "PASS"
status:
Expand All @@ -35,7 +35,7 @@ buildspecs:
status_regex_stderr_fail:
executor: generic.local.bash
type: script
tags: [ system ]
tags: [system]
description: Pass test based on regular expression
run: echo "FAIL"
status:
Expand Down
Loading