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

    r15 r55  
     1
    12include ../env.mk
     3TRACE1 = trace_file_scass.vcd
     4TRACE2 = trace_file_systemc.vcd
     5ERASE = $(TRACE1) $(TRACE2)
     6include ../Makefile.common
    27
    3 SYSTEM    = system.cpp
    4 EXE_SCASS = $(SYSTEM:.cpp=_systemcass.x)
    5 EXE_SC    = $(SYSTEM:.cpp=_systemc.x)
    6 EXE       = ${EXE_SCASS} ${EXE_SC}
    7 LOG       = $(SYSTEM:.cpp=.log)
    8 OBJECTS   = $(EXE:.x=.o)
    9 LINKS     = $(OBJECTS:.o=.cpp)
     8TRACE = trace_file.vcd
     9TRACE_REF = trace_file_reference.vcd
    1010
    11 .SECONDARY:
     11test: all
     12        @echo -ne "| Testing $$(basename $$(pwd)): " ;
     13        @./$(EXE_SCASS) > $(LOG_SCASS) 2> /dev/null
     14        @mv $(TRACE) $(TRACE1)
     15        @./$(EXE_SC) > $(LOG_SC) 2> /dev/null
     16        @mv $(TRACE) $(TRACE2)
     17        @if tail -n +11 $(TRACE1) | diff $(TRACE_REF) - > /dev/null ; then \
     18                if tail -n +11 $(TRACE2) | diff $(TRACE_REF) - > /dev/null ; then \
     19                        echo "OK" ; \
     20                else \
     21                        echo "KO" ; \
     22                fi ; \
     23        else \
     24                echo "KO" ; \
     25        fi ;
    1226
    13 main : $(EXE)
    1427
    15 test : trace_file_scass.vcd trace_file_systemc.vcd trace_file_reference.vcd
    16         -diff trace_file_systemc.vcd trace_file_scass.vcd
    17         diff trace_file_reference.vcd trace_file_scass.vcd
    18 
    19 trace_file_scass.vcd : system_systemcass.x
    20         ./system_systemcass.x
    21         tail -n +11 trace_file.vcd > trace_file_temp.vcd
    22         mv trace_file_temp.vcd trace_file_scass.vcd
    23 
    24 trace_file_systemc.vcd : system_systemc.x
    25         ./system_systemc.x
    26         tail -n +11 trace_file.vcd > trace_file_temp.vcd
    27         mv trace_file_temp.vcd trace_file_systemc.vcd
    28 
    29 %.gif : %.dot
    30         dot -Tgif -o $*.gif $*.dot
    31 
    32 %_systemc.x : %_systemc.o $(SYSTEMC_LIB)
    33         $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) 2>&1 | $(CPPFILT)
    34 
    35 %_systemcass.x : %_systemcass.o  $(SYSTEMCASS_LIB)
    36         $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) 2>&1 | $(CPPFILT)
    37 
    38 -include Makefile.deps
    39 
    40 %_systemc.cpp : %.cpp
    41         ln -s $*.cpp $*_systemc.cpp
    42 
    43 %_systemcass.cpp : %.cpp
    44         ln -s $*.cpp $*_systemcass.cpp
    45 
    46 %_systemc.o : %_systemc.cpp
    47         $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps
    48         $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o
    49 
    50 %_systemcass.o : %_systemcass.cpp
    51         $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps
    52         $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o
    53 
    54 clean :
    55         rm -f Makefile.deps
    56         -rm -f *.o gmon.out *~
    57         -rm -f ${LOG}
    58         -rm -f signal_order.txt module_order.dot signal_graph.dot
    59         -rm -f module_order.gif signal_graph.gif
    60         -rm -f $(EXE) $(OBJECTS)
    61         -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null
    62         -rm -f core*
    63         -rm -rf generated_by_systemcass
    64         -rm -rf trace_file.vcd
    65        
Note: See TracChangeset for help on using the changeset viewer.