diff --git a/.ci/system-tests/container/rim_setup.sh b/.ci/system-tests/container/rim_setup.sh index a973be19..cf284932 100644 --- a/.ci/system-tests/container/rim_setup.sh +++ b/.ci/system-tests/container/rim_setup.sh @@ -30,8 +30,8 @@ mkdir -p $tcgDir/manifest/swidtag/; # Create the platform cert folder if its no rm -f $tcgDir/manifest/swidtag/*; # clear out any previous data # Step 1: Copy binary_bios_measurement file -if [[ ! -e $eventLog ]]; then - eventLog="$testDir"/laptop_default_binary_bios_measurements +if [ ! -e "$eventLog" ]; then + eventLog="$defaultDir"/laptop_default_binary_bios_measurements fi echo "eventLog used was $eventLog" cp "$eventLog" "$ciTestEventLog" diff --git a/.ci/system-tests/tests/rim_system_tests.sh b/.ci/system-tests/tests/rim_system_tests.sh index 14b951fb..2f7159be 100755 --- a/.ci/system-tests/tests/rim_system_tests.sh +++ b/.ci/system-tests/tests/rim_system_tests.sh @@ -7,34 +7,44 @@ source ./.ci/system-tests/sys_test_common.sh testResult=false totalTests=0; failedTests=0; +test="all" +case $1 in + 1) test="1" ;; + 2) test="2" ;; + 3) test="3" ;; +esac # Start ACA Reference Integrity Manifest Tests # provisionTpm2 takes 1 parameter (the expected result): "pass" or "fail" # Note that the aca_policy_tests have already run several RIM system tests -writeToLogs "### ACA RIM TEST 1: Test a RIM from an OEM and a Supplemental RIM from a VAR ###" -clearAcaDb -uploadTrustedCerts -setPolicyEkPcFw -setPlatformCerts "laptop" "varOsInstall" -setRims "laptop" "varOsInstall" "clear" -provisionTpm2 "pass" - -writeToLogs "### ACA RIM TEST 2: Test a RIM from an OEM with a bad reference measurement and a Supplemental RIM from a VAR ###" -clearAcaDb -uploadTrustedCerts -setPolicyEkPcFw -setPlatformCerts "laptop" "badOemInstall" -setRims "laptop" "badOemInstall" "clear" -provisionTpm2 "fail" - -writeToLogs "### ACA RIM TEST 3: Test a RIM from an OEM and a Supplemental RIM from a VAR with a bad reference measurement ###" -clearAcaDb -uploadTrustedCerts -setPolicyEkPcFw -setPlatformCerts "laptop" "badVarInstall" -setRims "laptop" "badVarInstall" "clear" -provisionTpm2 "fail" +if [ "$test" = "1" ] || [ "$test" = "all" ]; then + writeToLogs "### ACA RIM TEST 1: Test a RIM from an OEM and a Supplemental RIM from a VAR ###" + clearAcaDb + uploadTrustedCerts + setPolicyEkPcFw + setPlatformCerts "laptop" "varOsInstall" + setRims "laptop" "varOsInstall" "clear" + provisionTpm2 "pass" +fi +if [ "$test" = "2" ] || [ "$test" = "all" ]; then + writeToLogs "### ACA RIM TEST 2: Test a RIM from an OEM with a bad reference measurement and a Supplemental RIM from a VAR ###" + clearAcaDb + uploadTrustedCerts + setPolicyEkPcFw + setPlatformCerts "laptop" "badOemInstall" + setRims "laptop" "badOemInstall" "clear" + provisionTpm2 "fail" +fi +if [ "$test" = "3" ] || [ "$test" = "all" ]; then + writeToLogs "### ACA RIM TEST 3: Test a RIM from an OEM and a Supplemental RIM from a VAR with a bad reference measurement ###" + clearAcaDb + uploadTrustedCerts + setPolicyEkPcFw + setPlatformCerts "laptop" "badVarInstall" + setRims "laptop" "badVarInstall" "clear" + provisionTpm2 "fail" +fi # Process Test Results, any single failure will send back a failed result. if [[ $failedTests != 0 ]]; then diff --git a/.github/workflows/system_test.yml b/.github/workflows/system_test.yml index c90a7895..78aa9294 100644 --- a/.github/workflows/system_test.yml +++ b/.github/workflows/system_test.yml @@ -94,6 +94,26 @@ jobs: # shell: bash # run: | # .ci/system-tests/tests/platform_cert_tests.sh + - name: ACA RIM TEST 1 - Test a RIM from an OEM and a Supplemental RIM from a VAR + continue-on-error: true + shell: bash + run: | + .ci/system-tests/tests/rim_system_tests.sh 1 + - name: ACA RIM TEST 2 - Test a RIM from an OEM with a bad reference measurement and a Supplemental RIM from a VAR + continue-on-error: true + shell: bash + run: | + .ci/system-tests/tests/rim_system_tests.sh 2 + - name: ACA RIM TEST 3 - Test a RIM from an OEM and a Supplemental RIM from a VAR with a bad reference measurement + continue-on-error: true + shell: bash + run: | + .ci/system-tests/tests/rim_system_tests.sh 3 + # - name: All RIM System Tests 1-3 + # continue-on-error: true + # shell: bash + # run: | + # .ci/system-tests/tests/rim_system_tests.sh - name: Copy System Test Log files continue-on-error: true shell: bash