git @ Cat's Eye Technologies Iphigeneia / 9d79426
This is how we should do builds and tests for Haskell projects. Cat's Eye Technologies 8 years ago
3 changed file(s) with 23 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
0 #!/bin/sh
1
2 if [ -z `which ghc` -a -z x`which runhugs` ]; then
3 echo "Neither ghc nor runhugs found on search path."
4 exit 1
5 fi
6
7 mkdir -p bin
8
9 if [ -z `which ghc` -o ! -z $USE_HUGS ]; then
10 # create script to run with Hugs
11 cat >bin/iphi <<'EOF'
12 #!/bin/sh
13 THIS=`realpath $0`
14 DIR=`dirname $THIS`/../src
15 runhugs $DIR/Main.hs $*
16 EOF
17 chmod 755 bin/iphi
18 else
19 cd src && ghc --make Main.hs -o ../bin/iphi
20 fi
00 #!/bin/sh
11
2 cd src && make iphi && cd ..
3 falderal test tests/Iphigeneia.markdown && echo "All tests passed!"
4 rm -f foo.txt
5 #cd src && make clean && cd ..
2 falderal test tests/Iphigeneia.markdown
33 This test suite is in the format of Falderal version 0.7.
44
55 -> Functionality "Interpret Iphigeneia program" is implemented by
6 -> shell command "src/iphi %(test-file)"
6 -> shell command "bin/iphi %(test-file)"
77
88 -> Tests for functionality "Interpret Iphigeneia program"
99