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

    r15 r55  
     1
    12include ../env.mk
     3RES1 = systemcass_a_nodynamiclink_10.txt
     4RES2 = systemcass_p_nodynamiclink_10.txt
     5RES3 = systemcass_m_nodynamiclink_10.txt
     6RES4 = systemcass_dynamiclink_10.txt
     7ERASE = $(RES1) $(RES2) $(RES3) $(RES4)
     8include ../Makefile.common
    29
    3 EXE_SCASS = system_systemcass.x
    4 EXE_SC    = system_systemc.x
    5 EXE       = ${EXE_SCASS}
    6 OBJECTS   = $(EXE:.x=.o)
    7 LINKS     = $(OBJECTS:.o=.cpp)
     10test: $(SC_CASS)
     11        @echo -ne "| Testing $$(basename $$(pwd)): " ;
     12        @(./$(EXE_SCASS) --a --nodynamiclink 10 2> /dev/null ) | tail -n 5 > $(RES1)
     13        @(./$(EXE_SCASS) --p --nodynamiclink 10 2> /dev/null ) | tail -n 5 > $(RES2)
     14        @(./$(EXE_SCASS) --m --nodynamiclink 10 2> /dev/null ) | tail -n 5 > $(RES3)
     15        @(./$(EXE_SCASS) 10 2> /dev/null ) | tail -n 5 > $(RES4)
     16        @if diff $(RES1) $(RES2) > /dev/null ; then \
     17                if diff $(RES1) $(RES3) > /dev/null ; then \
     18                        if diff $(RES1) $(RES4) > /dev/null ; then \
     19                                echo "OK" ; \
     20                        else \
     21                                echo "KO" ; \
     22                        fi ; \
     23                else \
     24                        echo "KO" ; \
     25                fi ; \
     26        else \
     27                echo "KO" ; \
     28        fi ;
    829
    9 RESULTS   = systemcass_dynamiclink_10.txt systemcass_m_nodynamiclink_10.txt systemcass_a_nodynamiclink_10.txt systemcass_p_nodynamiclink_10.txt
    1030
    11 .SECONDARY:
    12 
    13 main : $(EXE)
    14 
    15 test : ${RESULTS}
    16         diff systemcass_dynamiclink_10.txt systemcass_m_nodynamiclink_10.txt || eval ${failcom}
    17         diff systemcass_a_nodynamiclink_10.txt systemcass_p_nodynamiclink_10.txt || eval ${failcom}
    18         diff systemcass_dynamiclink_10.txt systemcass_a_nodynamiclink_10.txt || eval ${failcom}
    19         @echo Test OK.
    20 
    21 systemcass_a_nodynamiclink_10.txt : system_systemcass.x
    22         ((./system_systemcass.x --nobanner --a --nodynamiclink 10 ) | tail -n 5  > systemcass_a_nodynamiclink_10.txt) || eval ${failcom}
    23 
    24 systemcass_p_nodynamiclink_10.txt : system_systemcass.x
    25         ((./system_systemcass.x --nobanner --p --nodynamiclink 10 ) | tail -n 5 > systemcass_p_nodynamiclink_10.txt) || eval ${failcom}
    26 
    27 systemcass_m_nodynamiclink_10.txt : system_systemcass.x
    28         ((./system_systemcass.x --nobanner --m --nodynamiclink 10 ) | tail -n 5  > systemcass_m_nodynamiclink_10.txt) || eval ${failcom}
    29 
    30 systemcass_dynamiclink_10.txt : system_systemcass.x
    31         ((./system_systemcass.x --nobanner 10 ) | tail -n 5 > systemcass_dynamiclink_10.txt) || eval ${failcom}
    32 
    33 %.png : %.dot
    34         dot -Tpng -o $*.png $*.dot
    35 
    36 %_systemc.x : %_systemc.o $(SYSTEMC_LIB)
    37         $(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) 2>&1 | $(CPPFILT)
    38 
    39 %_systemcass.x : %_systemcass.o  $(SYSTEMCASS_LIB)
    40         $(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) 2>&1 | $(CPPFILT)
    41 
    42 -include Makefile.deps
    43 
    44 %_systemc.cpp : %.cpp
    45         ln -s $*.cpp $*_systemc.cpp
    46 
    47 %_systemcass.cpp : %.cpp
    48         ln -s $*.cpp $*_systemcass.cpp
    49 
    50 %_systemc.o : %_systemc.cpp
    51         $(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps
    52         $(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o
    53 
    54 %_systemcass.o : %_systemcass.cpp
    55         $(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps
    56         $(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o
    57 
    58 clean :
    59         rm -f Makefile.deps
    60         -rm -f *.o gmon.out
    61         -rm -f signal_order.txt module_order.dot signal_graph.dot port_graph.dot
    62         -rm -f module_graph.dot process_order.dot
    63         -rm -f $(EXE) $(OBJECTS)
    64         -for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null
    65         -rm -f core*
    66         -rm -rf generated_by_systemcass
    67         -rm -rf tracesystem_systemcass.x.vcd tracesystem_systemc.x.vcd
    68         -rm -rf ${RESULTS}
    69        
Note: See TracChangeset for help on using the changeset viewer.