Changeset 08f3ad3 for tests


Ignore:
Timestamp:
Sep 21, 2020, 11:37:28 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum, stuck-waitfor-destruct
Children:
7a80113
Parents:
31a6f38 (diff), ace2e92 (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

Location:
tests
Files:
5 added
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • tests/Makefile.am

    r31a6f38 r08f3ad3  
    3838# since automake doesn't have support for CFA we have to
    3939AM_CFLAGS = $(if $(test), 2> $(test), ) \
     40        -fdebug-prefix-map=$(abspath ${abs_srcdir})= \
     41        -fdebug-prefix-map=/tmp= \
    4042        -g \
    4143        -Wall \
     
    5860# adjusted CC but without the actual distcc call
    5961CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     62CFACCLINK = $(CFACCLOCAL) $(if $(test), 2> $(test), ) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g'))
    6063
    6164PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
     
    110113% : %.cfa $(CFACCBIN)
    111114        $(CFACOMPILETEST) -c -o $(abspath ${@}).o
    112         $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@})
     115        $(CFACCLINK) ${@}.o -o $(abspath ${@})
     116        rm $(abspath ${@}).o
    113117
    114118# implicit rule for c++ test
     
    137141# CUSTOM TARGET
    138142#------------------------------------------------------------------------------
     143# tests that just validate syntax
     144expression : expression.cfa $(CFACCBIN)
     145        $(CFACOMPILETEST) -c -fsyntax-only 2> $(abspath ${@})
     146
    139147# expected failures
    140148# use custom target since they require a custom define and custom dependencies
     
    170178        $(CFACCLOCAL) $($(shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g')) $(abspath ${@}).o -o $(abspath ${@})
    171179
     180# Linking tests
     181# Meta tests to make sure we see linking errors (can't compile with -O2 since it may multiply number of calls)
     182linking/linkerror : linking/linkerror.cfa $(CFACCBIN)
     183        $(CFACOMPILETEST) -O0 -c -o $(abspath ${@}).o
     184        $(CFACCLINK)  -O0 ${@}.o -o $(abspath ${@})
     185        rm $(abspath ${@}).o
     186
    172187#------------------------------------------------------------------------------
    173188# Other targets
  • tests/pybin/tools.py

    r31a6f38 r08f3ad3  
    120120                return None
    121121
    122         file = open(file, mode)
     122        file = open(file, mode, encoding="latin-1") # use latin-1 so all chars mean something.
    123123        exitstack.push(file)
    124124        return file
  • tests/test.py

    r31a6f38 r08f3ad3  
    207207                else:
    208208                        if os.stat(out_file).st_size < 1048576:
    209                                 with open (out_file, "r") as myfile:
     209                                with open (out_file, "r", encoding='latin-1') as myfile:  # use latin-1 so all chars mean something.
    210210                                        error = myfile.read()
    211211                        else:
Note: See TracChangeset for help on using the changeset viewer.