define test_xml_rule =
%_test_driver_$1.xml : %_test_driver_$1.comm $$(realpath $$(*).py)
- echo -e "\n\n------ $$(*)_driver.py ----------\n"
@echo -e "\n\n------ Generate xml test file $$(@) ------\n"
@[[ -f $$(*).py ]] || (echo "Le fichier catalogue $$(*).py est introuvable" && false)
+ @[[ -f $$(*)_driver.py ]] || (echo "Le fichier driver $$(*)_driver.py est introuvable" && false)
$(tooldir)/generateXML.py -c $$(abspath $$(*).py) $$<
endef
chmod +x $$(<:%.comm=%.py);
endef
+define test_comm_rule =
+%_test_driver_$1_modified.comm : %_test_driver_$1.xml
+ @echo -e "\n\n------ Generate modified.comm file $$(@) ------\n"
+ @[[ -f $$(*).py ]] || (echo "Le fichier catalogue $$(*).py est introuvable" && false)
+ @[[ -f $$(*)_driver.py ]] || (echo "Le fichier driver $$(*)_driver.py est introuvable" && false)
+ $(tooldir)/generateComm.py -x -c $$(abspath $$(*).py) -o $$(@) $$<
+endef
+
#Définition des règles de construction pour les tests
#$(eval $(call test_driver_rule,0))
#$(eval $(call test_driver_rule,1))
$(foreach it,0 1 2 3 4 5 6 7 8 9, $(eval $(call test_xml_rule,$(it))) )
$(foreach it,0 1 2 3 4 5 6 7 8 9, $(eval $(call test_driver_rule,$(it))) )
+$(foreach it,0 1 2 3 4 5 6 7 8 9, $(eval $(call test_comm_rule,$(it))) )
#test_driver_xml:= $(patsubst %.comm,%.xml,$(wildcard *_test_driver_?.comm))
#test_driver_py:= $(patsubst %.comm,%.py,$(wildcard *_test_driver_?.comm))
new_test_driver_xml:= $(foreach it,$(cata_basename), $(patsubst %.comm,%.xml,$(wildcard $(it)_test_driver_?.comm)) )
new_test_driver_py:= $(foreach it,$(cata_basename), $(patsubst %.comm,%.py,$(wildcard $(it)_test_driver_?.comm)) )
+new_test_driver_comm:= $(foreach it,$(cata_basename), $(patsubst %.comm,%_modified.comm,$(wildcard $(it)_test_driver_?.comm)) )
#$(info $(new_test_driver_xml) "----" $(cata_basename) )
#$(info $(new_test_driver_py) "----" $(cata_basename) )
################# REGLES DE TESTS ########################
-testAll: exec.sh driverAll $(new_test_driver_py) $(new_test_driver_xml)
+testAll: exec.sh driverAll $(new_test_driver_py) $(new_test_driver_xml) $(new_test_driver_comm)
for i in $(new_test_driver_py) ; do echo -e "\n\n------ Launching $$i ------" && ./exec.sh python3 $$i ; done
# for i in `ls *_test_driver*.py` ; do echo -e "\n\n------ Launching $$i ------" && ./exec.sh python $$i || break ; done
clean:
rm -f *.pyc *~ qtEficas.sh exec.sh environ.sh
rm -rf raw binding.py __pycache__
- rm -f $(xsd_files) $(driver_files) *test_driver_?.py *test_driver_?.xml
+ rm -f $(xsd_files) $(driver_files) *test_driver_?.py *test_driver_?.xml *test_driver_?_modified.comm
cleantest:
- rm -f *test_driver_?.py *test_driver_?.xml
+ rm -f *test_driver_?.py *test_driver_?.xml *test_driver_?_modified.comm