File: library

package info (click to toggle)
menhir 20201216-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,056 kB
  • sloc: ml: 23,365; makefile: 181; sh: 95; lisp: 8
file content (21 lines) | stat: -rwxr-xr-x 478 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -e

this=library
indir=debian/tests/calc-inspection
outdir=${ADT_ARTIFACTS:-/tmp}/${this}
mkdir -p ${outdir}

cp ${indir}/* ${outdir}
cd ${outdir}
echo "* compiling to bytecode"
make --quiet byte
echo "* running bytecode"
[ $(echo "(1 + 2 * 10) * 2" | ./calc.byte) -eq '42' ]

if [ -x /usr/bin/ocamlopt ]
then
    echo "* compiling to native code"
    make --quiet native
    echo "* running native code"
    [ $(echo "(1 + 2 * 10) * 2" | ./calc.native) -eq '42' ]
fi