diff options
Diffstat (limited to 'test/end-to-end/remote-execution/native-protocol.sh')
-rw-r--r-- | test/end-to-end/remote-execution/native-protocol.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/end-to-end/remote-execution/native-protocol.sh b/test/end-to-end/remote-execution/native-protocol.sh index aea047ad..bef83e46 100644 --- a/test/end-to-end/remote-execution/native-protocol.sh +++ b/test/end-to-end/remote-execution/native-protocol.sh @@ -23,6 +23,7 @@ readonly LBRDIR="${TEST_TMPDIR}/local-build-root" readonly JUST_MR="${PWD}/bin/mr-tool-under-test" readonly JUST="${PWD}/bin/tool-under-test" readonly RESULT="out.txt" +readonly CREDENTIALS_DIR="${PWD}/credentials" echo echo Create Git repository @@ -84,15 +85,25 @@ echo TREE_ID="$(jq -r ".${OUT_DIRNAME}.id" "${RESULT}" 2>&1)" test ${TREE_ID} ${EQUAL} ${GIT_TREE_ID} +AUTH_ARGS="" if [ "${REMOTE_EXECUTION_ADDRESS:-}" != "" ]; then REMOTE_EXECUTION_ARGS="-r ${REMOTE_EXECUTION_ADDRESS}" if [ "${REMOTE_EXECUTION_PROPERTIES:-}" != "" ]; then REMOTE_EXECUTION_ARGS="${REMOTE_EXECUTION_ARGS} --remote-execution-property ${REMOTE_EXECUTION_PROPERTIES}" fi + if [ -f "${CREDENTIALS_DIR}/ca.crt" ]; then + AUTH_ARGS=" --tls-ca-cert ${CREDENTIALS_DIR}/ca.crt " + if [ -f "${CREDENTIALS_DIR}/client.crt" ]; then + AUTH_ARGS=" --tls-client-cert ${CREDENTIALS_DIR}/client.crt "${AUTH_ARGS} + fi + if [ -f "${CREDENTIALS_DIR}/client.key" ]; then + AUTH_ARGS=" --tls-client-key ${CREDENTIALS_DIR}/client.key "${AUTH_ARGS} + fi + fi echo echo Upload and download Git tree to remote CAS in ${NAME} mode echo - "${JUST}" build -C "${CONF}" --main test test ${REMOTE_EXECUTION_ARGS} --local-build-root="${LBRDIR}" --dump-artifacts "${RESULT}" ${ARGS} 2>&1 + "${JUST}" build -C "${CONF}" --main test test ${REMOTE_EXECUTION_ARGS} ${AUTH_ARGS} --local-build-root="${LBRDIR}" --dump-artifacts "${RESULT}" ${ARGS} 2>&1 TREE_ID="$(jq -r ".${OUT_DIRNAME}.id" "${RESULT}" 2>&1)" test ${TREE_ID} ${EQUAL} ${GIT_TREE_ID} fi |