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/25032005/Makefile

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