summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/end-to-end/remote-execution/TARGETS20
-rw-r--r--test/end-to-end/remote-execution/native-protocol.sh34
-rw-r--r--test/end-to-end/remote-execution/upload-test.sh24
-rw-r--r--test/end-to-end/target-cache/TARGETS6
-rw-r--r--test/end-to-end/target-cache/artifacts-sync.sh7
5 files changed, 35 insertions, 56 deletions
diff --git a/test/end-to-end/remote-execution/TARGETS b/test/end-to-end/remote-execution/TARGETS
index f2ba00f5..3574f6db 100644
--- a/test/end-to-end/remote-execution/TARGETS
+++ b/test/end-to-end/remote-execution/TARGETS
@@ -1,35 +1,27 @@
{ "native-protocol":
- { "type": ["@", "rules", "shell/test", "script"]
+ { "type": ["test/end-to-end", "with remote"]
, "name": ["native-protocol"]
, "test": ["native-protocol.sh"]
, "deps":
[ ["test/end-to-end", "tool-under-test"]
, ["test/end-to-end", "mr-tool-under-test"]
- , ["@", "credentials", "", ""]
]
}
, "large-blobs":
- { "type": ["@", "rules", "shell/test", "script"]
+ { "type": ["test/end-to-end", "with remote"]
, "name": ["large-blobs"]
, "test": ["large-blobs.sh"]
- , "deps":
- [["test/end-to-end", "tool-under-test"], ["@", "credentials", "", ""]]
+ , "deps": [["test/end-to-end", "tool-under-test"]]
}
, "upload-test":
- { "type": ["@", "rules", "shell/test", "script"]
+ { "type": ["test/end-to-end", "with remote"]
, "name": ["upload-test"]
, "test": ["upload-test.sh"]
- , "deps":
- [["test/end-to-end", "tool-under-test"], ["@", "credentials", "", ""]]
+ , "deps": [["test/end-to-end", "tool-under-test"]]
}
, "TESTS":
{ "type": "install"
, "tainted": ["test"]
- , "deps":
- [ "native-protocol"
- , "large-blobs"
- , "upload-test"
- , ["@", "credentials", "", ""]
- ]
+ , "deps": ["native-protocol", "large-blobs", "upload-test"]
}
}
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}
diff --git a/test/end-to-end/remote-execution/upload-test.sh b/test/end-to-end/remote-execution/upload-test.sh
index 40d2628b..6a3a2978 100644
--- a/test/end-to-end/remote-execution/upload-test.sh
+++ b/test/end-to-end/remote-execution/upload-test.sh
@@ -59,19 +59,17 @@ export CONF="$(realpath repos.json)"
# Build remotely
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
- "${JUST}" build -C "${CONF}" --local-build-root="${LBRDIR}" ${ARGS} ${REMOTE_EXECUTION_ARGS} ${AUTH_ARGS} 2>&1
fi
+"${JUST}" build -C "${CONF}" --local-build-root="${LBRDIR}" ${ARGS} ${REMOTE_EXECUTION_ARGS} ${AUTH_ARGS} 2>&1
diff --git a/test/end-to-end/target-cache/TARGETS b/test/end-to-end/target-cache/TARGETS
index 83af5993..fb3b42b9 100644
--- a/test/end-to-end/target-cache/TARGETS
+++ b/test/end-to-end/target-cache/TARGETS
@@ -1,15 +1,14 @@
{ "target-cache-hit":
- { "type": ["@", "rules", "shell/test", "script"]
+ { "type": ["test/end-to-end", "with remote"]
, "name": ["target-cache-hit"]
, "test": ["target-cache-hit.sh"]
, "deps":
[ ["test/end-to-end", "tool-under-test"]
, ["test/end-to-end", "mr-tool-under-test"]
- , ["@", "credentials", "", ""]
]
}
, "artifacts-sync":
- { "type": ["@", "rules", "shell/test", "script"]
+ { "type": ["test/end-to-end", "with remote"]
, "name": ["artifacts-sync"]
, "test": ["artifacts-sync.sh"]
, "deps":
@@ -17,7 +16,6 @@
, ["./", "test-data-artifacts-sync", "greetlib"]
, ["./", "test-data-artifacts-sync", "pydicts"]
, "bootstrap-src-staged"
- , ["@", "credentials", "", ""]
]
}
, "bootstrap-src-staged":
diff --git a/test/end-to-end/target-cache/artifacts-sync.sh b/test/end-to-end/target-cache/artifacts-sync.sh
index fb4b7c0b..0767d2be 100644
--- a/test/end-to-end/target-cache/artifacts-sync.sh
+++ b/test/end-to-end/target-cache/artifacts-sync.sh
@@ -59,13 +59,6 @@ readonly LBRDIR="$TEST_TMPDIR/local-build-root"
readonly TESTDIR="$TEST_TMPDIR/test-root"
readonly CREDENTIALS_DIR="${PWD}/credentials"
-if [ "${REMOTE_EXECUTION_ADDRESS:-}" = "" ]; then
- echo
- echo "Test skipped, since no remote execution is specified."
- echo
- return
-fi
-
REMOTE_EXECUTION_ARGS="-r $REMOTE_EXECUTION_ADDRESS"
if [ "${REMOTE_EXECUTION_PROPERTIES:-}" != "" ]; then
REMOTE_EXECUTION_ARGS="$REMOTE_EXECUTION_ARGS --remote-execution-property $REMOTE_EXECUTION_PROPERTIES"