create latest temp dir link upfront

With this change, the /tmp/run_remote_tests.latest softlink is created
at the beginning of the execution, right after the mktemp call. This
makes it easier for users to track logs as the script is executing,
simply referring to the above softlink. Note that:

* We don't create a softlink when --results_dir_root is used; the user
  evidently provided an explicit directory name, so there's no point in
  creating/updating the latest softlink.

* The latest softlink is removed when --cleanup is used. This generally
  makes sense, but differs from previous logic in that a preexisting
  latest softlink will be overridden regardless. This too sounds like
  a reasonable thing to expect.

TEST=Latest softlink generated as expected.

Change-Id: Ib40def113b8cd75fba3e89db44017ab5d4affb26
Reviewed-by: Chris Sosa <>
Commit-Ready: Gilad Arnold <>
Tested-by: Gilad Arnold <>
1 file changed