Skip to content

Commit dd217c0

Browse files
committed
Add --exclude example args for "PCT enabled" CI testing
- Adds an option in the tests script to exclude specific examples. - Needed because basic_deterministic is incompatible with MLK_CONFIG_KEYGEN_PCT. - Allows CI to run all examples while skipping incompatible ones. Signed-off-by: willieyz <[email protected]>
1 parent dc5de10 commit dd217c0

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/actions/config-variations/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ runs:
2828
kat: true
2929
acvp: true
3030
opt: ${{ inputs.opt }}
31+
examples: true
32+
extra_args: "--exclude-example basic_deterministic"
3133
- name: "PCT enabled + broken"
3234
if: ${{ inputs.tests == 'all' || contains(inputs.tests, 'pct-enabled-broken') }}
3335
shell: bash

scripts/tests

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,12 @@ class Tests:
636636
l = TEST_TYPES.examples()
637637
else:
638638
l = list(map(TEST_TYPES.from_string, self.args.l))
639+
640+
# Filter out excluded examples
641+
if hasattr(self.args, "exclude_example") and self.args.exclude_example:
642+
excluded = [TEST_TYPES.from_string(ex) for ex in self.args.exclude_example]
643+
l = [e for e in l if e not in excluded]
644+
639645
for e in l:
640646
self._compile_schemes(e, None)
641647
self._run_scheme(e, None, None)
@@ -1075,6 +1081,25 @@ def cli():
10751081
help="Do not run examples",
10761082
)
10771083

1084+
all_parser.add_argument(
1085+
"--exclude-example",
1086+
help="Exclude specific examples from running (can be used multiple times)",
1087+
choices=[
1088+
"bring_your_own_fips202",
1089+
"custom_backend",
1090+
"basic",
1091+
"basic_deterministic",
1092+
"monolithic_build",
1093+
"monolithic_build_native",
1094+
"monolithic_build_multilevel",
1095+
"monolithic_build_multilevel_native",
1096+
"multilevel_build",
1097+
"multilevel_build_native",
1098+
],
1099+
action="append",
1100+
default=[],
1101+
)
1102+
10781103
stack_group = all_parser.add_mutually_exclusive_group()
10791104
stack_group.add_argument(
10801105
"--stack",

0 commit comments

Comments
 (0)