Skip to content

Commit af5dc30

Browse files
committed
Add custom backend to lint and tests scripts
Signed-off-by: willieyz <[email protected]>
1 parent 5ce6530 commit af5dc30

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

scripts/lint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ check-spdx()
156156
success=false
157157
fi
158158
done
159-
for file in $(git ls-files -- "*.[chsS]" "*.py" ":/!proofs/cbmc/*.py" ":/!examples/bring_your_own_fips202/custom_fips202/tiny_sha3/*"); do
159+
for file in $(git ls-files -- "*.[chsS]" "*.py" ":/!proofs/cbmc/*.py" ":/!examples/bring_your_own_fips202/custom_fips202/tiny_sha3/*" ":/!examples/custom_backend/mldsa_native/mldsa/src/fips202/native/custom/src/sha3/*"); do
160160
# Ignore symlinks
161161
if [[ ! -L $file && $(grep "Copyright (c) The mldsa-native project authors" $file | wc -l) == 0 ]]; then
162162
gh_error "$file" "${line:-1}" "Missing copyright header error" "$file is missing copyright header"

scripts/tests

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ class TEST_TYPES(Enum):
206206
MONOLITHIC_BUILD_MULTILEVEL = 11
207207
BASIC_DETERMINISTIC = 12
208208
BRING_YOUR_OWN_FIPS202_STATIC = 13
209+
CUSTOM_BACKEND = 14
209210

210211
def is_benchmark(self):
211212
return self in [TEST_TYPES.BENCH, TEST_TYPES.BENCH_COMPONENTS]
@@ -222,6 +223,7 @@ class TEST_TYPES(Enum):
222223
TEST_TYPES.MONOLITHIC_BUILD,
223224
TEST_TYPES.MONOLITHIC_BUILD_MULTILEVEL,
224225
TEST_TYPES.BRING_YOUR_OWN_FIPS202_STATIC,
226+
TEST_TYPES.CUSTOM_BACKEND,
225227
]
226228

227229
@staticmethod
@@ -263,6 +265,8 @@ class TEST_TYPES(Enum):
263265
return "Example (monobuild, multilevel)"
264266
if self == TEST_TYPES.BRING_YOUR_OWN_FIPS202_STATIC:
265267
return "Example (bring your own FIPS-202, static)"
268+
if self == TEST_TYPES.CUSTOM_BACKEND:
269+
return "Example (Custom Backend)"
266270

267271
def make_dir(self):
268272
if self == TEST_TYPES.BASIC:
@@ -277,6 +281,8 @@ class TEST_TYPES(Enum):
277281
return "examples/monolithic_build_multilevel"
278282
if self == TEST_TYPES.BRING_YOUR_OWN_FIPS202_STATIC:
279283
return "examples/bring_your_own_fips202_static"
284+
if self == TEST_TYPES.CUSTOM_BACKEND:
285+
return "examples/custom_backend"
280286
return ""
281287

282288
def make_target(self):
@@ -306,6 +312,8 @@ class TEST_TYPES(Enum):
306312
return ""
307313
if self == TEST_TYPES.BRING_YOUR_OWN_FIPS202_STATIC:
308314
return ""
315+
if self == TEST_TYPES.CUSTOM_BACKEND:
316+
return ""
309317

310318
def make_run_target(self, scheme):
311319
t = self.make_target()
@@ -1050,7 +1058,7 @@ def cli():
10501058
choices=[
10511059
"bring_your_own_fips202",
10521060
# "bring_your_own_fips202_static",
1053-
# "custom_backend",
1061+
"custom_backend",
10541062
"basic",
10551063
"basic_deterministic",
10561064
"monolithic_build",
@@ -1104,6 +1112,7 @@ def cli():
11041112
"monolithic_build",
11051113
"monolithic_build_multilevel",
11061114
"bring_your_own_fips202_static",
1115+
"custom_backend",
11071116
],
11081117
action="append",
11091118
)

0 commit comments

Comments
 (0)