Ignore:
Timestamp:
Dec 5, 2017, 1:29:12 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
86ad276
Parents:
099a40d
Message:

Tests now properly work with multiple architectures

File:
1 edited

Legend:

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

    r099a40d rf3b9efc  
    7676                '-s' if silent else '',
    7777                test_param,
    78                 settings.debugFlag,
     78                settings.debug.flags,
    7979                flags,
    8080                target,
     
    147147# parses the Makefile to find the machine type (32-bit / 64-bit)
    148148def getMachineType():
    149         return 'x64'
    150149        sh('echo "void ?{}(int&a,int b){}int main(){return 0;}" > .dummy.c')
    151150        ret, out = make('.dummy', silent = True)
     
    161160        rm( (".dummy.c",".dummy") )
    162161
    163         return out
    164         return re.search("ELF\s([0-9]+)-bit", out).group(1)
     162        if settings.dry_run :
     163                return 'x64'
     164
     165        return re.search(r"[^,]+,([^,]+),", out).group(1).strip()
    165166
    166167# count number of jobs to create
     
    213214        raise argparse.ArgumentTypeError(msg)
    214215        return False
     216
     217
     218settings.set_machine_default( getMachineType )
Note: See TracChangeset for help on using the changeset viewer.