-
Erwan Jahier authored
generation has been stopped in the middle of the process because of an error in order to avoid to run test that will fail for sure.
Erwan Jahier authoredgeneration has been stopped in the middle of the process because of an error in order to avoid to run test that will fail for sure.
Makefile 3.43 KiB
test: ltop clean reftest lus2lic.time
TEST_MACHINE=grivola
# This fixes sporadic memory errors I get when running tests
OCAMLRUNPARAM=s=1M,i=32M,o=150
# ltop is necessary because it is used for the non-reg test and it depends on some src here...
# When I use rdbg -lurette, I can throw that ltop dep away
ltop:
cd .. ; make ltop
copy_extern:
cp -f extern_files/* .
testdir=$(shell pwd)
remote-runtest:
# runtest --all --tool lus2lic --target_board=$(testdir)/board_$(TEST_MACHINE).exp || true
ssh $(TEST_MACHINE) "cd $(testdir) ; export OCAMLRUNPARAM=o=200 ; runtest --all --tool lus2lic" || true
cd $(testdir)
LOG=lus2lic0.log lus2lic1.log lus2lic2.log lus2lic3.log lus2lic4.log
SUM=lus2lic0.sum lus2lic1.sum lus2lic2.sum lus2lic3.sum lus2lic4.sum
lus2lic.sum:
head -n -5 $(SUM) | sed -e 's/[0-9][0-9][0-9][0-9][0-9]//' | sed -e 's/[0-9][0-9][0-9][0-9]//' > lus2lic.sum
tail -n 5 $(SUM) >> lus2lic.sum
.PHONY:lus2lic.diff lus2lic.time lus2lic.sum
lus2lic.diff:
cat lus2lic.log | grep -v "Process " | grep -v "Killing process " | \
grep -v "simec_trap " | grep -v " Version " > lus2lic2.log
mv lus2lic2.log lus2lic.log
diff -U 1 -I "Test Run By" -I "testcase \./lus2lic" -I "runtest completed at" \
-I "This is Lurette Version " \
lus2lic.log.ref lus2lic.log > lus2lic.diff || \
(cat lus2lic.diff; echo "make utest if it is fine"; exit 1)
time:lus2lic.time
lus2lic.time:lus2lic.sum
grep "testcase \./lus2lic" lus2lic*.log > lus2lic.time
echo "* Ref time: " >> lus2lic.time
cat lus2lic.ref_time >> lus2lic.time || true
echo "* Quick time (-j 4):" >> lus2lic.time
cat lus2lic.quick_time >> lus2lic.time || true
cat lus2lic.time >> lus2lic.sum
cat lus2lic.time
.PHONY:lus2lic.time
utest:
cp lus2lic.log lus2lic.log.ref
# reftest isslower than qtest, but less sensible to the load of the machine (wrt time measurements)
reftest:
rm -f $(LOG)
make tmpdirs
time -o lus2lic.ref_time make $(LOG)
make lus2lic.time
qtest:
rm -f $(LOG)
make tmpdirs
time -o lus2lic.quick_time make -j 4 $(LOG)
cat lus2lic.quick_time
make lus2lic.time
tmpdirs:
[ -d tmp ] || mkdir tmp
[ -d tmp1 ] || mkdir tmp1
[ -d tmp2 ] || mkdir tmp2
rm -rf tmp/*
rm -rf tmp1/*
rm -rf tmp2/*
cp -f --preserve=links $(testdir)/* tmp/ || true
cp -f --preserve=links $(testdir)/* tmp1/ || true
cp -f --preserve=links $(testdir)/* tmp2/ || true
test0: rmlus2lic0.log lus2lic0.log
rmlus2lic0.log:
rm -f lus2lic0.log
test1: rmlus2lic1.log lus2lic1.log
rmlus2lic1.log:
rm -f lus2lic1.log
test2: rmlus2lic2.log lus2lic2.log
rmlus2lic2.log:
rm -f lus2lic2.log
test3: rmlus2lic3.log lus2lic3.log
rmlus2lic3.log:
rm -f lus2lic3.log
test4: rmlus2lic4.log lus2lic4.log
rmlus2lic4.log:
rm -f lus2lic4.log
lus2lic0.log:
ssh $(TEST_MACHINE) "cd $(testdir); runtest --tool lus2lic0 lus2lic.tests/test0.exp" || true
lus2lic1.log:
ssh $(TEST_MACHINE) "cd $(testdir); runtest --tool lus2lic1 lus2lic.tests/test1.exp" || true
lus2lic2.log:
ssh $(TEST_MACHINE) "cd $(testdir); runtest --tool lus2lic2 lus2lic.tests/test2.exp" || true
lus2lic3.log:
ssh $(TEST_MACHINE) "cd $(testdir); runtest --tool lus2lic3 lus2lic.tests/test3.exp" || true
lus2lic4.log:
ssh $(TEST_MACHINE) "cd $(testdir); runtest --tool lus2lic4 lus2lic.tests/test4.exp" || true
progression:
ssh $(TEST_MACHINE) "cd $(testdir); runtest --tool lus2lic progression.exp" || true
clean: lclean tmpdirs
lclean:
rm -f *.ec *.lus *.lut *.cov *.gp *.rif *.out *.cov *.c *.h *.log *.sum *time
rm -rf Data