]> source.dussan.org Git - nextcloud-server.git/commitdiff
Restructure travis tests
authorThomas Müller <thomas.mueller@tmit.eu>
Fri, 18 Dec 2015 15:59:57 +0000 (16:59 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 21 Dec 2015 10:35:48 +0000 (11:35 +0100)
.travis.yml
apps/dav/tests/travis/carddavtester.sh [deleted file]
apps/dav/tests/travis/carddavtester/install.sh [new file with mode: 0644]
apps/dav/tests/travis/carddavtester/script.sh [new file with mode: 0644]
apps/dav/tests/travis/litmus-v1.sh [deleted file]
apps/dav/tests/travis/litmus-v1/install.sh [new file with mode: 0644]
apps/dav/tests/travis/litmus-v1/script.sh [new file with mode: 0644]
apps/dav/tests/travis/litmus-v2.sh [deleted file]
apps/dav/tests/travis/litmus-v2/install.sh [new file with mode: 0644]
apps/dav/tests/travis/litmus-v2/script.sh [new file with mode: 0644]

index c599a0c192bd0ac9c1961ffcae8c12aa877362f8..3f80fdb8458a8b5760a1411858245253755b917f 100644 (file)
@@ -25,12 +25,14 @@ before_install:
 
 install:
   - sh -c "if [ '$TEST_DAV' = '1' ]; then bash tests/travis/install.sh $DB; fi"
+  - sh -c "if [ '$TEST_DAV' = '1' ]; then bash apps/dav/tests/travis/$TC/install.sh; fi"
+
 
 script:
   - sh -c "if [ '$TEST_DAV' != '1' ]; then echo \"Not testing DAV\"; fi"
   - sh -c "if [ '$TEST_DAV' = '1' ]; then echo \"Testing DAV\"; fi"
 
-  - sh -c "if [ '$TEST_DAV' = '1' ]; then bash apps/dav/tests/travis/$TC.sh; fi"
+  - sh -c "if [ '$TEST_DAV' = '1' ]; then bash apps/dav/tests/travis/$TC/script.sh; fi"
 
 matrix:
   include:
diff --git a/apps/dav/tests/travis/carddavtester.sh b/apps/dav/tests/travis/carddavtester.sh
deleted file mode 100644 (file)
index 17f7e8e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env bash
-SCRIPT=`realpath $0`
-SCRIPTPATH=`dirname $SCRIPT`
-
-
-# start the server
-php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../.." &
-
-
-if [ ! -f CalDAVTester/run.py ]; then
-       cd "$SCRIPTPATH"
-    git clone https://github.com/DeepDiver1975/CalDAVTester.git
-       cd "$SCRIPTPATH/CalDAVTester"
-    python run.py -s
-       cd "$SCRIPTPATH"
-fi
-
-# create test user
-cd "$SCRIPTPATH/../../../../"
-OC_PASS=user01 php occ user:add --password-from-env user01
-php occ dav:create-addressbook user01 addressbook
-OC_PASS=user02 php occ user:add --password-from-env user02
-php occ dav:create-addressbook user02 addressbook
-cd "$SCRIPTPATH/../../../../"
-
-# run the tests
-cd "$SCRIPTPATH/CalDAVTester"
-PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onfail -s "$SCRIPTPATH/caldavtest/config/serverinfo.xml" -o cdt.txt \
-       "$SCRIPTPATH/caldavtest/tests/CardDAV/current-user-principal.xml" \
-       "$SCRIPTPATH/caldavtest/tests/CardDAV/sync-report.xml"
-RESULT=$?
-
-tail "$SCRIPTPATH/../../../../data-autotest/owncloud.log"
-
-exit $RESULT
diff --git a/apps/dav/tests/travis/carddavtester/install.sh b/apps/dav/tests/travis/carddavtester/install.sh
new file mode 100644 (file)
index 0000000..fa5d141
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+
+if [ ! -f CalDAVTester/run.py ]; then
+       cd "$SCRIPTPATH"
+    git clone https://github.com/DeepDiver1975/CalDAVTester.git
+       cd "$SCRIPTPATH/CalDAVTester"
+    python run.py -s
+       cd "$SCRIPTPATH"
+fi
+
+# create test user
+cd "$SCRIPTPATH/../../../../../"
+OC_PASS=user01 php occ user:add --password-from-env user01
+php occ dav:create-addressbook user01 addressbook
+OC_PASS=user02 php occ user:add --password-from-env user02
+php occ dav:create-addressbook user02 addressbook
+cd "$SCRIPTPATH/../../../../../"
diff --git a/apps/dav/tests/travis/carddavtester/script.sh b/apps/dav/tests/travis/carddavtester/script.sh
new file mode 100644 (file)
index 0000000..6edd929
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+# start the server
+php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." &
+
+# run the tests
+cd "$SCRIPTPATH/CalDAVTester"
+PYTHONPATH="$SCRIPTPATH/pycalendar/src" python testcaldav.py --print-details-onfail -s "$SCRIPTPATH/../caldavtest/config/serverinfo.xml" -o cdt.txt \
+       "$SCRIPTPATH/../caldavtest/tests/CardDAV/current-user-principal.xml" \
+       "$SCRIPTPATH/../caldavtest/tests/CardDAV/sync-report.xml"
+RESULT=$?
+
+tail "$/../../../../../data-autotest/owncloud.log"
+
+exit $RESULT
diff --git a/apps/dav/tests/travis/litmus-v1.sh b/apps/dav/tests/travis/litmus-v1.sh
deleted file mode 100644 (file)
index ab0690f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-SCRIPT=`realpath $0`
-SCRIPTPATH=`dirname $SCRIPT`
-
-
-# start the server
-php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../.." &
-
-
-# compile litmus
-if [ ! -f /tmp/litmus/litmus-0.13.tar.gz ]; then
-  mkdir -p /tmp/litmus
-  wget -O /tmp/litmus/litmus-0.13.tar.gz http://www.webdav.org/neon/litmus/litmus-0.13.tar.gz
-  cd /tmp/litmus
-  tar -xzf litmus-0.13.tar.gz
-  cd /tmp/litmus/litmus-0.13
-  ./configure
-  make
-fi
-
-# run the tests
-cd /tmp/litmus/litmus-0.13
-make URL=http://127.0.0.1:8888/remote.php/webdav CREDS="admin admin" TESTS="basic copymove props locks" check
diff --git a/apps/dav/tests/travis/litmus-v1/install.sh b/apps/dav/tests/travis/litmus-v1/install.sh
new file mode 100644 (file)
index 0000000..0ee2cb0
--- /dev/null
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+# compile litmus
+if [ ! -f /tmp/litmus/litmus-0.13.tar.gz ]; then
+  mkdir -p /tmp/litmus
+  wget -O /tmp/litmus/litmus-0.13.tar.gz http://www.webdav.org/neon/litmus/litmus-0.13.tar.gz
+  cd /tmp/litmus
+  tar -xzf litmus-0.13.tar.gz
+  cd /tmp/litmus/litmus-0.13
+  ./configure
+  make
+fi
diff --git a/apps/dav/tests/travis/litmus-v1/script.sh b/apps/dav/tests/travis/litmus-v1/script.sh
new file mode 100644 (file)
index 0000000..cba3056
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+
+# start the server
+php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." &
+
+sleep 30
+
+# run the tests
+cd /tmp/litmus/litmus-0.13
+make URL=http://127.0.0.1:8888/remote.php/webdav CREDS="admin admin" TESTS="basic copymove props locks" check
diff --git a/apps/dav/tests/travis/litmus-v2.sh b/apps/dav/tests/travis/litmus-v2.sh
deleted file mode 100644 (file)
index 892ad32..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-SCRIPT=`realpath $0`
-SCRIPTPATH=`dirname $SCRIPT`
-
-
-# start the server
-php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../.." &
-
-
-# compile litmus
-if [ ! -f /tmp/litmus/litmus-0.13.tar.gz ]; then
-  mkdir -p /tmp/litmus
-  wget -O /tmp/litmus/litmus-0.13.tar.gz http://www.webdav.org/neon/litmus/litmus-0.13.tar.gz
-  cd /tmp/litmus
-  tar -xzf litmus-0.13.tar.gz
-  cd /tmp/litmus/litmus-0.13
-  ./configure
-  make
-fi
-
-# run the tests
-cd /tmp/litmus/litmus-0.13
-make URL=http://127.0.0.1:8888/remote.php/dav/files/admin CREDS="admin admin" TESTS="basic copymove props locks" check
diff --git a/apps/dav/tests/travis/litmus-v2/install.sh b/apps/dav/tests/travis/litmus-v2/install.sh
new file mode 100644 (file)
index 0000000..0ee2cb0
--- /dev/null
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+# compile litmus
+if [ ! -f /tmp/litmus/litmus-0.13.tar.gz ]; then
+  mkdir -p /tmp/litmus
+  wget -O /tmp/litmus/litmus-0.13.tar.gz http://www.webdav.org/neon/litmus/litmus-0.13.tar.gz
+  cd /tmp/litmus
+  tar -xzf litmus-0.13.tar.gz
+  cd /tmp/litmus/litmus-0.13
+  ./configure
+  make
+fi
diff --git a/apps/dav/tests/travis/litmus-v2/script.sh b/apps/dav/tests/travis/litmus-v2/script.sh
new file mode 100644 (file)
index 0000000..966ed5a
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+SCRIPT=`realpath $0`
+SCRIPTPATH=`dirname $SCRIPT`
+
+
+# start the server
+php -S 127.0.0.1:8888 -t "$SCRIPTPATH/../../../../.." &
+
+sleep 30
+
+# run the tests
+cd /tmp/litmus/litmus-0.13
+make URL=http://127.0.0.1:8888/remote.php/dav/files/admin CREDS="admin admin" TESTS="basic copymove props locks" check