diff --git a/.ci/docker/docker-compose-system-test.yml b/.ci/docker/docker-compose-system-test.yml index 37d9366c..0417cd41 100644 --- a/.ci/docker/docker-compose-system-test.yml +++ b/.ci/docker/docker-compose-system-test.yml @@ -9,7 +9,7 @@ services: ports: - "${HIRS_ACA_PORTAL_PORT}:${HIRS_ACA_PORTAL_CONTAINER_PORT}" entrypoint: /bin/bash -c - command: [HIRS/.ci/setup/setup_aca.sh] + command: [HIRS/.ci/setup/container/setup_aca.sh] hostname: ${HIRS_ACA_HOSTNAME} networks: hirs_aca_system_tests: diff --git a/.ci/setup/setup_aca.sh b/.ci/setup/container/setup_aca.sh similarity index 100% rename from .ci/setup/setup_aca.sh rename to .ci/setup/container/setup_aca.sh diff --git a/.ci/setup/setup_tpm2provisioner.sh b/.ci/setup/container/setup_tpm2provisioner.sh similarity index 67% rename from .ci/setup/setup_tpm2provisioner.sh rename to .ci/setup/container/setup_tpm2provisioner.sh index b5508332..3da44cec 100755 --- a/.ci/setup/setup_tpm2provisioner.sh +++ b/.ci/setup/container/setup_tpm2provisioner.sh @@ -1,13 +1,15 @@ #!/bin/bash ######################################################################################### -# Script to setup the TPM 2.0 Provisioner Docker Image for System Tests -# +# Script to setup the TPM 2.0 Provisioner for System Tests +# Initial setup only use resetTpm2Emulator to reset PCR values in subsequent tests ######################################################################################### set -e pushd / > /dev/null echo "Setting up TPM emulator for the TPM2 Provisioner" -source /HIRS/.ci/setup/tpm2_common.sh +source /HIRS/.ci/setup/container/tpm2_common.sh +mkdir -p /etc/hirs +touch /etc/hirs/tcg_boot.properties # work around for install issues with tcg default values #Wait for the ACA to spin up, if it hasnt already waitForAca @@ -16,7 +18,7 @@ waitForAca installProvisioner # set location of tcg artifacts -setTcgProperties +#setTcgProperties #echo "Contents of /etc/hirs is $(ls -al /etc/hirs)"; # Install TPM 2.0 Emulator @@ -33,4 +35,4 @@ echo "===========HIRS ACA TPM 2.0 Provisioner Setup Complete!===========" popd > /dev/null -tpm2_pcrlist -g sha256 +#tpm2_pcrlist -g sha256 diff --git a/.ci/setup/setup_tpmprovisioner.sh b/.ci/setup/container/setup_tpmprovisioner.sh similarity index 100% rename from .ci/setup/setup_tpmprovisioner.sh rename to .ci/setup/container/setup_tpmprovisioner.sh diff --git a/.ci/setup/tpm2_common.sh b/.ci/setup/container/tpm2_common.sh similarity index 98% rename from .ci/setup/tpm2_common.sh rename to .ci/setup/container/tpm2_common.sh index 2d457e96..10c33eaf 100755 --- a/.ci/setup/tpm2_common.sh +++ b/.ci/setup/container/tpm2_common.sh @@ -1,6 +1,6 @@ #!/bin/bash ######################################################################################### -# Script to setup the TPM 2.0 Provisioner Docker Image for System Tests +# Support scripts for the TPM 2.0 Provisioner System Tests # ######################################################################################### @@ -124,7 +124,7 @@ pkill -f "tpm_server" pushd /ibmtss/utils > /dev/null ./startup - popd + popd > /dev/null tpm2-abrmd -t socket & } diff --git a/.ci/system-tests/container/pc_setup.sh b/.ci/system-tests/container/pc_setup.sh index 6a13a348..d272f93b 100644 --- a/.ci/system-tests/container/pc_setup.sh +++ b/.ci/system-tests/container/pc_setup.sh @@ -2,6 +2,7 @@ ######################################################################################### # Setup for platform certificates for testing # Copies platform certs (Base and Delta) to the tcg directory +# usage pc_setup.sh ######################################################################################### profile=$1 diff --git a/.ci/system-tests/container/rim_setup.sh b/.ci/system-tests/container/rim_setup.sh index f6fba8e1..a3f605e8 100644 --- a/.ci/system-tests/container/rim_setup.sh +++ b/.ci/system-tests/container/rim_setup.sh @@ -1,7 +1,8 @@ #!/bin/bash ######################################################################################### # Setup for PC Client Reference Integrity Manifest (RIM) tests -# +# usage rim_setup.sh