
LURETTETOP=../../../bin/lurettetop

CC=gcc

test1:
	rm -f test1.rif0 .lurette_rc && \
	$(LURETTETOP) --sut tramway.lus --sut-compiler lv6  --oracle-compiler lv6 \
	  -msn controller -go -l 100 --draw-all-formula -td 10 \
	   --draw-inside 1 --compute-poly-volume \
	   --do-not-show-step -o test1.rif0  \
	   --seed 1 -ns2c  \
	   -oracle tramway.lus --main-oracle-node oracle \
	   tramway.luc passager.luc porte.luc passerelle.luc  &&\
	grep -v "lurette chronogram" test1.rif0 | \
	grep -v "The execution lasted" | sed -e "s/^M//" \
	   > test1.rif  &&\
	rm -f test1.res && diff -i -u test1.rif test1.rif.exp \
	   > test1.res
	[ ! -s test1.res ] && make clean 

test2 :
	rm -f test2.rif0 && \
	$(LURETTETOP) -l 100 -go -seed 1  --sut-compiler lv6  --oracle-compiler lv6 \
	 --do-not-show-step -ns2c \
	-sut tramway.lus --main-sut-node controller \
	-oracle tramway.lus --main-oracle-node oracle \
	     tramway.luc \
	     passager.luc \
	     porte.luc \
	     passerelle.luc \
	-o test2.rif0    &&\
	grep -v "lurette chronogram" test2.rif0  | \
	grep -v "The execution lasted"| sed -e "s/^M//" > test2.rif
	rm -f test2.res && diff -u -i  test2.rif test2.rif.exp > test2.res
	[ ! -s test2.res ] && make clean 


test : test1 test2

utest1:
	cp test1.rif test1.rif.exp

utest2:
	cp test2.rif test2.rif.exp

utest: utest1 utest2

clean:
	rm -rf *.ec *.log *~ Data *.pp_luc *.~ *.rif *.rif0



