diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-02-27 11:49:54 +0100 |
---|---|---|
committer | Sascha Roloff <sascha.roloff@huawei.com> | 2023-03-06 17:17:21 +0100 |
commit | eafa806ea012f738789a4a258a10e50f6d9739dd (patch) | |
tree | 67f75b2d1afea5a697ab7498366c025b3e7e4e22 /test/end-to-end/remote-execution/native-protocol.sh | |
parent | 27755862921509cf3d64d730519fad3d0710c0b7 (diff) | |
download | justbuild-eafa806ea012f738789a4a258a10e50f6d9739dd.tar.gz |
Switch shell tests to use just as remote execution endpoint
... and, in this way, ensure the test also tests properly in
absence of an external remote execution system.
Diffstat (limited to 'test/end-to-end/remote-execution/native-protocol.sh')
-rw-r--r-- | test/end-to-end/remote-execution/native-protocol.sh | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/test/end-to-end/remote-execution/native-protocol.sh b/test/end-to-end/remote-execution/native-protocol.sh index 68667dad..0bc2c488 100644 --- a/test/end-to-end/remote-execution/native-protocol.sh +++ b/test/end-to-end/remote-execution/native-protocol.sh @@ -86,24 +86,22 @@ 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}" +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}/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 + if [ -f "${CREDENTIALS_DIR}/client.key" ]; then + AUTH_ARGS=" --tls-client-key ${CREDENTIALS_DIR}/client.key "${AUTH_ARGS} 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} ${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 +echo +echo Upload and download Git tree to remote CAS in ${NAME} mode +echo +"${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} |