Bazel, testing: improve test_base.py
Bazel, testing: improve test_base.py

Changes to test_base.py:
- use tempfile.TemporaryFile to create Bazel's
  stdout/stderr files
- added a new RunProgram method
- setUp now creates a unique temp directory for
  each test case

Change-Id: I5b851fee826e73044fa3992a5981855982527ae3
PiperOrigin-RevId: 160505154

dslomov/bazel-windows,dropbox/bazel,damienmg/bazel,ButterflyNetwork/bazel,twitter-forks/bazel,snnn/bazel,dslomov/bazel,meteorcloudy/bazel,damienmg/bazel,safarmer/bazel,snnn/bazel,davidzchen/bazel,perezd/bazel,dropbox/bazel,twitter-forks/bazel,safarmer/bazel,dslomov/bazel-windows,bazelbuild/bazel,akira-baruah/bazel,cushon/bazel,dslomov/bazel-windows,dropbox/bazel,meteorcloudy/bazel,meteorcloudy/bazel,damienmg/bazel,davidzchen/bazel,spxtr/bazel,ulfjack/bazel,ulfjack/bazel,twitter-forks/bazel,aehlig/bazel,bazelbuild/bazel,ulfjack/bazel,bazelbuild/bazel,perezd/bazel,dslomov/bazel-windows,akira-baruah/bazel,spxtr/bazel,twitter-forks/bazel,katre/bazel,variac/bazel,snnn/bazel,variac/bazel,variac/bazel,damienmg/bazel,dslomov/bazel,davidzchen/bazel,cushon/bazel,werkt/bazel,twitter-forks/bazel,dslomov/bazel,katre/bazel,davidzchen/bazel,snnn/bazel,safarmer/bazel,werkt/bazel,bazelbuild/bazel,variac/bazel,aehlig/bazel,katre/bazel,cushon/bazel,aehlig/bazel,ulfjack/bazel,bazelbuild/bazel,perezd/bazel,ulfjack/bazel,aehlig/bazel,twitter-forks/bazel,damienmg/bazel,davidzchen/bazel,cushon/bazel,davidzchen/bazel,spxtr/bazel,bazelbuild/bazel,dslomov/bazel,twitter-forks/bazel,aehlig/bazel,dslomov/bazel-windows,perezd/bazel,damienmg/bazel,werkt/bazel,dslomov/bazel,katre/bazel,meteorcloudy/bazel,snnn/bazel,dslomov/bazel,dropbox/bazel,spxtr/bazel,variac/bazel,variac/bazel,aehlig/bazel,werkt/bazel,variac/bazel,snnn/bazel,spxtr/bazel,meteorcloudy/bazel,ButterflyNetwork/bazel,perezd/bazel,meteorcloudy/bazel,perezd/bazel,ulfjack/bazel,werkt/bazel,dropbox/bazel,aehlig/bazel,katre/bazel,snnn/bazel,spxtr/bazel,akira-baruah/bazel,dropbox/bazel,dslomov/bazel-windows,ulfjack/bazel,cushon/bazel,akira-baruah/bazel,werkt/bazel,akira-baruah/bazel,ButterflyNetwork/bazel,safarmer/bazel,davidzchen/bazel,ButterflyNetwork/bazel,perezd/bazel,spxtr/bazel,ButterflyNetwork/bazel,cushon/bazel,safarmer/bazel,damienmg/bazel,meteorcloudy/bazel,dslomov/bazel,ButterflyNetwork/bazel,katre/bazel,safarmer/bazel,akira-baruah/bazel