From 5c202227272435fccb184a8fa9dd05be2a988323 Mon Sep 17 00:00:00 2001 From: OuyangHang33 Date: Sun, 28 Apr 2024 16:54:06 +0800 Subject: [PATCH] Add rollback test for spdm-rs and spdm-emu Signed-off-by: OuyangHang33 --- .github/workflows/main.yml | 8 ++ sh_script/rollbacktest.sh | 127 +++++++++++++++++++ test/spdm-requester-emu/Cargo.toml | 2 + test/spdm-requester-emu/src/main.rs | 181 ++++++++++++++++++++++++++++ 4 files changed, 318 insertions(+) create mode 100755 sh_script/rollbacktest.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 504569a..6570aad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -89,3 +89,11 @@ jobs: RUN_RESPONDER_FEATURES: ${{ matrix.run_responder_features }} run: | ./sh_script/build.sh -r + + - name: Rollback test + shell: bash + env: + CC_x86_64_unknown_none: clang + AR_x86_64_unknown_none: llvm-ar + run: | + ./sh_script/rollbacktest.sh -a diff --git a/sh_script/rollbacktest.sh b/sh_script/rollbacktest.sh new file mode 100755 index 0000000..fad5ab6 --- /dev/null +++ b/sh_script/rollbacktest.sh @@ -0,0 +1,127 @@ +#!/bin/bash + +set -euo pipefail + +export RUST_MIN_STACK=10485760 +RUSTFLAGS=${RUSTFLAGS:-} + +usage() { + cat <