fix(build): make example test script compatible with container build targets
This commit is contained in:
parent
ea562fa143
commit
bbadd3e82c
6
run.mk
6
run.mk
|
@ -32,11 +32,13 @@ test-rules: build-bundle
|
|||
--tag salty-dog > /dev/null || exit 1; \
|
||||
done
|
||||
|
||||
DOCKER_OPTIONS ?=
|
||||
|
||||
local-alpine:
|
||||
docker run --rm -v "$(shell pwd):/salty-dog" -w /salty-dog node:16-stretch make ci
|
||||
docker run $(DOCKER_OPTIONS) --rm -v "$(shell pwd):/salty-dog" -w /salty-dog node:16-alpine sh -c "apk add build-base git && make ci"
|
||||
|
||||
local-stretch:
|
||||
docker run --rm -v "$(shell pwd):/salty-dog" -w /salty-dog node:16-alpine sh -c "apk add build-base git && make ci"
|
||||
docker run $(DOCKER_OPTIONS) --rm -v "$(shell pwd):/salty-dog" -w /salty-dog node:16-stretch bash -c "make ci"
|
||||
|
||||
local-chown-leaks: ## clean up root-owned files the containers may leak
|
||||
sudo chown -R ${USER}:${USER} $(ROOT_PATH)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /bin/bash
|
||||
#! /bin/sh
|
||||
|
||||
PROJECT="${ROOT_PATH}"
|
||||
PARENT="$(dirname "${PROJECT}")"
|
||||
|
|
|
@ -35,8 +35,9 @@ do
|
|||
2> ${STDERR_PATH}
|
||||
|
||||
ACTUAL_STATUS=$?
|
||||
echo "Test status: ${ACTUAL_STATUS}"
|
||||
|
||||
if [[ -s ${STDOUT_PATH} ]];
|
||||
if [ -s ${STDOUT_PATH} ];
|
||||
then
|
||||
echo "Test output:"
|
||||
echo "==="
|
||||
|
@ -46,7 +47,7 @@ do
|
|||
echo "==="
|
||||
fi
|
||||
|
||||
if [[ -s ${STDERR_PATH} ]];
|
||||
if [ -s ${STDERR_PATH} ];
|
||||
then
|
||||
echo "Test errors:"
|
||||
echo "==="
|
||||
|
@ -56,8 +57,6 @@ do
|
|||
echo "==="
|
||||
fi
|
||||
|
||||
echo "Test status: ${ACTUAL_STATUS}"
|
||||
|
||||
if [ "${ACTUAL_STATUS}" != "${EXPECTED_STATUS}" ];
|
||||
then
|
||||
echo "Exit status does not match! (expected ${EXPECTED_STATUS}, got ${ACTUAL_STATUS})"
|
||||
|
|
Loading…
Reference in New Issue