4
TODELETE = $(TEST).export $(TEST).comm test.py stanley.py pyobj cmdline pystan base_results P1
6
include ../Makefile.inc
9
@echo 'DEBUT()' > $(TEST).tmp
10
@echo 'P1 = 9999' >> $(TEST).tmp
11
@echo 'print "PARAMETER=", P1' >> $(TEST).tmp
12
@echo 'open("./REPE_OUT/parameter", "w").write("PARAMETER=%s\\n" % P1)' >> $(TEST).tmp
13
@echo 'FIN()' >> $(TEST).tmp
16
cmdline: $(TEST).export $(TEST).comm
17
$(as_run) $< > output.1.$@ 2> error.1.$@
18
@grep EXIT_CODE output.1.$@ > $@
20
pyobj: $(TEST).export $(TEST).comm test.py
21
$(PYTHONEXECUTABLE) test.py > output.2.$@ 2> error.2.$@
22
@grep EXIT_CODE output.2.$@ > $@
26
pystan: $(TEST).export base_results stanley.py
27
$(PYTHONEXECUTABLE) stanley.py > output.3.$@ 2> error.3.$@
28
@grep EXIT_CODE output.3.$@ > $@
30
unittest: cmdline pyobj pystan
31
@echo "EXIT_CODE=0" > exit_code.tmp
32
@if [ `grep -c EXIT_CODE=0 cmdline` -ne 1 ] || \
33
[ `grep -c EXIT_CODE=0 pyobj` -ne 1 ] || \
34
[ `grep -c EXIT_CODE=0 pystan` -ne 1 ]; then \
35
echo "EXIT_CODE=104" > exit_code.tmp; \
37
@mv -f exit_code.tmp $@