speccpu: support build_type for SPEC commands
This commit is contained in:
@@ -80,6 +80,33 @@ class TestSPEC:
|
||||
assert "--output_root" in cmd
|
||||
assert str(output_dir) in cmd
|
||||
|
||||
def test_mkcmd_runcpu_build_type_default(self):
|
||||
"""Test that mkcmd_runcpu doesn't add build flags with default build type."""
|
||||
spec = SPEC(Path("/path/to/spec"))
|
||||
cmd = spec.mkcmd_runcpu(
|
||||
"myconfig", ["benchmark1"], build_type=SPEC.BuildType.Default
|
||||
)
|
||||
assert "--nobuild" not in cmd
|
||||
assert "--rebuild" not in cmd
|
||||
|
||||
def test_mkcmd_runcpu_build_type_nobuild(self):
|
||||
"""Test that mkcmd_runcpu adds --nobuild flag with Nobuild build type."""
|
||||
spec = SPEC(Path("/path/to/spec"))
|
||||
cmd = spec.mkcmd_runcpu(
|
||||
"myconfig", ["benchmark1"], build_type=SPEC.BuildType.Nobuild
|
||||
)
|
||||
assert "--nobuild" in cmd
|
||||
assert "--rebuild" not in cmd
|
||||
|
||||
def test_mkcmd_runcpu_build_type_rebuild(self):
|
||||
"""Test that mkcmd_runcpu adds --rebuild flag with Rebuild build type."""
|
||||
spec = SPEC(Path("/path/to/spec"))
|
||||
cmd = spec.mkcmd_runcpu(
|
||||
"myconfig", ["benchmark1"], build_type=SPEC.BuildType.Rebuild
|
||||
)
|
||||
assert "--rebuild" in cmd
|
||||
assert "--nobuild" not in cmd
|
||||
|
||||
|
||||
class TestCheckBenchDir:
|
||||
def test_valid_bench_dir(self, tmpdir):
|
||||
|
||||
Reference in New Issue
Block a user