Changeset 126e54f


Ignore:
Timestamp:
Sep 9, 2016, 11:26:50 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, 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:
03e3117, b6424d9
Parents:
7d05e7e (diff), 850fda6 (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 plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/test.py

    r7d05e7e r126e54f  
    285285# check if the user already passed in a number of jobs for multi-threading
    286286make_flags = environ.get('MAKEFLAGS')
    287 make_has_max_jobs = re.search("(-j|--jobs)\s*([0-9]+)", make_flags) if make_flags else None
    288 make_max_jobs = make_has_max_jobs.group(2) if make_has_max_jobs else None
    289 make_cmd = "make" if make_flags and "-j" in make_flags else "make -j8"
     287make_jobs_fds = re.search("--jobserver-fds=\s*([0-9]+),([0-9]+)", make_flags) if make_flags else None
     288if make_jobs_fds :
     289        tokens = os.read(int(make_jobs_fds.group(1)), 1024)
     290        options.jobs = len(tokens)
     291        os.write(int(make_jobs_fds.group(2)), tokens)
    290292
    291293# make sure we have a valid number of jobs that corresponds to user input
    292 options.jobs = int(make_max_jobs) if make_max_jobs else (options.jobs if options.jobs else 1)
    293294if options.jobs <= 0 :
    294295        print('ERROR: Invalid number of jobs', file=sys.stderr)
     
    296297
    297298print('Running on %i cores' % options.jobs)
     299make_cmd = "make" if make_flags else ("make -j%i" % options.jobs)
    298300
    299301# users may want to simply list the tests
Note: See TracChangeset for help on using the changeset viewer.