]> git.parisson.com Git - timeside.git/commitdiff
Travis-CI: make a script for testing for timeside.server
authorThomas Fillon <thomas@parisson.com>
Tue, 20 Jan 2015 13:39:54 +0000 (14:39 +0100)
committerThomas Fillon <thomas@parisson.com>
Tue, 20 Jan 2015 13:39:54 +0000 (14:39 +0100)
.travis.yml
tests/test_server.sh [new file with mode: 0755]

index f8663d749ae8560705455f394bc5d66904b1a1ba..f2c7509ce8d6b8f69b47589d8d1958acfc4746d9 100644 (file)
@@ -58,13 +58,7 @@ script:
     fi
   # -------------SERVER-------------------------
   - if [[ $TEST_TARGET == 'server' ]]; then
-       cd examples/sandbox;
-       ./manage.py syncdb --noinput;
-       ./manage.py migrate;
-       ./manage.py runserver &;
-       TESTPID=$!;
-       sleep 20;
-       kill -2 $TESTPID;
+       ./tests/test_server.sh;
     fi  
 
 after_success:
diff --git a/tests/test_server.sh b/tests/test_server.sh
new file mode 100755 (executable)
index 0000000..7bfd28c
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -e
+
+cd examples/sandbox
+./manage.py syncdb --noinput
+./manage.py migrate
+./manage.py runserver &
+TESTPID=$! 
+sleep 20
+kill -2 $TESTPID