Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add --build-only option to complement.sh to prevent actually running Complement. #13158

Merged
merged 4 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/13158.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add support to `complement.sh` for skipping the docker build.
21 changes: 18 additions & 3 deletions scripts-dev/complement.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,35 @@ usage() {
Usage: $0 [-f] <go test arguments>...
Run the complement test suite on Synapse.

-f Skip rebuilding the docker images, and just use the most recent
'complement-synapse:latest' image
-f, --fast
Skip rebuilding the docker images, and just use the most recent
'complement-synapse:latest' image.
Conflicts with --build-only.

--build-only
Only build the Docker images. Don't actually run Complement.
Conflicts with -f/--fast.

For help on arguments to 'go test', run 'go help testflag'.
EOF
}

# parse our arguments
skip_docker_build=""
skip_complement_run=""
while [ $# -ge 1 ]; do
arg=$1
case "$arg" in
"-h")
usage
exit 1
;;
"-f")
"-f"|"--fast")
skip_docker_build=1
;;
"--build-only")
skip_complement_run=1
;;
*)
# unknown arg: presumably an argument to gotest. break the loop.
break
Expand Down Expand Up @@ -106,6 +116,11 @@ if [ -z "$skip_docker_build" ]; then
echo_if_github "::endgroup::"
fi

if [ -n "$skip_complement_run" ]; then
echo "Skipping Complement run as requested."
exit
fi

export COMPLEMENT_BASE_IMAGE=complement-synapse

extra_test_args=()
Expand Down