]> andersk Git - libyaml.git/commitdiff
Move Travis CI steps into a Bash script
authorIngy döt Net <ingy@ingy.net>
Thu, 29 Dec 2016 21:19:30 +0000 (15:19 -0600)
committerIan Cordasco <graffatcolmingov@gmail.com>
Fri, 30 Dec 2016 01:09:53 +0000 (19:09 -0600)
This allows us to run the same Travis testing locally.

Examples:

    ./tests/run-tests.sh

.travis.yml
tests/run-tests.sh [new file with mode: 0755]

index dada04bc6774d99eb72cf29aac5a6c463a619b52..e78998662f946688455e8aeb6642b2e2ac06d509 100644 (file)
@@ -8,12 +8,4 @@ compiler:
 - clang
 - gcc
 
-script:
-- ./bootstrap
-- ./configure
-- make test-all
-- make distclean
-- cmake .
-- make
-- make test
-- make clean
+script: tests/run-tests.sh
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
new file mode 100755 (executable)
index 0000000..6ef04a1
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -e
+
+main() {
+  bootstrap
+
+  make test-all
+
+  clean
+
+  cmake .
+
+  make
+  make test
+}
+
+bootstrap() {
+  clean
+
+  ./bootstrap
+  ./configure
+}
+
+clean() {
+  git clean -d -x -f
+  rm -fr libyaml-test
+}
+
+main "$@"
This page took 0.035224 seconds and 5 git commands to generate.