This is an archive of the discontinued LLVM Phabricator instance.

Adds parallel worker queue index to test events
ClosedPublic

Authored by tfiala on Sep 18 2015, 1:55 PM.

Details

Reviewers
clayborg
Summary

This change does the following:

  • Adds a mechanism for adding arbitrary event content to all test events from the command line.
  • Adds a 0-based worker_index key into all inferior test events. This allows ResultsFormatters to know which worker queue is/was performing the work for which the event is raised. We can use this in interesting ways. More to come. For the parallel test runner, all methods of running tests (multiprocessing, threading, pool variants, and serial) all work this in properly.
    • Now supports --results-file set to "stdout" or "stderr". If so, the results formatter uses stdout/stderr of the dotest.py process.
    • Adds a test_results.DumpFormatter option that prints the pretty-print (pprint module) form of the test events to the results file. Calling 'dotest.py --results=file=stdout --results-formatter test_results.DumpFormatter' is a great way to see the stream of test events as they are generated.

Diff Detail

Event Timeline

tfiala updated this revision to Diff 35131.Sep 18 2015, 1:55 PM
tfiala retitled this revision from to Adds parallel worker queue index to test events.
tfiala updated this object.
tfiala added a reviewer: clayborg.
tfiala added a subscriber: lldb-commits.
clayborg accepted this revision.Sep 18 2015, 1:56 PM
clayborg edited edge metadata.

Looks good!

This revision is now accepted and ready to land.Sep 18 2015, 1:56 PM

Committed here:

Sending        test/dosep.py
Sending        test/dotest.py
Sending        test/dotest_args.py
Sending        test/test_results.py
Transmitting file data ....
Committed revision 248036.

I'm going to add some way to announce the number of workers up front so a ResultsFormatter doesn't have to guess it by viewing the stream of events.

tfiala closed this revision.Sep 18 2015, 2:03 PM

Closed with content from previous comment.