git @ Cat's Eye Technologies Quylthulg / 9a3ce41
build.sh script to build executables in bin, run tests with them. Chris Pressey 5 years ago
5 changed file(s) with 37 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
0 *.hi
1 *.o
2 bin/*
0 syntax: glob
1
2 *.hi
3 *.o
4 bin/*
0 #!/bin/sh
1
2 PROG=qlzqqlzuup
3
4 if [ x`which ghc` = x -a x`which runhugs` = x ]; then
5 echo "Neither ghc nor runhugs found on search path."
6 exit 1
7 fi
8
9 mkdir -p bin
10
11 if [ x`which ghc` = x -o ! x$USE_HUGS = x ]; then
12 # create script to run with Hugs
13 cat >bin/$PROG <<'EOF'
14 #!/bin/sh
15 THIS=`realpath $0`
16 DIR=`dirname $THIS`/../src
17 runhugs $DIR/Main.hs $*
18 EOF
19 chmod 755 bin/$PROG
20 else
21 cd src && ghc --make Main.hs -o ../bin/$PROG
22 fi
00 #!/bin/sh
11
2 if [ x`which ghc` = x -a x`which runhugs` = x ]; then
3 echo "Neither ghc nor runhugs found on search path"
4 exit 1
5 fi
2 ./build.sh || exit 1
63
7 touch fixture.markdown
8
9 if [ ! x`which ghc` = x ]; then
10 cat >>fixture.markdown <<EOF
11 -> Functionality "Interpret Quylthulg Program" is implemented by
12 -> shell command
13 -> "ghc src/Qlzqqlzuup.hs -e "do c <- readFile \"%(test-body-file)\"; putStr $ showRun c""
14
15 EOF
16 fi
17
18 if [ ! x`which runhugs` = x ]; then
19 cat >>fixture.markdown <<EOF
20 -> Functionality "Interpret Quylthulg Program" is implemented by
21 -> shell command
22 -> "runhugs src/Main.hs %(test-body-file)"
23
24 EOF
25 fi
26
27 falderal fixture.markdown tests/Quylthulg.markdown
28 RESULT=$?
29 rm -f fixture.markdown
30 exit $RESULT
4 falderal tests/Quylthulg.markdown
88 ---------------
99
1010 -> Tests for functionality "Interpret Quylthulg Program"
11
12 -> Functionality "Interpret Quylthulg Program" is implemented by
13 -> shell command
14 -> "bin/qlzqqlzuup %(test-body-file)"
1115
1216 Integer expressions.
1317 --------------------