Changeset 7009b9b


Ignore:
Timestamp:
Sep 12, 2019, 3:56:27 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
15f9c8e
Parents:
31d8f4d
Message:

Fixed compilation of tests that don't produce an executable

Location:
tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.am

    r31d8f4d r7009b9b  
    8989
    9090# Use for all tests, make sure the path are correct and all flags are added
    91 CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) -c $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
     91CFACOMPILETEST=$(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
    9292
    9393# Use for tests that either generate an executable, print directly to stdout or the make command is expected to fail
     
    9999#----------------------------------------------------------------------------------------------------------------
    100100
     101is_ascii = $(shell file )
     102
    101103# implicit rule so not all test require a rule
    102104% : %.cfa $(CFACCBIN)
    103         $(CFACOMPILETEST) -o $(abspath ${@}).o
     105        $(CFACOMPILETEST) -c -o $(abspath ${@}).o
    104106        $(CFACC) $(abspath ${@}).o -o $(abspath ${@})
    105107
     108# @ if [[ "$(shell file $(abspath ${@}).o)" == *"ASCII text"* ]]; then echo "mv $(abspath ${@}).o $(abspath ${@})"; mv $(abspath ${@}).o $(abspath ${@}); else echo "$(CFACC) $(abspath ${@}).o -o $(abspath ${@});"; $(CFACC) $(abspath ${@}).o -o $(abspath ${@}); fi
     109
     110declarationSpecifier gccExtensions extension attributes functions KRfunctions : % : %.cfa $(CFACCBIN)
     111        $(CFACOMPILETEST) -CFA -XCFA -p -o $(abspath ${@}).o
     112        mv $(abspath ${@}).o $(abspath ${@})
    106113
    107114% : %.cpp
  • tests/Makefile.in

    r31d8f4d r7009b9b  
    404404
    405405# Use for all tests, make sure the path are correct and all flags are added
    406 CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) -c $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
     406CFACOMPILETEST = $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) $($(shell echo "${@}_FLAGS" | sed 's/-\|\//_/g'))
    407407
    408408# Use for tests that either generate an executable, print directly to stdout or the make command is expected to fail
     
    411411# Use for tests where the make command is expecte to succeed but the expected.txt should be compared to stderr
    412412CFATEST_STDERR = $(CFACOMPILETEST) 2> $(abspath ${@})
     413
     414#----------------------------------------------------------------------------------------------------------------
     415is_ascii = $(shell file )
    413416
    414417#------------------------------------------------------------------------------
     
    805808        @+${TEST_PY} --debug=${debug}  --install=${installed} -Iconcurrent
    806809
    807 #----------------------------------------------------------------------------------------------------------------
    808 
    809810# implicit rule so not all test require a rule
    810811% : %.cfa $(CFACCBIN)
    811         $(CFACOMPILETEST) -o $(abspath ${@}).o
     812        $(CFACOMPILETEST) -c -o $(abspath ${@}).o
    812813        $(CFACC) $(abspath ${@}).o -o $(abspath ${@})
     814
     815# @ if [[ "$(shell file $(abspath ${@}).o)" == *"ASCII text"* ]]; then echo "mv $(abspath ${@}).o $(abspath ${@})"; mv $(abspath ${@}).o $(abspath ${@}); else echo "$(CFACC) $(abspath ${@}).o -o $(abspath ${@});"; $(CFACC) $(abspath ${@}).o -o $(abspath ${@}); fi
     816
     817declarationSpecifier gccExtensions extension attributes functions KRfunctions : % : %.cfa $(CFACCBIN)
     818        $(CFACOMPILETEST) -CFA -XCFA -p -o $(abspath ${@}).o
     819        mv $(abspath ${@}).o $(abspath ${@})
    813820
    814821% : %.cpp
Note: See TracChangeset for help on using the changeset viewer.