HIRS/.ci/system-tests/systems-test.core.sh
busaboy1340 a2497c064c
[#88] Integrate System Tests with Dockerized TPM 1.2 Provisioner (#208)
* Initial system test for TPM 1.2 emulator.

* Update .travis.yml file.

* Added system test: test_20_tpm_1_2_initial_provision

* Cleaned up files.

* Correct docker location

* Re-arranged system tests.

* Execute test_12_attestation_ca_portal_online for all current collectors.

* Clean up files.

* Cleaned up files.

* Cleaned up files.

* Cleaned up files.

* Cleaned up files

* Updated system test driver.

* Set logging properties to DEBUG.

* Commented out test_13_tpm_1_2_initial_provision. Need to fix it.
2019-12-23 05:28:26 -05:00

29 lines
780 B
Bash
Executable File

#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
TEST_LOG=$SCRIPT_DIR/test_logs/system_test_$CLIENT_OS.log
LOG_LEVEL=logging.INFO
export CLIENT_HOSTNAME CLIENT_OS TPM_VERSION ENABLED_COLLECTORS TEST_LOG LOG_LEVEL
# Prepare log file directory
rm -rf $SCRIPT_DIR/test_logs
mkdir -p $SCRIPT_DIR/test_logs
# Run system tests
echo "===========Running systems tests on ${SERVER_HOSTNAME} and ${CLIENT_HOSTNAME}==========="
TEST_OUTPUT=$SCRIPT_DIR/test_logs/test_output$$.txt
python $SCRIPT_DIR/system_test.py 2>&1 | tee $TEST_OUTPUT
SYSTEM_TEST_EXIT_CODE=$PIPESTATUS
# Check result
if [[ $SYSTEM_TEST_EXIT_CODE == 0 ]]
then
echo "SUCCESS: System tests TPM $TPM_VERSION passed"
exit 0
fi
echo "ERROR: System tests TPM $TPM_VERSION failed"
exit 1