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

use sh for inner script

parent 6bffb436
......@@ -381,31 +381,30 @@ build_container_script() {
local script_path="$1"
cat >"$script_path" <<'EOF'
#!/usr/bin/env bash
#!/bin/sh
set -euo pipefail
set -eu
TEST_COMMAND="$1"
APP_NAME="$2"
SOURCE_DIR="/work/eepm"
run_eepm() {
bash ./bin/eepm "$@"
./bin/eepm "$@"
}
os_id="unknown"
if [[ -r /etc/os-release ]]; then
# shellcheck disable=SC1091
if [ -r /etc/os-release ]; then
. /etc/os-release
os_id="${ID:-unknown}"
fi
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
exit 3
}
fi
export HOME="/tmp/epm-home"
mkdir -p "$HOME"
......@@ -429,7 +428,7 @@ esac
case "$TEST_COMMAND" in
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
......@@ -470,7 +469,7 @@ run_container_locally() {
--volume "$resolved_source:/work/eepm:ro" \
--volume "$inner_script:/tmp/epm-docker-test-inner.sh:ro" \
"$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
else
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