- Timestamp:
- Jul 23, 2018, 4:56:25 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- cbdf565
- Parents:
- f85bc15
- Location:
- src/tests
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/Makefile.am
rf85bc15 r552f5cb 70 70 @+${TEST_PY} --debug=${debug} -Iconcurrent 71 71 72 .dummy : .dummy.c @CFA_BINDIR@/@CFA_NAME@73 ${CC} ${BUILD_FLAGS} -XCFA -n ${<} -o ${@} #don't use CFLAGS, this rule is not a real test74 75 76 72 % : ${srcdir}/%.c @CFA_BINDIR@/@CFA_NAME@ 77 73 ${CC} ${AM_CFLAGS} ${CFLAGS} $(abspath ${<}) -o ${@} -
src/tests/Makefile.in
rf85bc15 r552f5cb 768 768 @+${TEST_PY} --debug=${debug} -Iconcurrent 769 769 770 .dummy : .dummy.c @CFA_BINDIR@/@CFA_NAME@771 ${CC} ${BUILD_FLAGS} -XCFA -n ${<} -o ${@} #don't use CFLAGS, this rule is not a real test772 773 770 % : ${srcdir}/%.c @CFA_BINDIR@/@CFA_NAME@ 774 771 ${CC} ${AM_CFLAGS} ${CFLAGS} $(abspath ${<}) -o ${@} -
src/tests/config.py.in
rf85bc15 r552f5cb 7 7 SRCDIR = "@srcdir@" 8 8 BUILDDIR = "@builddir@" 9 HOSTARCH = "@host_cpu@" -
src/tests/pybin/settings.py
rf85bc15 r552f5cb 6 6 try : 7 7 sys.path.append(os.getcwd()) 8 from config import *8 import config 9 9 10 SRCDIR = os.path.abspath( SRCDIR)11 BUILDDIR = os.path.abspath( BUILDDIR)10 SRCDIR = os.path.abspath(config.SRCDIR) 11 BUILDDIR = os.path.abspath(config.BUILDDIR) 12 12 except: 13 13 print('ERROR: missing config.py, re-run configure script.', file=sys.stderr) … … 18 18 'x64' : 'x64', 19 19 'x86-64' : 'x64', 20 'x86_64' : 'x64', 20 21 'x86' : 'x86', 21 22 'i386' : 'x86', … … 38 39 self.cross_compile = False 39 40 try: 40 arch = machine_default()41 arch = config.HOSTARCH 41 42 self.target = Architecture.makeCanonical( arch ) 42 43 except KeyError: … … 84 85 85 86 make = "make" if not force else ("make -j%i" % jobs) 86 87 88 def set_machine_default( func ):89 global machine_default90 91 machine_default = func -
src/tests/pybin/tools.py
rf85bc15 r552f5cb 170 170 # system 171 171 ################################################################################ 172 173 # parses the Makefile to find the machine type (32-bit / 64-bit)174 def getMachineType():175 sh('echo "void ?{}(int&a,int b){}int main(){return 0;}" > .dummy.c')176 ret, out = make('.dummy', silent = True)177 178 if ret != 0:179 print("Failed to identify architecture:")180 print(out)181 print("Stopping")182 rm( (".dummy.c",".dummy") )183 sys.exit(1)184 185 _, out = sh("file .dummy", print2stdout=False)186 rm( (".dummy.c",".dummy") )187 188 if settings.dry_run :189 return 'x64'190 191 return re.search(r"[^,]+,([^,]+),", out).group(1).strip()192 193 172 # count number of jobs to create 194 173 def jobCount( options, tests ): … … 254 233 else: 255 234 print(text) 256 257 settings.set_machine_default( getMachineType )
Note: See TracChangeset
for help on using the changeset viewer.