Failing travis test matrix
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bin/
|
||||
38
.travis.yml
Normal file
38
.travis.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
language: haxe
|
||||
dist: xenial
|
||||
os:
|
||||
- mac
|
||||
- linux
|
||||
- windows
|
||||
haxe:
|
||||
- stable
|
||||
- development
|
||||
env:
|
||||
- HISS_TARGET=cpp
|
||||
- HISS_TARGET=interp
|
||||
- HISS_TARGET=js
|
||||
- HISS_TARGET=nodejs
|
||||
- HISS_TARGET=py3
|
||||
|
||||
jobs:
|
||||
# Allow Haxe development to fail.
|
||||
allow_failures:
|
||||
- haxe: development
|
||||
fast_finish: true
|
||||
# Check the formatting in a separate job so formatting failures don't hide more important ones
|
||||
include:
|
||||
- script: haxelib install formatter && haxelib run formatter --check -s .
|
||||
os: linux
|
||||
haxe: stable
|
||||
|
||||
install:
|
||||
- if [ "${TRAVIS_OS_NAME}" = "windows" ]; then
|
||||
choco install nodejs-lts --version 12.13.1 -y; export PATH="/c/Program Files/nodejs:$PATH";
|
||||
choco install python --version 3.7.1 -y; export PATH="/c/Python37/Scripts:/c/Python37:$PATH";
|
||||
fi
|
||||
# Magic to make haxelib works https://github.com/HaxeFoundation/neko/issues/196
|
||||
- if [ "${TRAVIS_OS_NAME}" = "windows" ]; then
|
||||
curl -sSLf https://lib.haxe.org/p/jQueryExtern/3.2.1/download/ -o /dev/null;
|
||||
fi
|
||||
|
||||
script: ./test-travis.sh
|
||||
2
src/build-scripts/common-args.hxml
Normal file
2
src/build-scripts/common-args.hxml
Normal file
@@ -0,0 +1,2 @@
|
||||
-cp src
|
||||
-D analyzer-optimize
|
||||
3
src/build-scripts/common-test-args.hxml
Normal file
3
src/build-scripts/common-test-args.hxml
Normal file
@@ -0,0 +1,3 @@
|
||||
src/build-scripts/common-args.hxml
|
||||
-lib utest
|
||||
--main test.TestMain
|
||||
3
src/build-scripts/test/cpp.hxml
Normal file
3
src/build-scripts/test/cpp.hxml
Normal file
@@ -0,0 +1,3 @@
|
||||
src/build-scripts/common-test-args.hxml
|
||||
-cpp bin/cpp/test
|
||||
-cmd bash src/build-scripts/test/cpp.sh
|
||||
2
src/build-scripts/test/cpp.sh
Normal file
2
src/build-scripts/test/cpp.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#! /bin/bash
|
||||
./bin/cpp/test/TestMain
|
||||
2
src/build-scripts/test/interp.hxml
Normal file
2
src/build-scripts/test/interp.hxml
Normal file
@@ -0,0 +1,2 @@
|
||||
src/build-scripts/common-test-args.hxml
|
||||
--interp
|
||||
3
src/build-scripts/test/js.hxml
Normal file
3
src/build-scripts/test/js.hxml
Normal file
@@ -0,0 +1,3 @@
|
||||
src/build-scripts/common-test-args.hxml
|
||||
--js bin/js/test.js
|
||||
--cmd node bin/js/test.js
|
||||
4
src/build-scripts/test/nodejs.hxml
Normal file
4
src/build-scripts/test/nodejs.hxml
Normal file
@@ -0,0 +1,4 @@
|
||||
src/build-scripts/common-test-args.hxml
|
||||
-lib hxnodejs
|
||||
--js bin/nodejs/test.js
|
||||
--cmd node bin/nodejs/test.js
|
||||
3
src/build-scripts/test/py.hxml
Normal file
3
src/build-scripts/test/py.hxml
Normal file
@@ -0,0 +1,3 @@
|
||||
src/build-scripts/common-test-args.hxml
|
||||
--python bin/py/test.py
|
||||
--cmd bash src/build-scripts/test/py.sh
|
||||
8
src/build-scripts/test/py.sh
Normal file
8
src/build-scripts/test/py.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Travis testing on Xenial
|
||||
if [ "$(uname)" = "Linux" ]; then
|
||||
python3 bin/py/test.py
|
||||
else
|
||||
python bin/py/test.py
|
||||
fi
|
||||
13
src/test/TestMain.hx
Normal file
13
src/test/TestMain.hx
Normal file
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
import utest.Runner;
|
||||
import utest.ui.Report;
|
||||
|
||||
class TestMain {
|
||||
public static function main() {
|
||||
var runner = new Runner();
|
||||
runner.addCases(test.cases);
|
||||
Report.create(runner);
|
||||
runner.run();
|
||||
}
|
||||
}
|
||||
10
test-all.sh
Normal file
10
test-all.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#! /bin/bash
|
||||
TEST_FILES=src/build-scripts/test/*.hxml
|
||||
for TEST_FILE in $TEST_FILES
|
||||
do
|
||||
haxe $TEST_FILE
|
||||
if [ ! $? -eq 0 ]
|
||||
then
|
||||
exit $?
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user