Skip to content
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
2 changes: 1 addition & 1 deletion tests/docker/client
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ fi
echo READY

if [[ -f /common/user_script ]]; then
/common/user_script
/common/user_script $(cat /common/user_script_args 2>/dev/null)
fi
8 changes: 8 additions & 0 deletions tests/docker/runit
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -e
nodeprefix="m"

script_args=()
while [[ $1 = -* ]]; do
if [[ "$1" = "-s" ]] || [[ "$1" = "--source" ]]; then
shift
Expand All @@ -19,6 +20,9 @@ while [[ $1 = -* ]]; do
elif [[ "$1" = "-f" ]] || [[ "$1" = "--file" ]]; then
shift
script=$1
elif [[ "$1" = "-a" ]] || [[ "$1" = "--file-arg" ]]; then
shift
script_args+=("$1")
fi
shift
done
Expand Down Expand Up @@ -59,6 +63,10 @@ if [[ "$script" != "" ]]; then
cp $script common/user_script
chmod +x common/user_script
fi
if ((${#script_args[@]} > 0)); then
printf '%s ' "${script_args[@]}" > common/user_script_args
fi

docker build -t comdb2test:$prefix -f $src/tests/docker/Dockerfile.install $src

echo $cluster >common/cluster
Expand Down