test scripts use lix for dependencies

This commit is contained in:
2023-04-27 12:22:52 -06:00
parent 18bbd07c12
commit d432ef1993
3 changed files with 8 additions and 56 deletions

View File

@@ -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

View File

@@ -1,40 +1,9 @@
#! /bin/bash
KISS_PROJECT=${KISS_PROJECT:-$1}
KISS_PROJECT=${KISS_PROJECT:-aoc}
KISS_PROJECT=${KISS_PROJECT:-bad-nlp}
./test-env.sh
(cd projects/$KISS_PROJECT && haxelib install all --always --quiet)
# If project folder contains "flixel-", test that its code compiles for HTML5 and C++
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}")
if [ -n "$CI_OS_NAME" ]; then
(cd projects/$KISS_PROJECT && lix download)
fi
(cd projects/$KISS_PROJECT && ./test.sh "${@:2}")

View File

@@ -3,17 +3,14 @@
KISS_TARGET=${KISS_TARGET:-$1}
KISS_TARGET=${KISS_TARGET:-interp}
./test-env.sh
# If Travis is running tests, basic dependencies need to be installed
if [ ! -z "$CI_OS_NAME" ]
if [ -n "$CI_OS_NAME" ]
then
(cd kiss/build-scripts && haxelib install all --always --quiet)
(cd kiss/build-scripts/$KISS_TARGET && haxelib install all --always --quiet)
lix download
fi
# Test projects with test-project.sh
if [ ! -z "$KISS_PROJECT" ]
if [ -n "$KISS_PROJECT" ]
then
./test-project.sh
# Test Kiss with utest cases in kiss/src/test/cases