summaryrefslogtreecommitdiffstats
path: root/retiolum
diff options
context:
space:
mode:
authorroot <root@cband>2013-12-30 08:20:32 -0600
committerroot <root@cband>2013-12-30 08:20:32 -0600
commit11de3d6d4c62f7059cdb45992d7d0fec05dde0e4 (patch)
tree898b70e33843b9d2bf77ad2cd1d47501e4fbdf0a /retiolum
parent9712ba4ba0c5ec5922d97c3503b71f6c0cb3cf53 (diff)
//retiolum: make test does now the right thing
Diffstat (limited to 'retiolum')
-rwxr-xr-xretiolum/Makefile24
-rwxr-xr-xretiolum/t/docker/docker_boostrap.sh3
-rw-r--r--[-rwxr-xr-x]retiolum/t/docker/docker_tests/bootstrap0
-rwxr-xr-xretiolum/t/docker/run_tests.sh3
4 files changed, 27 insertions, 3 deletions
diff --git a/retiolum/Makefile b/retiolum/Makefile
index 7942b77c..54683469 100755
--- a/retiolum/Makefile
+++ b/retiolum/Makefile
@@ -28,3 +28,27 @@ startup:
hosts:
bin/update-retiolum-hosts || :;
sudo bin/patch-retiolum-hosts
+
+test:
+ @export PATH="$(CURDIR)/bin:$(PATH)"; \
+ tests="`find t -type f -executable`"; \
+ i=1; \
+ pids="";\
+ n=`echo "$$tests" | wc -l`; \
+ echo $$i..$$n; \
+ for exe in $$tests; do \
+ { \
+ ./$$exe; \
+ ret=$$?; \
+ case $$ret in 0) result=ok;; *) result='not ok';; esac; \
+ echo $$result $$i - $$exe; \
+ exit $$ret;\
+ } & \
+ pids="$${pids} $$!" \
+ i=$$(( i+1 )); \
+ done; \
+ ret=0;\
+ for pid in $$pids; do \
+ wait $$pid || ret=23;\
+ done; \
+ exit $$ret;
diff --git a/retiolum/t/docker/docker_boostrap.sh b/retiolum/t/docker/docker_boostrap.sh
new file mode 100755
index 00000000..7d6907ee
--- /dev/null
+++ b/retiolum/t/docker/docker_boostrap.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd $(dirname $(readlink -f $0))
+docker run -v $PWD/docker_tests/:/test ubuntu /bin/sh /test/bootstrap
diff --git a/retiolum/t/docker/docker_tests/bootstrap b/retiolum/t/docker/docker_tests/bootstrap
index 7d93828a..7d93828a 100755..100644
--- a/retiolum/t/docker/docker_tests/bootstrap
+++ b/retiolum/t/docker/docker_tests/bootstrap
diff --git a/retiolum/t/docker/run_tests.sh b/retiolum/t/docker/run_tests.sh
deleted file mode 100755
index de435730..00000000
--- a/retiolum/t/docker/run_tests.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-cd $(dirname $(readlink -f $0))
-docker run -v $PWD/docker_tests/:/test ubuntu /test/bootstrap