Skip to content

Commit

Permalink
[CI, nightly] Rename tag skip_in_nightly_ci to slow_test
Browse files Browse the repository at this point in the history
The new name will make more sense when we create a job to run those
tests

Signed-off-by: Douglas Reis <doreis@lowrisc.org>
(cherry picked from commit 8912542)
  • Loading branch information
engdoreis committed Dec 10, 2024
1 parent 5be3ba9 commit 73cf630
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
| grep -v examples \
| grep -v penetrationtests \
> "$bazel_tests"
./bazelisk.sh test --build_tests_only --test_tag_filters=-broken,-skip_in_nightly_ci --target_pattern_file="$bazel_tests"
./bazelisk.sh test --build_tests_only --test_tag_filters=-slow_test --target_pattern_file="$bazel_tests"
- name: Run tests after ROM_EXT boot stage
if: success() || failure()
Expand All @@ -72,7 +72,7 @@ jobs:
| grep -v examples \
| grep -v penetrationtests \
> "$bazel_tests"
./bazelisk.sh test --build_tests_only --test_tag_filters=-broken,-skip_in_nightly_ci --target_pattern_file="$bazel_tests"
./bazelisk.sh test --build_tests_only --test_tag_filters=-slow_test --target_pattern_file="$bazel_tests"
- name: Compute bucket destination
id: bucket_destination
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
| grep -v examples \
| grep -v penetrationtests \
> "$bazel_tests"
./bazelisk.sh test --build_tests_only --test_tag_filters=-skip_in_nightly_ci --target_pattern_file="$bazel_tests"
./bazelisk.sh test --build_tests_only --test_tag_filters=-slow_test --target_pattern_file="$bazel_tests"
- name: Run tests after ROM_EXT boot stage
if: success() || failure()
Expand All @@ -141,7 +141,7 @@ jobs:
| grep -v examples \
| grep -v penetrationtests \
> "$bazel_tests"
./bazelisk.sh test --build_tests_only --test_tag_filters=-skip_in_nightly_ci --target_pattern_file="$bazel_tests"
./bazelisk.sh test --build_tests_only --test_tag_filters=-slow_test --target_pattern_file="$bazel_tests"
- name: Publish bazel test results
if: success() || failure()
Expand Down
18 changes: 15 additions & 3 deletions sw/device/tests/crypto/cryptotest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ AES_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "aes_kat",
skip_in_nightly_ci = True,
slow_test = True,
test_args = AES_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/aes_nist_kat:harness",
test_vectors = AES_TESTVECTOR_TARGETS,
Expand Down Expand Up @@ -68,6 +68,7 @@ ECDSA_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "ecdsa_kat",
slow_test = True,
test_args = ECDSA_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/ecdsa_kat:harness",
test_vectors = ECDSA_TESTVECTOR_TARGETS,
Expand Down Expand Up @@ -113,6 +114,7 @@ SHA256_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "sha256_kat",
slow_test = True,
test_args = SHA256_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/hash_kat:harness",
test_vectors = SHA256_TESTVECTOR_TARGETS,
Expand All @@ -135,6 +137,7 @@ SHA384_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "sha384_kat",
slow_test = True,
test_args = SHA384_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/hash_kat:harness",
test_vectors = SHA384_TESTVECTOR_TARGETS,
Expand All @@ -157,6 +160,7 @@ SHA512_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "sha512_kat",
slow_test = True,
test_args = SHA512_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/hash_kat:harness",
test_vectors = SHA512_TESTVECTOR_TARGETS,
Expand Down Expand Up @@ -201,6 +205,7 @@ SHA3_256_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "sha3_256_kat",
slow_test = True,
test_args = SHA3_256_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/hash_kat:harness",
test_vectors = SHA3_256_TESTVECTOR_TARGETS,
Expand All @@ -223,6 +228,7 @@ SHA3_384_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "sha3_384_kat",
slow_test = True,
test_args = SHA3_384_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/hash_kat:harness",
test_vectors = SHA3_384_TESTVECTOR_TARGETS,
Expand All @@ -245,6 +251,7 @@ SHA3_512_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "sha3_512_kat",
slow_test = True,
test_args = SHA3_512_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/hash_kat:harness",
test_vectors = SHA3_512_TESTVECTOR_TARGETS,
Expand All @@ -268,7 +275,7 @@ SHAKE128_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "shake128_kat",
skip_in_nightly_ci = True,
slow_test = True,
test_args = SHAKE128_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/hash_kat:harness",
test_vectors = SHAKE128_TESTVECTOR_TARGETS,
Expand All @@ -292,7 +299,7 @@ SHAKE256_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "shake256_kat",
skip_in_nightly_ci = True,
slow_test = True,
test_args = SHAKE256_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/hash_kat:harness",
test_vectors = SHAKE256_TESTVECTOR_TARGETS,
Expand Down Expand Up @@ -326,6 +333,7 @@ DRBG_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "drbg_kat",
slow_test = True,
test_args = DRBG_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/drbg_kat:harness",
test_vectors = DRBG_TESTVECTOR_TARGETS,
Expand All @@ -343,6 +351,7 @@ HMAC_SHA256_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "hmac_sha256_kat",
slow_test = True,
test_args = HMAC_SHA256_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/hmac_kat:harness",
test_vectors = HMAC_SHA256_TESTVECTOR_TARGETS,
Expand All @@ -360,6 +369,7 @@ HMAC_SHA384_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "hmac_sha384_kat",
slow_test = True,
test_args = HMAC_SHA384_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/hmac_kat:harness",
test_vectors = HMAC_SHA384_TESTVECTOR_TARGETS,
Expand All @@ -377,6 +387,7 @@ HMAC_SHA512_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "hmac_sha512_kat",
slow_test = True,
test_args = HMAC_SHA512_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/hmac_kat:harness",
test_vectors = HMAC_SHA512_TESTVECTOR_TARGETS,
Expand Down Expand Up @@ -416,6 +427,7 @@ SPHINCSPLUS_TESTVECTOR_ARGS = " ".join([

cryptotest(
name = "sphincsplus_kat",
slow_test = True,
test_args = SPHINCSPLUS_TESTVECTOR_ARGS,
test_harness = "//sw/host/tests/crypto/sphincsplus_kat:harness",
test_vectors = SPHINCSPLUS_TESTVECTOR_TARGETS,
Expand Down
6 changes: 3 additions & 3 deletions sw/device/tests/crypto/cryptotest/cryptotest.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ FIRMWARE_DEPS = [
"//sw/device/tests/crypto/cryptotest/json:commands",
]

def cryptotest(name, test_vectors, test_args, test_harness, skip_in_nightly_ci = False):
def cryptotest(name, test_vectors, test_args, test_harness, slow_test = False):
"""A macro for defining a CryptoTest test case.
Args:
name: the name of the test.
test_vectors: the test vectors to use.
test_args: additional arguments to pass to the test.
test_harness: the test harness to use.
skip_in_nightly_ci: indicate if the test should be run in the nightly CI.
slow_test: indicate if the test should be run in the nightly CI.
"""
tags = ["skip_in_nightly_ci"] if skip_in_nightly_ci else []
tags = ["slow_test"] if slow_test else []
opentitan_test(
name = name,
srcs = ["//sw/device/tests/crypto/cryptotest/firmware:firmware.c"],
Expand Down

0 comments on commit 73cf630

Please sign in to comment.