[Lldb-commits] [PATCH] Unique file names for TestStarted and TestFinished.

Zachary Turner zturner at google.com
Fri Jun 5 13:58:15 PDT 2015


This seems suspicious to me.  Why are 2 different instances of dotest.py
running in different processes both trying to run the same test?

On Fri, Jun 5, 2015 at 1:57 PM Chaoren Lin <chaorenl at google.com> wrote:

> Hi zturner, clayborg,
>
> This fixes the issue of multiple test suites opening the same file for
> writing.
>
> http://reviews.llvm.org/D10284
>
> Files:
>   test/dotest.py
>
> Index: test/dotest.py
> ===================================================================
> --- test/dotest.py
> +++ test/dotest.py
> @@ -1397,7 +1397,7 @@
>          if exception.errno != errno.EEXIST:
>              raise
>  where_to_save_session = os.getcwd()
> -fname = os.path.join(sdir_name, "TestStarted")
> +fname = os.path.join(sdir_name, "TestStarted-%d" % os.getpid())
>  with open(fname, "w") as f:
>      print >> f, "Test started at: %s\n" % timestamp_started
>      print >> f, svn_info
> @@ -1774,7 +1774,7 @@
>          sys.stderr.write("%s - %d\n" %
> (category,failuresPerCategory[category]))
>
>  os.chdir(where_to_save_session)
> -fname = os.path.join(sdir_name, "TestFinished")
> +fname = os.path.join(sdir_name, "TestFinished-%d" % os.getpid())
>  with open(fname, "w") as f:
>      print >> f, "Test finished at: %s\n" %
> datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S")
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150605/b074fb75/attachment.html>


More information about the lldb-commits mailing list