-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #423 from perftool-incubator/cyclictest-runfile-ci
Add cyclictest runfile
- Loading branch information
Showing
4 changed files
with
132 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
util/tests/JSON/ci-cyclictest-run-file-remotehost-default.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"benchmarks": [ | ||
{ | ||
"name": "cyclictest", | ||
"ids": "1", | ||
"mv-params": { | ||
"global-options": [ | ||
{ | ||
"name": "required", | ||
"params": [ | ||
{ "arg": "duration", "vals": [ "10" ], "role": "client" }, | ||
{ "arg": "priority", "vals": [ "1" ], "role": "client" }, | ||
{ "arg": "smi", "vals": [ "off" ], "role": "client" } | ||
] | ||
} | ||
], | ||
"sets": [ | ||
{ | ||
"include": "required" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"tool-params": [ | ||
{ | ||
"tool": "sysstat", | ||
"params": [ | ||
{ "arg": "subtools", "val": "mpstat", "enabled": "yes" } | ||
] | ||
}, | ||
{ | ||
"tool": "procstat" | ||
} | ||
], | ||
"tags": { | ||
"run": "cyclictest-run-file-json", | ||
"userenv": "default" | ||
}, | ||
"endpoints": [ | ||
{ | ||
"type": "remotehost", | ||
"controller-ip": "CONTROLLER_IP", | ||
"host": "CI_ENDPOINT_HOST", | ||
"user": "CI_ENDPOINT_USER", | ||
"userenv": "default", | ||
"server": "1", | ||
"client": "1-2", | ||
"config": [ | ||
{ | ||
"targets": [ | ||
{ "role": "client", "ids": "1" }, | ||
{ "role": "server", "ids": "1" } | ||
], | ||
"settings": { | ||
"osruntime": "podman" | ||
} | ||
}, | ||
{ | ||
"targets": [ | ||
{ "role": "client", "ids": "2" } | ||
], | ||
"settings": { | ||
"osruntime": "chroot" | ||
} | ||
}, | ||
{ | ||
"targets": "default", | ||
"settings": { | ||
"cpu-partitioning": "1" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "remotehost", | ||
"controller-ip": "CONTROLLER_IP", | ||
"host": "CI_ENDPOINT_HOST", | ||
"user": "CI_ENDPOINT_USER", | ||
"userenv": "default", | ||
"profiler": "1", | ||
"config": [ | ||
{ | ||
"targets": [ | ||
{ "role": "profiler", "ids": "1" } | ||
], | ||
"settings": { | ||
"osruntime": "chroot" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"run-params": { | ||
"num-samples": 1, | ||
"test-order": "s" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import pytest | ||
import glob | ||
import validate_run_file | ||
import sys | ||
|
||
class TestValidateRunFile: | ||
|
||
"""Validate all ci runfiles""" | ||
@pytest.mark.parametrize("runfile", glob.glob("tests/JSON/ci-*.json")) | ||
def test_validate_run_file(self, runfile, capsys): | ||
validate = validate_run_file.validate(runfile) | ||
out, err = capsys.readouterr() | ||
assert validate == 0 | ||
assert "[ OK ]" in out | ||
assert err == "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters