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

4
#Update IDEEnvs
5
if [ -w "$CLEAN_HOME"/etc/IDEEnvs ]; then
6
	cp -v "$CLEAN_HOME"/etc/IDEEnvs{,.bak2}
7 8 9
	trap 'mv -v "$CLEAN_HOME"/etc/IDEEnvs{.bak2,}' EXIT
	sed -n -i.bak '/EnvironmentName:\tiTasks/q;p' "$CLEAN_HOME"/etc/IDEEnvs
	tail -n +3 Config/linux-x64/iTasks.env >> "$CLEAN_HOME"/etc/IDEEnvs
Mart Lubbers's avatar
Mart Lubbers committed
10
	sed -i.bak "s|{Application}/lib/iTasks|$(pwd)/Libraries|g" "$CLEAN_HOME"/etc/IDEEnvs
Mart Lubbers's avatar
Mart Lubbers committed
11 12
	sed -i.bak 's#EnvironmentLinker:	lib/exe/linker#&::-lmysqlclient -lsqlite3#g' "$CLEAN_HOME"/etc/IDEEnvs
	sed -i.bak 's|EnvironmentCompiler:	lib/exe/cocl:|&-h 2048m|g' "$CLEAN_HOME"/etc/IDEEnvs
13
fi
Mart Lubbers's avatar
Mart Lubbers committed
14

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

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