Skip to content

Commit ef2d9a5

Browse files
afreofgotthardp
authored andcommitted
test: run-with-simulator skip-build
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 <adrian.freihofer@gmail.com>
1 parent 1555087 commit ef2d9a5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

test/run-with-simulator

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ build_tpm2_openssl() {
116116
}
117117

118118
SIM_TYPE=${1:-swtpm}
119-
build_tpm2_openssl || { echo "Compiling tpm2-openssl failed"; exit 1; }
119+
SKIP_BUILD=${2:-build}
120+
if [ "$SKIP_BUILD" = "skip-build" ]; then
121+
echo "Skipping the build"
122+
else
123+
build_tpm2_openssl || { echo "Compiling tpm2-openssl failed"; exit 1; }
124+
fi
120125
start_tpm2_sim_env "${SIM_TYPE}" || { echo "Starting tpm2 simulator failed ($SIM_TYPE)"; exit 1; }
121126
make_check || { echo "tpm2-openssl make check failed"; exit 1; }

0 commit comments

Comments
 (0)