-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci,scripts] Add countermeasure check to ci and azure
Fixes #10071 Signed-off-by: Guillermo Maturana <[email protected]>
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 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
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,25 @@ | ||
#!/bin/bash | ||
# Copyright lowRISC contributors (OpenTitan project). | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Checks the coutermeasures for a given top from its hjson file. | ||
|
||
set -e | ||
|
||
if [ $# != 1 ]; then | ||
echo >&2 "Usage: check-countermeasures.sh <toplevel-name>" | ||
exit 1 | ||
fi | ||
hjson_file="hw/top_$1/data/top_$1.hjson" | ||
if [ ! -f ${hjson_file} ]; then | ||
echo >&2 "Missing hjson file for $1: expected file ${hjson_file} not found." | ||
echo >&2 " For example, use \"earlgrey\" for top_earlgrey.hjson." | ||
exit 1 | ||
fi | ||
|
||
./util/topgen.py -t ${hjson_file} --check-cm || { | ||
echo -n "##vso[task.logissue type=error]" | ||
echo "Countermeasure check failed." | ||
exit 1 | ||
} |