Commit 6ceb27f2 authored by Ivan Mazhukin's avatar Ivan Mazhukin

use sh for inner script

parent 6bffb436
...@@ -381,31 +381,30 @@ build_container_script() { ...@@ -381,31 +381,30 @@ build_container_script() {
local script_path="$1" local script_path="$1"
cat >"$script_path" <<'EOF' cat >"$script_path" <<'EOF'
#!/usr/bin/env bash #!/bin/sh
set -euo pipefail set -eu
TEST_COMMAND="$1" TEST_COMMAND="$1"
APP_NAME="$2" APP_NAME="$2"
SOURCE_DIR="/work/eepm" SOURCE_DIR="/work/eepm"
run_eepm() { run_eepm() {
bash ./bin/eepm "$@" ./bin/eepm "$@"
} }
os_id="unknown" os_id="unknown"
if [[ -r /etc/os-release ]]; then if [ -r /etc/os-release ]; then
# shellcheck disable=SC1091
. /etc/os-release . /etc/os-release
os_id="${ID:-unknown}" os_id="${ID:-unknown}"
fi fi
printf '[container] bootstrap: os_id=%s\n' "$os_id" >&2 printf '[container] bootstrap: os_id=%s\n' "$os_id" >&2
[[ -f "$SOURCE_DIR/bin/eepm" ]] || { if [ ! -f "$SOURCE_DIR/bin/eepm" ]; then
printf '[container] eepm tree does not contain ./bin/eepm\n' >&2 printf '[container] eepm tree does not contain ./bin/eepm\n' >&2
exit 3 exit 3
} fi
export HOME="/tmp/epm-home" export HOME="/tmp/epm-home"
mkdir -p "$HOME" mkdir -p "$HOME"
...@@ -429,7 +428,7 @@ esac ...@@ -429,7 +428,7 @@ esac
case "$TEST_COMMAND" in case "$TEST_COMMAND" in
play) play)
exec bash ./bin/eepm play --auto "$APP_NAME" exec ./bin/eepm play --auto "$APP_NAME"
;; ;;
*) *)
printf '[container] unsupported test command: %s\n' "$TEST_COMMAND" >&2 printf '[container] unsupported test command: %s\n' "$TEST_COMMAND" >&2
...@@ -470,7 +469,7 @@ run_container_locally() { ...@@ -470,7 +469,7 @@ run_container_locally() {
--volume "$resolved_source:/work/eepm:ro" \ --volume "$resolved_source:/work/eepm:ro" \
--volume "$inner_script:/tmp/epm-docker-test-inner.sh:ro" \ --volume "$inner_script:/tmp/epm-docker-test-inner.sh:ro" \
"$SYSTEM_IMAGE" \ "$SYSTEM_IMAGE" \
bash /tmp/epm-docker-test-inner.sh "$COMMAND" "$APP_NAME"; then sh /tmp/epm-docker-test-inner.sh "$COMMAND" "$APP_NAME"; then
status=0 status=0
else else
status=$? status=$?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment