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

    r35 r55  
     1
    12include ../env.mk
     3TRACE1 = trace_file_scass.vcd
     4TRACE2 = trace_file_systemc.vcd
     5ERASE = $(TRACE1) $(TRACE2)
     6include ../Makefile.common
    27
    3 EXE     = system_systemc.x system_systemcass.x
    4 OBJECTS = $(EXE:.x=.o)
    5 LINKS   = $(OBJECTS:.o=.cpp)
     8TRACE = trace_file.vcd
     9TRACE_REF = trace_file_reference.vcd
    610
    7 .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 +8 $(TRACE1) | diff $(TRACE_REF) - > /dev/null ; then \
     18                if tail -n +8 $(TRACE2) | diff $(TRACE_REF) - > /dev/null ; then \
     19                        echo "OK" ; \
     20                else \
     21                        echo "KO" ; \
     22                fi ; \
     23        else \
     24                echo "KO" ; \
     25        fi ;
    826
    9 main : $(EXE)
    1027
    11 test : system-23.vcd system-23_reference.vcd
    12         -diff system-23.vcd system-23_reference.vcd
    13         @echo Test OK.
    1428
    15 system-23.vcd : system_systemcass.x
    16         ./system_systemcass.x --nodynamiclink system 23
    17         tail -n +8 system.vcd > system-23.vcd
    18         rm system.vcd
    19 
    20 system-23_reference.vcd : system_systemc.x
    21         ./system_systemc.x system 23
    22         tail -n +8 system.vcd > system-23_reference.vcd
    23         rm system.vcd
    24 
    25 %_systemc.x : %_systemc.o $(SYSTEMC_LIB)
    26         $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC)
    27 
    28 %_systemcass.x : %_systemcass.o  $(SYSTEMCASS_LIB)
    29         $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS)
    30 
    31 -include Makefile.deps
    32 
    33 %_systemc.cpp : %.cpp
    34         ln -s $*.cpp $*_systemc.cpp
    35 
    36 %_systemcass.cpp : %.cpp
    37         ln -s $*.cpp $*_systemcass.cpp
    38 
    39 %_systemc.o : %_systemc.cpp
    40         $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps
    41         $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o
    42 
    43 %_systemcass.o : %_systemcass.cpp
    44         $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps
    45         $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o
    46 
    47 clean :
    48         rm -f Makefile.deps
    49         -rm -f *.o gmon.out
    50         -rm -f *.txt
    51         -rm -f $(EXE) $(OBJECTS)
    52         -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null
    53         -rm -f core*
    54         -rm -f *~
    55         -rm -rf generated_by_systemcass
    56         -rm -rf trace_system_systemcass.x.vcd trace_system_systemc.x.vcd
    57         -rm -rf system-23.vcd
    58         -rm -rf system_systemcass.log
    59        
Note: See TracChangeset for help on using the changeset viewer.