
LTOP=/usr/local/tools/lustre-misc/lurette/i386-linux-gcc3/bin/lurettetop
LTOP=../../../../bin/lurettetop


LURETTETOP=$(LTOP)  --precision 2 \
	  -rp "sut:lutin:trivial.lut:more"  \
	  -rp "env:lutin:trivial.lut:less" \
	  --thick-draw 1 \
	  --draw-inside 0 --draw-edges 0 --draw-vertices 0 --draw-all-vertices  \
	  --step-mode Inside --local-var --no-gnuplot --no-sim2chro  --seed 3  \
	  --do-not-show-step

EXPDIR=`$(LTOP) --ocaml-version`
$(EXPDIR):
	[ -d $(EXPDIR) ] || (mkdir -p $(EXPDIR) ; make utest)



# make test  6.66s user 0.10s system 97% cpu 6.893 total

test.rif:
	rm -f test.rif .lurette_rc
	$(LURETTETOP) --test-length 10000 -go --output test.rif0  && \
	grep -v "lurette chronogram" test.rif0  | \
	grep -v "This is lurette Version" test.rif0  | \
	grep -v "The execution lasted"| sed -e "s/^M//" > test.rif

test:test.rif $(EXPDIR)
	rm -f test.res
	diff -B -u -i  $(EXPDIR)/test.rif.exp test.rif > test.res 
	cat test.res
	[ ! -s test.res ] && make clean
	make clean 

utest:
	cp test.rif $(EXPDIR)/test.rif.exp

clean:
	rm -rf *.ec *.log *~ .*~ *.o *rif0 *rif Data *.pp_luc *.plot *.gp *.dro  *_luciole.c test.res



dontgo:
	rm -f test.rif0 .lurette_rc
	$(LTOP)  --precision 2 \
	  -rp "sut:v6:heater_control.lus:heater_control"  \
	  -rp "env:lutin:env.lut:main"  \
	  --thick-draw 1 \
	  --draw-inside 0 --draw-edges 0 --draw-vertices 0 --draw-all-vertices  \
	  --step-mode Inside --local-var  --no-sim2chro  --seed 3  \
	  --do-not-show-step  env.lut --output test.rif
