heptagon/test/scripts/config
Gwenal Delaval 6011353cec Added test of options
Added script test_option which:
- compile and run without option
- compile with option given as argument, run
- diff on the two outputs, fails if different outputs

config file checks for existence of compiler (fails if not exist)

statics1.ept is a copy of statics.ept ; statics2.ept depends on statics1.ept
instead of statics.ept (so as dependency order => lexical order on file names)
2012-07-19 15:23:40 +02:00

31 lines
481 B
Plaintext

checkdir=_check_builds
shopt -s nullglob
# script de test
COMPILER_DIR="../compiler"
if [ -x $COMPILER_DIR/heptc.native ];
then
COMPILER=heptc.native
else
if [ -x $COMPILER_DIR/heptc.byte ];
then
COMPILER=heptc.byte
else
echo "Error: no compiler found."
exit 2
fi
fi
HEPTC="../$COMPILER_DIR/$COMPILER -stdlib ../../lib"
CC="gcc -std=c99 -I ../../../lib/c"
LD="gcc"
NBSTEP=100
if [ ! -x $checkdir ];
then
mkdir $checkdir
fi