HIRS/.ci/system-tests/container/efi_setup.sh
5B96790E3664F40075A67E6ADF737EDB15B4408DBC91A81228B31537B0CE3E26 7c99b81b10
supplychainvalidationsummary will look up rims by ID (#805)
* Lookup here needed summary id from device object

* Portal linkage issue

* CertificatesUsed not working properly with RIM

* Maybe need to link to base rim

* Rim test 1 needed hw file

* Working on CI

* Connecting new tpm2_common

* Edited the way scripts called in docker exec

* TPM for reset each test

* Defining efi paths in CI env file

* Forgot to close while loops

* Connecting default test files

* Variable was wrong [no ci]

* Added ACA tests using uploaded artifacts

* Trying to chmod rim_setup.sh

* rim_setup chmod issues

* Added aca tests 9 and 10 to workflow

* Added cases 9 and 10 for aca policy tests

* Exit test scripts with error if one test fails

* Attempt to solve uploaded rim linkup

* Try only setting tagId if not null

* updateSupportRimInfo was not setting associated rim on base

* Attempt alternate lookup of rim by device name

* Trouble with event log archived

* Used wrong variable

* Fix spotbugs

* Try again

* Change SupplyChainValidation.message size to MAX_MESSAGE_LENGTH
2024-07-22 06:03:09 -04:00

53 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
#########################################################################################
# Setup a local directory to act as the ESP for testing
# This just creates the directory structure.
# usage efi_setup.sh [-c] [-p] [-r]
# -c: clear all artifact directories
# -p: clear only the platform directory
# -r: clear only the rim directories
#########################################################################################
# Load env variables
. /hirs/.ci/docker/.env
# Process parameters Argument handling
POSITIONAL_ARGS=()
ORIGINAL_ARGS=("$@")
while [[ $# -gt 0 ]]; do
case $1 in
-c|--clear-all)
CLEAR_ALL=YES
shift # past argument
;;
-p|--clear-platform)
CLEAR_PLATFORM=YES
shift # past argument
;;
-r|--clear-rim)
CLEAR_RIM=YES
shift # past argument
;;
*)
POSITIONAL_ARGS+=("$1") # save positional arg
# shift # past argument
break
;;
esac
done
# Ensure file structure is there
mkdir -p $HIRS_CI_EFI_PATH_PLATFORM
mkdir -p $HIRS_CI_EFI_PATH_RIM
mkdir -p $HIRS_CI_EFI_PATH_SWIDTAG
# Clear out any previous artifacts
if [ "$CLEAR_ALL" = YES ] || [ "$CLEAR_PLATFORM" = YES ] ; then
rm -f $HIRS_CI_EFI_PATH_PLATFORM/*
fi
if [ "$CLEAR_ALL" = YES ] || [ "$CLEAR_RIM" = YES ] ; then
rm -f $HIRS_CI_EFI_PATH_RIM/*
rm -f $HIRS_CI_EFI_PATH_SWIDTAG/*
fi