-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd4ea51
commit 1f97311
Showing
2 changed files
with
225 additions
and
58 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,118 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
vendor="" | ||
model="" | ||
|
||
usage() { | ||
echo "Usage: ci.sh -v vendor -m model -f firmware command" 1>&2 | ||
exit 1 | ||
} | ||
|
||
while getopts "r:v:m:f:" o; do | ||
case "${o}" in | ||
r) root="${OPTARG}" ;; | ||
v) vendor="${OPTARG}" ;; | ||
m) model="${OPTARG}" ;; | ||
f) fw_file="${OPTARG}" ;; | ||
*) usage ;; | ||
esac | ||
done | ||
shift $((OPTIND-1)) | ||
|
||
[ -n "$vendor" ] || usage | ||
[ -n "$model" ] || usage | ||
[ $# -eq 1 ] || usage | ||
|
||
command="$1" | ||
[[ "$command" =~ ^(flash|test)$ ]] || usage | ||
shift 1 | ||
|
||
options=( | ||
-L TRACE | ||
-v snipeit:none | ||
) | ||
|
||
compatibility_tests=() | ||
performance_tests=() | ||
security_tests=() | ||
stability_tests=() | ||
|
||
case "$vendor" in | ||
msi) | ||
case "$model" in | ||
ms7d25_ddr5) | ||
options+=( | ||
-v device_ip:192.168.10.93 | ||
-v rte_ip:192.168.10.188 | ||
-v pikvm_ip:192.168.10.45 | ||
) | ||
config="msi-pro-z690-a-ddr5" | ||
;; | ||
*) | ||
echo unknown board: $model | ||
exit 1 | ||
;; | ||
esac | ||
;; | ||
*) | ||
echo unknown vendor: $vendor | ||
exit 1 | ||
;; | ||
esac | ||
|
||
if [ "$command" == "flash" ]; then | ||
robot $options[@] -v "fw_file:$fw_file" coreboot/03_flash_coreboot.robot | ||
This comment has been minimized.
Sorry, something went wrong. |
||
fi | ||
|
||
case "$vendor" in | ||
msi) | ||
case "$model" in | ||
ms7d25_ddr5) | ||
compatibility_tests+=( | ||
custom-boot-menu-key | ||
) | ||
|
||
security_tests+=( | ||
me-neuter | ||
) | ||
;; | ||
*) | ||
echo unknown board: $model | ||
exit 1 | ||
;; | ||
esac | ||
*) | ||
echo unknown vendor: $vendor | ||
exit 1 | ||
;; | ||
esac | ||
|
||
mkdir "test-results-$vendor-$model" | ||
|
||
run_robot() { | ||
local category="$1" | ||
local test="$2" | ||
|
||
robot -l "test-results-$vendor-$model/dasharo-${category}.log.html" \ | ||
-r "test-results-$vendor-$model/dasharo-${category}.html" \ | ||
-p "test-results-$vendor-$model/dasharo-${category}.xml" \ | ||
${options[@]} "$root/dasharo-${category}/$test.robot" | ||
} | ||
|
||
for test in "${compatibility_tests[@]}"; do | ||
run_robot compatibility "$test" | ||
done | ||
|
||
for test in "${performance_tests[@]}"; do | ||
run_robot performance "$test" | ||
done | ||
|
||
for test in "${security_tests[@]}"; do | ||
run_robot security "$test" | ||
done | ||
|
||
for test in "${stability_tests[@]}"; do | ||
run_robot stability "$test" | ||
done |
I'm afraid the
coreboot/03_flash_coreboot.robot
would not work for current Dasharo. Have you tested it? Which revision of open-source-firmware-validation repo was used here?