ci-tests.bash 1.21 KB
Newer Older
1 2
#!/bin/bash
set -e
Mart Lubbers's avatar
Mart Lubbers committed
3

4
#Update IDEEnvs
Mart Lubbers's avatar
Mart Lubbers committed
5
if [ -e "$CLEAN_HOME"/etc/IDEEnvs ]; then
6 7
	trap 'mv -v "$CLEAN_HOME"/etc/IDEEnvs{.bak2,}' EXIT
	cp -v "$CLEAN_HOME"/etc/IDEEnvs{,.bak2}
Mart Lubbers's avatar
Mart Lubbers committed
8 9
	sed -i.bak "s|{Application}/lib/iTasks|$(pwd)/Libraries|g" "$CLEAN_HOME"/etc/IDEEnvs
	sed -i.bak 's#EnvironmentLinker:	lib/exe/linker#&:-lmysqlclient -lsqlite3#g' "$CLEAN_HOME"/etc/IDEEnvs
10
    sed -i.bak 's|EnvironmentCompiler:	lib/exe/cocl:|&-h 2048m|g' "$CLEAN_HOME"/etc/IDEEnvs
11
fi
Mart Lubbers's avatar
Mart Lubbers committed
12

13 14 15 16 17 18 19 20 21
#Create BasicAPIExamples
(
	cd Examples
	cp CreateBasicAPIExamples.prj{.default,}
	cpm CreateBasicAPIExamples.prj
	rm CreateBasicAPIExamples.prj
	./CreateBasicAPIExamples.exe > BasicAPIExamples.icl
)

Mart Lubbers's avatar
Mart Lubbers committed
22
#Try to compile everything
23
find . -name "*.prj.default" | while read f; do
24
		cp "$f" "$(dirname $f)/$(basename -s .prj.default $f)".prj
25
	done
26 27 28 29
#Without generic fusion
find . -name "*.prj" -exec dirname {} \; | sort -u | xargs -I{} sh -c\
	"cd {}; cpm make"
#With generic fusion
Mart Lubbers's avatar
Mart Lubbers committed
30
find . -name "*.prj" -not -name "IncidoneCCC.prj" -exec dirname {} \; | sort -u | xargs -I{} sh -c\
31
	"cd {}; sed -i.bak 's/GenericFusion:	False/GenericFusion: True/g' *.prj && cpm make"
Mart Lubbers's avatar
Mart Lubbers committed
32

33
#Run the unit tests
34 35
find Tests/Unit -name "*.prj.default" | sed "s/.prj.default//" | xargs -n 1 cleantest -f human -r