summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-12-06 16:22:56 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-12-06 16:47:37 +0100
commitc9149af8acfe9f016aff783f453e930809a16b95 (patch)
treed70a9f8e0f8f264b6c9e426c96d9e814ce354125
parent8739f2bb6e07321c4e92e5610f92785cae950ff7 (diff)
downloadjustbuild-c9149af8acfe9f016aff783f453e930809a16b95.tar.gz
install-cas cli: Remove remote execution properties and dispatch file...
...options from the generated help messages, as these are not used for the install-cas subcommand. This also updates the man page accordingly, where the dispatch file was marked as supported, as well as update any test affected by these changes.
-rw-r--r--share/man/just.1.md2
-rw-r--r--src/buildtool/common/cli.hpp7
-rw-r--r--src/buildtool/main/cli.cpp11
-rw-r--r--test/end-to-end/remote-execution/install-cas.sh5
-rw-r--r--test/end-to-end/remote-execution/install.sh9
5 files changed, 23 insertions, 11 deletions
diff --git a/share/man/just.1.md b/share/man/just.1.md
index e1e939fd..bc409b2c 100644
--- a/share/man/just.1.md
+++ b/share/man/just.1.md
@@ -539,7 +539,7 @@ format as for the **`-r`** option. The first matching entry (if any) is taken;
if none matches, the default execution endpoint is taken (either
as specified by **`-r`**, or local execution if no endpoint is
specified).
-Supported by: analyse|build|install-cas|install|rebuild|traverse.
+Supported by: analyse|build|install|rebuild|traverse.
Remote serve options
--------------------
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp
index 9c2bc7e2..e6189880 100644
--- a/src/buildtool/common/cli.hpp
+++ b/src/buildtool/common/cli.hpp
@@ -389,13 +389,18 @@ static inline auto SetupCacheArguments(
->type_name("PATH");
}
-static inline auto SetupEndpointArguments(
+static inline auto SetupExecutionEndpointArguments(
gsl::not_null<CLI::App*> const& app,
gsl::not_null<EndpointArguments*> const& clargs) {
app->add_option("-r,--remote-execution-address",
clargs->remote_execution_address,
"Address of the remote-execution service.")
->type_name("NAME:PORT");
+}
+
+static inline auto SetupExecutionPropertiesArguments(
+ gsl::not_null<CLI::App*> const& app,
+ gsl::not_null<EndpointArguments*> const& clargs) {
app->add_option("--endpoint-configuration",
clargs->remote_execution_dispatch_file,
"File with dispatch instructions to use different "
diff --git a/src/buildtool/main/cli.cpp b/src/buildtool/main/cli.cpp
index 494c01d0..e8bc0ffd 100644
--- a/src/buildtool/main/cli.cpp
+++ b/src/buildtool/main/cli.cpp
@@ -37,7 +37,8 @@ auto SetupAnalyseCommandArguments(
SetupLogArguments(app, &clargs->log);
SetupAnalysisArguments(app, &clargs->analysis);
SetupCacheArguments(app, &clargs->endpoint);
- SetupEndpointArguments(app, &clargs->endpoint);
+ SetupExecutionEndpointArguments(app, &clargs->endpoint);
+ SetupExecutionPropertiesArguments(app, &clargs->endpoint);
SetupServeEndpointArguments(app, &clargs->serve);
SetupDiagnosticArguments(app, &clargs->diagnose);
SetupCompatibilityArguments(app);
@@ -51,7 +52,8 @@ auto SetupBuildCommandArguments(
SetupLogArguments(app, &clargs->log);
SetupAnalysisArguments(app, &clargs->analysis);
SetupCacheArguments(app, &clargs->endpoint);
- SetupEndpointArguments(app, &clargs->endpoint);
+ SetupExecutionEndpointArguments(app, &clargs->endpoint);
+ SetupExecutionPropertiesArguments(app, &clargs->endpoint);
SetupServeEndpointArguments(app, &clargs->serve);
SetupCommonAuthArguments(app, &clargs->auth);
SetupClientAuthArguments(app, &clargs->cauth);
@@ -83,7 +85,7 @@ auto SetupInstallCasCommandArguments(
gsl::not_null<CommandLineArguments*> const& clargs) {
SetupCompatibilityArguments(app);
SetupCacheArguments(app, &clargs->endpoint);
- SetupEndpointArguments(app, &clargs->endpoint);
+ SetupExecutionEndpointArguments(app, &clargs->endpoint);
SetupServeEndpointArguments(app, &clargs->serve);
SetupCommonAuthArguments(app, &clargs->auth);
SetupClientAuthArguments(app, &clargs->cauth);
@@ -98,7 +100,8 @@ auto SetupTraverseCommandArguments(
SetupCommonArguments(app, &clargs->common);
SetupLogArguments(app, &clargs->log);
SetupCacheArguments(app, &clargs->endpoint);
- SetupEndpointArguments(app, &clargs->endpoint);
+ SetupExecutionEndpointArguments(app, &clargs->endpoint);
+ SetupExecutionPropertiesArguments(app, &clargs->endpoint);
SetupServeEndpointArguments(app, &clargs->serve);
SetupCommonAuthArguments(app, &clargs->auth);
SetupClientAuthArguments(app, &clargs->cauth);
diff --git a/test/end-to-end/remote-execution/install-cas.sh b/test/end-to-end/remote-execution/install-cas.sh
index 32e34624..d8e53f7d 100644
--- a/test/end-to-end/remote-execution/install-cas.sh
+++ b/test/end-to-end/remote-execution/install-cas.sh
@@ -22,9 +22,10 @@ readonly OUTDIR="${PWD}/out"
LOCAL_ARGS="--local-build-root ${LBRDIR}"
REMOTE_ARGS="${LOCAL_ARGS} -r ${REMOTE_EXECUTION_ADDRESS}"
+REMOTE_PROPS=""
if [ "${REMOTE_EXECUTION_PROPERTIES:-}" != "" ]
then
- REMOTE_ARGS="${REMOTE_ARGS} --remote-execution-property ${REMOTE_EXECUTION_PROPERTIES}"
+ REMOTE_PROPS="--remote-execution-property ${REMOTE_EXECUTION_PROPERTIES}"
fi
if [ -n "${COMPATIBLE:-}" ]
then
@@ -48,7 +49,7 @@ cat > TARGETS <<'EOF'
}
EOF
-"${JUST}" build ${REMOTE_ARGS} --dump-artifacts artifacts.json 2>&1
+"${JUST}" build ${REMOTE_ARGS} ${REMOTE_PROPS} --dump-artifacts artifacts.json 2>&1
echo
cat artifacts.json
OUT="$(jq -r '.out.id' artifacts.json)::t"
diff --git a/test/end-to-end/remote-execution/install.sh b/test/end-to-end/remote-execution/install.sh
index 11eac6c5..4f50a724 100644
--- a/test/end-to-end/remote-execution/install.sh
+++ b/test/end-to-end/remote-execution/install.sh
@@ -28,10 +28,11 @@ readonly OUTDIR_B="${TEST_TMPDIR}/out/instance-B"
readonly OUTDIR_C="${TEST_TMPDIR}/out/instance-C"
REMOTE_EXECUTION_ARGS="-r ${REMOTE_EXECUTION_ADDRESS}"
+REMOTE_EXECUTION_PROPS=""
LOCAL_ARGS=""
if [ "${REMOTE_EXECUTION_PROPERTIES:-}" != "" ]
then
- REMOTE_EXECUTION_ARGS="${REMOTE_EXECUTION_ARGS} --remote-execution-property ${REMOTE_EXECUTION_PROPERTIES}"
+ REMOTE_EXECUTION_PROPS="--remote-execution-property ${REMOTE_EXECUTION_PROPERTIES}"
fi
if [ -n "${COMPATIBLE:-}" ]
then
@@ -57,7 +58,8 @@ cat > TARGETS <<'EOF'
EOF
"${JUST}" build --local-build-root "${LBRDIR_A}" \
- --dump-artifacts "${WRKDIR}/tree.json" ${REMOTE_EXECUTION_ARGS} 2>&1
+ --dump-artifacts "${WRKDIR}/tree.json" \
+ ${REMOTE_EXECUTION_ARGS} ${REMOTE_EXECUTION_PROPS} 2>&1
## instance B should be able to fetch
@@ -164,7 +166,8 @@ EOF
"${JUST}" install --local-build-root "${LBRDIR_C}" \
--remember -o "${OUTDIR_C}/remote" \
- --dump-artifacts "${WRKDIR}/tree.json" ${REMOTE_EXECUTION_ARGS} 2>&1
+ --dump-artifacts "${WRKDIR}/tree.json" \
+ ${REMOTE_EXECUTION_ARGS} ${REMOTE_EXECUTION_PROPS} 2>&1
## now it should also be available for local installation