test scripts use lix for dependencies
This commit is contained in:
14
test-env.sh
14
test-env.sh
@@ -1,14 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
haxelib dev kiss kiss
|
|
||||||
|
|
||||||
# Every project with a haxelib.json should be made available to every other project/unit test
|
|
||||||
projects=$(ls projects)
|
|
||||||
for project in $projects
|
|
||||||
do
|
|
||||||
if [ -e projects/${project}/haxelib.json ]
|
|
||||||
then
|
|
||||||
haxelib dev $project projects/$project
|
|
||||||
# the word project has lost all meaning at this point
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
@@ -1,40 +1,9 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
KISS_PROJECT=${KISS_PROJECT:-$1}
|
KISS_PROJECT=${KISS_PROJECT:-$1}
|
||||||
KISS_PROJECT=${KISS_PROJECT:-aoc}
|
KISS_PROJECT=${KISS_PROJECT:-bad-nlp}
|
||||||
|
|
||||||
./test-env.sh
|
if [ -n "$CI_OS_NAME" ]; then
|
||||||
(cd projects/$KISS_PROJECT && haxelib install all --always --quiet)
|
(cd projects/$KISS_PROJECT && lix download)
|
||||||
|
fi
|
||||||
# If project folder contains "flixel-", test that its code compiles for HTML5 and C++
|
(cd projects/$KISS_PROJECT && ./test.sh "${@:2}")
|
||||||
if [[ $KISS_PROJECT == *flixel-* ]]
|
|
||||||
then
|
|
||||||
# If running through Travis, install HaxeFlixel with c++ tooling
|
|
||||||
if [ ! -z "CI_OS_NAME" ]
|
|
||||||
then
|
|
||||||
haxelib install lime --quiet
|
|
||||||
haxelib install openfl --quiet
|
|
||||||
haxelib install flixel --quiet
|
|
||||||
haxelib install flixel-addons --quiet
|
|
||||||
haxelib install flixel-ui --quiet
|
|
||||||
haxelib install hxcpp --quiet
|
|
||||||
haxelib install svg --quiet
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if "desktop-" is in the project name, only test for C++
|
|
||||||
if [[ $KISS_PROJECT == *desktop-* ]]
|
|
||||||
then
|
|
||||||
(cd projects/$KISS_PROJECT && echo "Building $KISS_PROJECT for cpp" && haxelib run lime build cpp)
|
|
||||||
# if "web-" is in the project name, only test for HTML5
|
|
||||||
elif [[ $KISS_PROJECT == *web-* ]]
|
|
||||||
then
|
|
||||||
(cd projects/$KISS_PROJECT && echo "Building $KISS_PROJECT for html5" && haxelib run lime build html5)
|
|
||||||
# Otherwise require both to succeed
|
|
||||||
else
|
|
||||||
(cd projects/$KISS_PROJECT && echo "Building $KISS_PROJECT for html5" && haxelib run lime build html5) && \
|
|
||||||
(cd projects/$KISS_PROJECT && echo "Building $KISS_PROJECT for cpp" && haxelib run lime build cpp)
|
|
||||||
fi
|
|
||||||
# Test other projects with their test.sh file
|
|
||||||
else
|
|
||||||
(cd projects/$KISS_PROJECT && ./test.sh "${@:2}")
|
|
||||||
fi
|
|
||||||
9
test.sh
9
test.sh
@@ -3,17 +3,14 @@
|
|||||||
KISS_TARGET=${KISS_TARGET:-$1}
|
KISS_TARGET=${KISS_TARGET:-$1}
|
||||||
KISS_TARGET=${KISS_TARGET:-interp}
|
KISS_TARGET=${KISS_TARGET:-interp}
|
||||||
|
|
||||||
./test-env.sh
|
|
||||||
|
|
||||||
# If Travis is running tests, basic dependencies need to be installed
|
# If Travis is running tests, basic dependencies need to be installed
|
||||||
if [ ! -z "$CI_OS_NAME" ]
|
if [ -n "$CI_OS_NAME" ]
|
||||||
then
|
then
|
||||||
(cd kiss/build-scripts && haxelib install all --always --quiet)
|
lix download
|
||||||
(cd kiss/build-scripts/$KISS_TARGET && haxelib install all --always --quiet)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Test projects with test-project.sh
|
# Test projects with test-project.sh
|
||||||
if [ ! -z "$KISS_PROJECT" ]
|
if [ -n "$KISS_PROJECT" ]
|
||||||
then
|
then
|
||||||
./test-project.sh
|
./test-project.sh
|
||||||
# Test Kiss with utest cases in kiss/src/test/cases
|
# Test Kiss with utest cases in kiss/src/test/cases
|
||||||
|
|||||||
Reference in New Issue
Block a user