Skip to content

Commit

Permalink
execute test command using environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed Oct 8, 2019
1 parent f7f4aed commit 95f2889
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/travis/container_verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ fi
echo ">>> VERIFY BUILD CONTAINER <<<"
DIR=$(mktemp -d)
echo "TEST_COMMAND:${TEST_COMMAND}"
echo "${TEST_COMMAND}">"verify.bash"
echo "TRAVIS_BUILD_DIR:${TRAVIS_BUILD_DIR}"
echo "PWD:$(pwd)"
echo "TEST:docker run -v $(pwd):/verify ${IMAGE}:${IMAGE_VERSION} bash -c \"echo ""***ROOT***""; ls /; echo ""***VERIFY***""; ls /verify; cp /verify/verify.bash /; chmod u+x /verify.bash; cd /; ./verify.bash\""
export CONTAINER_OUTPUT=$(docker run -v ${DIR}:/verify ${IMAGE}:${IMAGE_VERSION} bash -c "echo ""***ROOT***""; ls /; echo ""***VERIFY***""; ls /verify; cp /verify/verify.bash /; chmod u+x /verify.bash; cd /; ./verify.bash")
echo "TEST:docker run --env TEST_COMMAND ${IMAGE}:${IMAGE_VERSION} bash -c \"\$(\${TEST_COMMAND})\""
export CONTAINER_OUTPUT=$(docker run --env TEST_COMMAND ${IMAGE}:${IMAGE_VERSION} bash -c "\$(\${TEST_COMMAND})")
echo "CONTAINER_OUTPUT=${CONTAINER_OUTPUT}"

if [[ ! ${CONTAINER_OUTPUT} =~ ${TEST_COMMAND_VERIFY} ]]; then
Expand Down

0 comments on commit 95f2889

Please sign in to comment.