From 99a7718e22c2312e324e0752199c492745c25027 Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Thu, 28 Sep 2023 15:41:18 -0500 Subject: [PATCH 1/4] set the unittest workflow to run on PRs to the correct branch (master) --- .github/workflows/unittest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittest.yaml b/.github/workflows/unittest.yaml index 6481850a..77e505ca 100644 --- a/.github/workflows/unittest.yaml +++ b/.github/workflows/unittest.yaml @@ -2,7 +2,7 @@ name: unittest on: pull_request: - branches: [ main ] + branches: [ master ] paths-ignore: - LICENSE - '**.md' From a34cc9ec7cae2854e72465a777dffafa78c40d89 Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Thu, 28 Sep 2023 15:50:11 -0500 Subject: [PATCH 2/4] fixup the blockbreaker run-params unittest --- util/tests/JSON/output-oslat-passthru-args.stream | 1 - util/tests/JSON/output-oslat-run-params.stream | 1 + util/tests/test-blockbreaker.py | 8 ++++---- 3 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 util/tests/JSON/output-oslat-passthru-args.stream create mode 100644 util/tests/JSON/output-oslat-run-params.stream diff --git a/util/tests/JSON/output-oslat-passthru-args.stream b/util/tests/JSON/output-oslat-passthru-args.stream deleted file mode 100644 index f74de969..00000000 --- a/util/tests/JSON/output-oslat-passthru-args.stream +++ /dev/null @@ -1 +0,0 @@ -" --num-samples 1 --test-order s" diff --git a/util/tests/JSON/output-oslat-run-params.stream b/util/tests/JSON/output-oslat-run-params.stream new file mode 100644 index 00000000..a52b18bb --- /dev/null +++ b/util/tests/JSON/output-oslat-run-params.stream @@ -0,0 +1 @@ + --num-samples 1 --test-order s diff --git a/util/tests/test-blockbreaker.py b/util/tests/test-blockbreaker.py index 4fbe2a23..eefb5fbf 100755 --- a/util/tests/test-blockbreaker.py +++ b/util/tests/test-blockbreaker.py @@ -43,11 +43,11 @@ def test_json_to_stream_tags(self, load_json_file): """Test if json_to_stream converts run-params block to a stream""" @pytest.mark.parametrize("load_json_file", [ "input-oslat-k8s.json" ], indirect=True) - def test_json_to_stream_run_parameters(self, load_json_file): - run_parameters_stream = blockbreaker.dump_json(load_json_file, "run-params", 0) - expected_stream = self._load_file("output-oslat-passthru-args.stream") + def test_json_to_stream_run_params(self, load_json_file): + run_params_stream = blockbreaker.json_to_stream(load_json_file, "run-params", 0) + expected_stream = self._load_file("output-oslat-run-params.stream") - assert run_parameters_stream == expected_stream + assert run_params_stream == expected_stream """Test if dump_json returns a str""" @pytest.mark.parametrize("load_json_file", From 5f67e3868c4bf4e9e98edd088f505dd92014912b Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Thu, 28 Sep 2023 15:53:01 -0500 Subject: [PATCH 3/4] fixup blockbreaker comment --- util/blockbreaker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/blockbreaker.py b/util/blockbreaker.py index 1599b168..b4b299db 100755 --- a/util/blockbreaker.py +++ b/util/blockbreaker.py @@ -265,7 +265,7 @@ def main(): case default: if args.config == "mv-params": input_json = get_mv_params(input_json, args.benchmark) - # mv-params, tool-params, passthru-args + # mv-params, tool-params output = dump_json(input_json, args.config, args.index) print(output) From 9e0dfb71c86a7c5aca058bd29a9420e375029126 Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Thu, 28 Sep 2023 16:07:10 -0500 Subject: [PATCH 4/4] Enable all-in-one json ci job --- ...t-run-file-k8s-alma8.json => ci-oslat-run-file-k8s-alma8.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename util/tests/JSON/{DISABLED-ci-oslat-run-file-k8s-alma8.json => ci-oslat-run-file-k8s-alma8.json} (100%) diff --git a/util/tests/JSON/DISABLED-ci-oslat-run-file-k8s-alma8.json b/util/tests/JSON/ci-oslat-run-file-k8s-alma8.json similarity index 100% rename from util/tests/JSON/DISABLED-ci-oslat-run-file-k8s-alma8.json rename to util/tests/JSON/ci-oslat-run-file-k8s-alma8.json