Make all examples/tests single-file packages.

This commit is contained in:
Sönke Ludwig 2016-10-07 20:36:09 +02:00
parent 84e1934e87
commit 7ba3202460
5 changed files with 18 additions and 12 deletions

View file

@ -1,3 +1,9 @@
/++ dub.sdl:
name "http-server-fibers-example"
description "Simple fiber based pseudo HTTP server suitable for benchmarking"
dependency "eventcore" path=".."
+/
module http_server_fibers_example;
import eventcore.core; import eventcore.core;
import eventcore.internal.utils; import eventcore.internal.utils;

View file

@ -1,4 +0,0 @@
name "http-server-example"
description "Simple pseudo HTTP server suitable for benchmarking"
dependency "eventcore" path="../.."

View file

@ -1,3 +1,9 @@
/++ dub.sdl:
name "http-server-example"
description "Simple pseudo HTTP server suitable for benchmarking"
dependency "eventcore" path=".."
+/
module http_server_example;
import eventcore.core; import eventcore.core;
import eventcore.internal.utils; import eventcore.internal.utils;

View file

@ -1,4 +0,0 @@
name "http-server-example"
description "Simple pseudo HTTP server suitable for benchmarking"
dependency "eventcore" path="../.."

View file

@ -13,14 +13,16 @@ fi
dub test --combined --compiler=$DC dub test --combined --compiler=$DC
if [ ${BUILD_EXAMPLE=1} -eq 1 ]; then if [ ${BUILD_EXAMPLE=1} -eq 1 ]; then
for ex in $(\ls -1 examples/); do for ex in $(\ls -1 examples/*.d); do
echo "[INFO] Building example $ex" echo "[INFO] Building example $ex"
(cd examples/$ex && dub build --compiler=$DC && dub clean) dub build --compiler=$DC --single $ex
done done
rm -rf examples/.dub/
rm examples/*-example
fi fi
if [ ${RUN_TEST=1} -eq 1 ]; then if [ ${RUN_TEST=1} -eq 1 ]; then
for ex in `\ls -1 tests/`; do for ex in `\ls -1 tests/*.d`; do
echo "[INFO] Running test $ex" echo "[INFO] Running test $ex"
(cd tests/$ex && dub --compiler=$DC && dub clean) dub --temp-build --compiler=$DC --single $ex
done done
fi fi