Changeset 08e8851 for tests/Makefile.am


Ignore:
Timestamp:
Sep 29, 2020, 1:51:01 PM (5 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
1526e86, 87b9332, 9dc3eb21
Parents:
2ff78aae (diff), d13dd6b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc into master

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.am

    r2ff78aae r08e8851  
    1111## Created On       : Sun May 31 09:08:15 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Tue Nov 20 11:18:51 2018
    14 ## Update Count     : 68
     13## Last Modified On : Sun Sep 27 19:01:41 2020
     14## Update Count     : 84
    1515###############################################################################
    1616
     
    4040        -fdebug-prefix-map=$(abspath ${abs_srcdir})= \
    4141        -fdebug-prefix-map=/tmp= \
     42        -fno-diagnostics-show-caret \
    4243        -g \
    4344        -Wall \
     
    5253
    5354# adjust CC to current flags
    54 CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     55CC = LC_ALL=C $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
    5556CFACC = $(CC)
    5657
     
    133134        $(CFACOMPILETEST) -CFA -XCFA -p -c -fsyntax-only -o $(abspath ${@})
    134135
    135 # Use for tests where the make command is expected to succeed but the expected.txt should be compared to stderr
    136 EXPECT_STDERR = builtins/sync warnings/self-assignment
    137 $(EXPECT_STDERR): % : %.cfa $(CFACCBIN)
    138         $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@})
    139 
    140136#------------------------------------------------------------------------------
    141137# CUSTOM TARGET
    142138#------------------------------------------------------------------------------
    143 # tests that just validate syntax
    144 expression : expression.cfa $(CFACCBIN)
    145         $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@})
     139# tests that just validate syntax and compiler output should be compared to stderr
     140CFACOMPILE_SYNTAX = $(CFACOMPILETEST) -Wno-unused-variable -Wno-unused-label -c -fsyntax-only -o $(abspath ${@})
     141
     142SYNTAX_ONLY_CODE = expression typedefRedef variableDeclarator switch numericConstants identFuncDeclarator forall \
     143        limits nested-types stdincludes cast labelledExit array builtins/sync warnings/self-assignment
     144$(SYNTAX_ONLY_CODE): % : %.cfa $(CFACCBIN)
     145        $(CFACOMPILE_SYNTAX)
     146        $(if $(test), cp $(test) $(abspath ${@}), )
    146147
    147148# expected failures
    148 # use custom target since they require a custom define and custom dependencies
     149# use custom target since they require a custom define *and* have a name that doesn't match the file
    149150alloc-ERROR : alloc.cfa $(CFACCBIN)
    150         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     151        $(CFACOMPILE_SYNTAX) -DERR1
     152        -cp $(test) $(abspath ${@})
    151153
    152154typedefRedef-ERR1 : typedefRedef.cfa $(CFACCBIN)
    153         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     155        $(CFACOMPILE_SYNTAX) -DERR1
     156        -cp $(test) $(abspath ${@})
    154157
    155158nested-types-ERR1 : nested-types.cfa $(CFACCBIN)
    156         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     159        $(CFACOMPILE_SYNTAX) -DERR1
     160        -cp $(test) $(abspath ${@})
    157161
    158162nested-types-ERR2 : nested-types.cfa $(CFACCBIN)
    159         $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
     163        $(CFACOMPILE_SYNTAX) -DERR2
     164        -cp $(test) $(abspath ${@})
    160165
    161166raii/memberCtors-ERR1 : raii/memberCtors.cfa $(CFACCBIN)
    162         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     167        $(CFACOMPILE_SYNTAX) -DERR1
     168        -cp $(test) $(abspath ${@})
    163169
    164170raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa $(CFACCBIN)
    165         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     171        $(CFACOMPILE_SYNTAX) -DERR1
     172        -cp $(test) $(abspath ${@})
    166173
    167174raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa $(CFACCBIN)
    168         $(CFACOMPILETEST) -DERR1 -c -fsyntax-only -o $(abspath ${@})
     175        $(CFACOMPILE_SYNTAX) -DERR1
     176        -cp $(test) $(abspath ${@})
    169177
    170178raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa $(CFACCBIN)
    171         $(CFACOMPILETEST) -DERR2 -c -fsyntax-only -o $(abspath ${@})
     179        $(CFACOMPILE_SYNTAX) -DERR2
     180        -cp $(test) $(abspath ${@})
    172181
    173182# Exception Tests
Note: See TracChangeset for help on using the changeset viewer.