Fixing file path for default eventlog in RIM tests. Adding RIM tests to system tests workflow file

This commit is contained in:
iadgovuser62 2024-06-07 11:01:58 -04:00
parent 136f3bfc9f
commit ab6488ca84
3 changed files with 55 additions and 25 deletions

View File

@ -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"

View File

@ -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

View File

@ -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