Convert per-test run scripts to python.

Test: test.py -r --all-target
Test: diff emitted test commands before and after
Change-Id: I05003b5cde0e39ffc7d037ef875a45f13dd83755
311 files changed