-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into lekcyjna/add-common-now
- Loading branch information
Showing
127 changed files
with
4,432 additions
and
1,414 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
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,53 @@ | ||
#!/bin/sh | ||
|
||
if [ -z "$MAKEFILE_PATH" ]; then | ||
echo "Makefile path not specifed. Exiting... " | ||
exit 1 | ||
fi | ||
|
||
[ ! -z "$DIFF_QUIET" ] && [ "$DIFF_QUIET" -eq 1 ] && diff_add_args="-q" | ||
|
||
RED="\033[1;31m" | ||
GREEN="\033[1;32m" | ||
RED_BG="\033[0;41m" | ||
GREEN_BG="\033[0;42m" | ||
NO_COLOR="\033[0m" | ||
|
||
signature_files="$(cat $MAKEFILE_PATH | sed -n 's/^.*-o=\(.*\.signature\).*$/\1/p')" | ||
|
||
REFERENCE_DIR_SUFF="/../ref/Reference-Spike.signature" | ||
|
||
echo "> Veryfing signatures" | ||
target_cnt=0 | ||
fail_cnt=0 | ||
|
||
for sig in $signature_files | ||
do | ||
ref="$(dirname "$sig")$REFERENCE_DIR_SUFF" | ||
echo ">> Comparing $sig (TARGET$target_cnt) to $ref" | ||
|
||
diff -b --strip-trailing-cr $diff_add_args "$sig" "$ref" | ||
res=$? | ||
|
||
[ -f "$ref" ] || echo -e "${RED}!${NO_COLOR} Reference signature file not found!" | ||
[ -f "$sig" ] || echo -e "${RED}!${NO_COLOR} Coreblocks signature file not found! Check signature run logs" | ||
[ -s "$sig" ] || echo -e "${RED}!${NO_COLOR} Coreblock signature file is empty! Check signature run logs" | ||
|
||
if [ $res = 0 ] | ||
then | ||
echo -e "${GREEN}[PASS] Signature verification passed (TARGET$target_cnt)${NO_COLOR}" | ||
else | ||
echo -e "${RED}[FAIL] Signature verification failed (TARGET$target_cnt)${NO_COLOR}" | ||
fail_cnt=$(( $fail_cnt+1 )) | ||
fi | ||
|
||
target_cnt=$(( $target_cnt+1 )) | ||
done | ||
|
||
rc=1 | ||
[ $fail_cnt -eq 0 ] && rc=0 | ||
|
||
bg=${GREEN_BG} | ||
[ $rc = 1 ] && bg=$RED_BG | ||
echo -e "${bg}>>> Compared $target_cnt signatures, FAILED=$fail_cnt, PASSED=$(($target_cnt-$fail_cnt))${NO_COLOR}" | ||
exit $rc |
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,22 @@ | ||
#!/bin/sh | ||
|
||
if [ -z "$MAKEFILE_PATH" ]; then | ||
echo "Makefile path not specifed. Exiting... " | ||
exit 1 | ||
fi | ||
|
||
[ -z "$NPROC" ] && NPROC=$(nproc) | ||
|
||
target_cnt=$(cat $MAKEFILE_PATH | grep TARGET | tail -n 1 | tr -d -c 0-9) | ||
|
||
echo "> Running for $target_cnt Makefile targets" | ||
|
||
targets="" | ||
|
||
for i in $(seq 0 $target_cnt) | ||
do | ||
targets="$targets TARGET$i" | ||
done | ||
|
||
echo "Starting for targets: $targets" | ||
make -f $MAKEFILE_PATH -i -j $NPROC $targets |
Oops, something went wrong.