Skip to content

Commit

Permalink
test: run-with-simulator skip-build
Browse files Browse the repository at this point in the history
Add the possibility to run the tests without compiling the sources
again. This is needed e.g. for the make check step in the spec file for
Fedora.

Signed-off-by: Adrian Freihofer <[email protected]>
  • Loading branch information
afreof authored and gotthardp committed Dec 8, 2023
1 parent 1555087 commit ef2d9a5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/run-with-simulator
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ build_tpm2_openssl() {
}

SIM_TYPE=${1:-swtpm}
build_tpm2_openssl || { echo "Compiling tpm2-openssl failed"; exit 1; }
SKIP_BUILD=${2:-build}
if [ "$SKIP_BUILD" = "skip-build" ]; then
echo "Skipping the build"
else
build_tpm2_openssl || { echo "Compiling tpm2-openssl failed"; exit 1; }
fi
start_tpm2_sim_env "${SIM_TYPE}" || { echo "Starting tpm2 simulator failed ($SIM_TYPE)"; exit 1; }
make_check || { echo "tpm2-openssl make check failed"; exit 1; }

0 comments on commit ef2d9a5

Please sign in to comment.