Ignore:
Timestamp:
Jul 23, 2018, 4:56:25 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
cbdf565
Parents:
f85bc15
Message:

Tests now get default architecture from GNU build system instead of creating a dummy executable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/pybin/tools.py

    rf85bc15 r552f5cb  
    170170#               system
    171171################################################################################
    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 
    193172# count number of jobs to create
    194173def jobCount( options, tests ):
     
    254233        else:
    255234                print(text)
    256 
    257 settings.set_machine_default( getMachineType )
Note: See TracChangeset for help on using the changeset viewer.