Ignore:
Timestamp:
May 28, 2013, 11:17:14 AM (11 years ago)
Author:
meunier
Message:

Tried to clean the test_regression directory:

  • Code formatting
  • Supressed warnings
  • Made comprehensible outputs
  • Factorized Makefiles

There's still a lot to do (many tests don't pass for either good or bad reasons)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sources/test_regression/29032005/Makefile

    r18 r55  
     1
    12include ../env.mk
     3SIGNAL_GRAPH = signal_graph.dot
     4PROCESS_ORDER = process_order.dot
     5MODULE_GRAPH = module_graph.dot
     6PORT_GRAPH = port_graph.dot
     7SIGNAL_ORDER = signal_order.txt
     8ERASE = $(SIGNAL_GRAPH) $(PROCESS_ORDER) $(SIGNAL_ORDER) $(MODULE_GRAPH) $(PORT_GRAPH)
     9include ../Makefile.common
    210
    3 EXE_SCASS = system_systemcass.x
    4 EXE_SC    = system_systemc.x
    5 EXE       = ${EXE_SCASS} ${EXE_SC}
    6 OBJECTS   = $(EXE:.x=.o)
    7 LINKS     = $(OBJECTS:.o=.cpp)
     11SIGNAL_GRAPH_REF = signal_graph_ref.dot
     12PROCESS_ORDER_REF = process_order_ref.dot
     13PORT_GRAPH_REF = port_graph_ref.dot
     14SIGNAL_ORDER_REF = signal_order_ref.txt
    815
    9 .SECONDARY:
     16test : $(EXE_SCASS)
     17        @echo -ne "| Testing $$(basename $$(pwd)): " ;
     18        @./$(EXE_SCASS) --p --t --k 2> /dev/null || res=1 ; \
     19        (tail -n +3 $(SIGNAL_GRAPH) | diff $(SIGNAL_GRAPH_REF) -) > /dev/null || res=1 ; \
     20        (tail -n +3 $(PROCESS_ORDER) | diff $(PROCESS_ORDER_REF) -) > /dev/null || res=1 ; \
     21        (tail -n +3 $(PORT_GRAPH) | diff $(PORT_GRAPH_REF) -) > /dev/null || res=1 ; \
     22        diff $(SIGNAL_ORDER_REF) $(SIGNAL_ORDER) > /dev/null || res=1 ; \
     23        if [ x"$$res" = x ] ; then echo "OK" ; else echo "KO" ; fi ;
     24       
    1025
    11 main : $(EXE)
    1226
    13 test : ${EXE}
    14         @for i in ${EXE_SCASS} ; do \
    15   ./$$i --p --t --k; \
    16   (tail -n +3 port_graph.dot | diff port_graph_reference.dot -) || eval ${failcom} ; \
    17   ((tail -n +3 signal_graph.dot | diff signal_graph_reference.dot -) \
    18   || (tail -n +3 signal_graph.dot | diff signal_graph_reference2.dot -) \
    19   || (tail -n +3 signal_graph.dot | diff signal_graph_reference3.dot -)) \
    20   || eval ${failcom} ; \
    21   ((tail -n +3 process_order.dot | diff process_order_reference.dot -) \
    22   || (tail -n +3 process_order.dot | diff process_order_reference2.dot -)  \
    23   || (tail -n +3 process_order.dot | diff process_order_reference3.dot -)) \
    24   || eval ${failcom} ; \
    25   (diff signal_order_reference.txt signal_order.txt) \
    26   || (diff signal_order_reference2.txt signal_order.txt) \
    27   || (diff signal_order_reference3.txt signal_order.txt) \
    28   || eval ${failcom} ; \
    29   done
    30         @echo Test OK.
    31 
    32 %.gif : %.dot
    33         dot -Tgif -o $*.gif $*.dot
    34 
    35 %_systemc.x : %_systemc.o $(SYSTEMC_LIB)
    36         $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) 2>&1 | $(CPPFILT)
    37 
    38 %_systemcass.x : %_systemcass.o  $(SYSTEMCASS_LIB)
    39         $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) 2>&1 | $(CPPFILT)
    40 
    41 -include Makefile.deps
    42 
    43 %_systemc.cpp : %.cpp
    44         ln -s $*.cpp $*_systemc.cpp
    45 
    46 %_systemcass.cpp : %.cpp
    47         ln -s $*.cpp $*_systemcass.cpp
    48 
    49 %_systemc.o : %_systemc.cpp
    50         $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps
    51         $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o
    52 
    53 %_systemcass.o : %_systemcass.cpp
    54         $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps
    55         $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o
    56 
    57 clean :
    58         rm -f Makefile.deps
    59         -rm -f *.o gmon.out
    60         -rm -f signal_order.txt module_order.dot signal_graph.dot
    61         -rm -f $(EXE) $(OBJECTS)
    62         -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null
    63         -rm -f core*
    64         -rm -rf generated_by_systemcass
    65         -rm -rf tracesystem_systemcass.x.vcd tracesystem_systemc.x.vcd
    66        
Note: See TracChangeset for help on using the changeset viewer.