summaryrefslogtreecommitdiff
path: root/test.sh
diff options
context:
space:
mode:
authorDan Rue <dan.rue@linaro.org>2017-06-07 16:50:33 -0500
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-06-09 09:54:29 +0000
commitf51ede78c753c1aec86c05d052d8621c0d185b47 (patch)
tree80cebdee1163cdab709823896574aa127785466a /test.sh
parentb592da1307402843b2c0e4bf914fa5f5daf22777 (diff)
test.sh: Support local testing environment
Add Dockerfiles that can build and run test-runner locally. test.sh provides a simple command line interface to the environment. This is just a start. We should be able to start implementing more robust tests and validations on top of test.sh and the 'test' dir. Change-Id: Idc1dc9a8752b244ba0c04427d9eb43ac19863377 Signed-off-by: Dan Rue <dan.rue@linaro.org>
Diffstat (limited to 'test.sh')
-rwxr-xr-xtest.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/test.sh b/test.sh
new file mode 100755
index 0000000..fbe3d1a
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+if [ -z "$1" ] || [ ! -e "test/Dockerfile.${1}" ]; then
+ echo "USAGE: $0 [debian|centos]"
+ exit 1
+fi
+
+python3 validate.py -g -s SC1091
+docker build -f test/Dockerfile."${1}" -t erp-"${1}" . && docker run --rm -it -v "$(pwd)":/work erp-"${1}"
+