summaryrefslogtreecommitdiff
path: root/tools/parallel_run.py
AgeCommit message (Collapse)Author
2020-01-17Make parallel_run.py print status on single line. Alex Light
Parallel_run.py would write a ton of status updates as it runs. To make it a bit cleaner have it overwrite the run-count line each time instead. Test: manual Change-Id: I9073810fc7ece9a7d25b4a97a4bd01414ad5efa8
2020-01-10Improve parallel_run.py somewhat Alex Light
Make parallel_run just wait for any remaining jobs to finish before exiting. Attempting to exit early generally didn't work very well. Also improve documentation a bit. Test: ./art/tools/parallel_run.py -j80 runit.sh Change-Id: Ie8b3f1b4ad9bbc03a04e6bdc8e8cea6140b85f7f
2019-04-16Add a parallel_run.py tool Alex Light
Sometimes when investigating a flake it is useful to add logging and repeatedly run a command until the issue appears with the logging. This can be tedious if the flake is rare. To make it easier I added a simple parallel_run.py tool that can run a command in parallel repeatedly until it fails and save the stdout from the failed run. Usage: % # Write a script that exits with 0 on failure and writes all output % # to stdout. % cat tst.sh \#!/bin/bash ! (head -c32 /dev/urandom | hd | grep -E '\|.*a') % # Run the script in parallel % ./art/tools/parallel_run.py -j80 --out out.txt ./tst.sh Temporary files in /tmp/tmp5013_ey7 1 runs <snip> 31 runs % # Examine output % cat out.txt 00000000 6d e3 ac bf 1a 21 93 17 61 00 2a e0 8b f5 41 3b |m....!..a.*...A;| Test: ./art/tools/parallel_run.py -j70 --out out.txt ./tst.sh Bug: 72608560 Change-Id: I83877ae1ccde5e843da20c5bd5a4f24e2e07fb19