Fix TMPDIR in test_genrule_default_env
Fix TMPDIR in test_genrule_default_env

TMPDIR is not just an arbitrary environment variable that we expect to be passed
to tests; it is the place where we temporary files may be stored. This semantic
rule also applies to bazel itself. So TMPDIR has to point to a directory where
we can write to. Unfortunately, the only way we have to find out a directory to
write to is TMPDIR itself. So, create a fresh directory there and pass that
directory on as new value for TMPDIR to see if it is passed through to the
action.

Also, fix up the resetting of TMPDIR: do not assume unset is the same
as set to the empty string.

--
Change-Id: I378ae9196c33d988686e8a2a6d3c142238fe8aab
Reviewed-on: https://bazel-review.googlesource.com/#/c/4030
MOS_MIGRATED_REVID=127196634

UrbanCompass/bazel,mrdomino/bazel,twitter-forks/bazel,kchodorow/bazel,kchodorow/bazel,mikelalcon/bazel,ulfjack/bazel,snnn/bazel,meteorcloudy/bazel,cushon/bazel,mikelikespie/bazel,werkt/bazel,damienmg/bazel,abergmeier-dsfishlabs/bazel,variac/bazel,dropbox/bazel,safarmer/bazel,abergmeier-dsfishlabs/bazel,iamthearm/bazel,kchodorow/bazel-1,LuminateWireless/bazel,juhalindfors/bazel-patches,zhexuany/bazel,juhalindfors/bazel-patches,twitter-forks/bazel,cushon/bazel,safarmer/bazel,variac/bazel,hermione521/bazel,mikelikespie/bazel,kchodorow/bazel,spxtr/bazel,mbrukman/bazel,perezd/bazel,snnn/bazel,juhalindfors/bazel-patches,dslomov/bazel,meteorcloudy/bazel,dslomov/bazel,werkt/bazel,meteorcloudy/bazel,mrdomino/bazel,katre/bazel,ButterflyNetwork/bazel,perezd/bazel,kchodorow/bazel-1,dslomov/bazel,katre/bazel,spxtr/bazel,aehlig/bazel,mikelikespie/bazel,mikelikespie/bazel,spxtr/bazel,iamthearm/bazel,variac/bazel,kchodorow/bazel,perezd/bazel,abergmeier-dsfishlabs/bazel,mrdomino/bazel,iamthearm/bazel,davidzchen/bazel,mikelalcon/bazel,katre/bazel,zhexuany/bazel,hermione521/bazel,akira-baruah/bazel,twitter-forks/bazel,akira-baruah/bazel,perezd/bazel,dslomov/bazel,dropbox/bazel,damienmg/bazel,UrbanCompass/bazel,LuminateWireless/bazel,werkt/bazel,ButterflyNetwork/bazel,ulfjack/bazel,mbrukman/bazel,akira-baruah/bazel,mrdomino/bazel,spxtr/bazel,iamthearm/bazel,bazelbuild/bazel,dropbox/bazel,LuminateWireless/bazel,variac/bazel,snnn/bazel,Asana/bazel,cushon/bazel,mrdomino/bazel,katre/bazel,hermione521/bazel,snnn/bazel,spxtr/bazel,akira-baruah/bazel,dropbox/bazel,Asana/bazel,abergmeier-dsfishlabs/bazel,Asana/bazel,bazelbuild/bazel,abergmeier-dsfishlabs/bazel,ulfjack/bazel,juhalindfors/bazel-patches,twitter-forks/bazel,meteorcloudy/bazel,variac/bazel,Asana/bazel,LuminateWireless/bazel,akira-baruah/bazel,bazelbuild/bazel,UrbanCompass/bazel,safarmer/bazel,mikelikespie/bazel,iamthearm/bazel,aehlig/bazel,mikelalcon/bazel,damienmg/bazel,katre/bazel,hermione521/bazel,mbrukman/bazel,LuminateWireless/bazel,safarmer/bazel,damienmg/bazel,snnn/bazel,werkt/bazel,damienmg/bazel,bazelbuild/bazel,snnn/bazel,akira-baruah/bazel,davidzchen/bazel,werkt/bazel,spxtr/bazel,meteorcloudy/bazel,bazelbuild/bazel,davidzchen/bazel,aehlig/bazel,bazelbuild/bazel,ButterflyNetwork/bazel,davidzchen/bazel,iamthearm/bazel,juhalindfors/bazel-patches,dropbox/bazel,mikelalcon/bazel,ulfjack/bazel,LuminateWireless/bazel,hermione521/bazel,werkt/bazel,zhexuany/bazel,zhexuany/bazel,meteorcloudy/bazel,mikelalcon/bazel,perezd/bazel,mikelikespie/bazel,UrbanCompass/bazel,ulfjack/bazel,davidzchen/bazel,dropbox/bazel,davidzchen/bazel,ButterflyNetwork/bazel,safarmer/bazel,dslomov/bazel,dslomov/bazel-windows,variac/bazel,dslomov/bazel,mrdomino/bazel,ButterflyNetwork/bazel,cushon/bazel,katre/bazel,Asana/bazel,meteorcloudy/bazel,kchodorow/bazel-1,snnn/bazel,aehlig/bazel,variac/bazel,perezd/bazel,damienmg/bazel,aehlig/bazel,ulfjack/bazel,aehlig/bazel,dslomov/bazel-windows,mbrukman/bazel,davidzchen/bazel,ButterflyNetwork/bazel,cushon/bazel,kchodorow/bazel-1,cushon/bazel,mbrukman/bazel,hermione521/bazel,mbrukman/bazel,dslomov/bazel-windows,twitter-forks/bazel,twitter-forks/bazel,UrbanCompass/bazel,Asana/bazel,kchodorow/bazel,ulfjack/bazel,kchodorow/bazel,safarmer/bazel,juhalindfors/bazel-patches,dslomov/bazel,kchodorow/bazel-1,kchodorow/bazel,twitter-forks/bazel,dslomov/bazel-windows,spxtr/bazel,Asana/bazel,mikelalcon/bazel,dslomov/bazel-windows,zhexuany/bazel,juhalindfors/bazel-patches,dslomov/bazel-windows,zhexuany/bazel,perezd/bazel,abergmeier-dsfishlabs/bazel,damienmg/bazel,UrbanCompass/bazel,aehlig/bazel,kchodorow/bazel-1