Commit Graph

4 Commits

Author SHA1 Message Date
Jun Wu
d011a49d16 run-tests: protect a "print" with "iolock"
Summary:
I have been seeing the progress bars get messed up like:

  [                    ] 0 Passed. 0 Failed. 0 Skipped. 903 Remaining         0.3s
  [                    ] test-contrib-perf.t                                  0.3s
  [                    ] test-check-code.t                                    0.3s
  [                    ] test-check-config.t                                  0.3s
  [                    ] test-contrib-check-code.t                            0.3s
  [                    ] 2 Passed. 0 Failed. 0 Skipped. 902 Remaining         0.4s
  [                    ] test-contrib-perf.t                                  0.4s
  [                    ] test-check-code.t                                    0.4s
  [                    ] 3 Passed. 0 Failed. 0 Skipped. 900 Remaining         0.9s
  [                    ] test-contrib-perf.t                                  0.9s
  [->                  ] test-check-code.t                                    0.9s
  [                    ] 5 Passed. 0 Failed. 1 Skipped. 897 Remaining         2.4s
  [-->                 ] test-contrib-perf.t                                  2.4s
  [--------->          ] test-check-code.t                                    2.4s
  [----------------->  ] test-check-config.t                                  2.4s
  [----------------->  ] test-contrib-check-code.t                            2.4s
  [                    ] test-run-tests.t                                     2.4s
  [------>             ] test-checkoutidentifier-commitinfo.t                 2.4s
  [-------------->     ] test-commitcloud-checkoutlocations-update.t          2.4s
  [-------->           ] test-checkserverbookmark.t                           2.4s
  [--------------->    ] test-checkoutidentifier-dirstateinfo.t               2.4s
  [---------->         ] test-debugcheckcasecollisions-treemanifest.t         2.4s
  [                    ] test-fb-hgext-copytrace.t                            2.4s
  [                    ] test-copytrace-heuristics.t                          2.4s
  [---------------->   ] test-check-execute.t                                 2.4s
  [----------->        ] test-fb-hgext-grpcheck.t                             2.4s
  [---->               ] test-treestate-needcheck.t                           2.4s
  [------------->      ] test-check-help.t                                    2.4s

I tracked it down to `hghave` crash with unknown svn-related features. The fix is
to protect the write with iolock. With thi spatch the progress bar now looks like:

  skipped: unknown feature: svn
  skipped: unknown feature: svn-bindings
  skipped: unknown feature: svn
  skipped: unknown feature: svn-bindings
  skipped: unknown feature: svn
  skipped: unknown feature: svn-bindings

  [                    ] 7 Passed. 0 Failed. 1 Skipped. 895 Remaining         2.9s
  [--->                ] test-contrib-perf.t                                  2.9s
  [--------->          ] test-check-code.t                                    2.9s
  [----------------->  ] test-check-config.t                                  2.9s
  [->                  ] test-run-tests.t                                     2.9s
  [------>             ] test-checkoutidentifier-commitinfo.t                 2.9s
  [----------------->  ] test-commitcloud-checkoutlocations-update.t          2.9s
  [-------->           ] test-checkserverbookmark.t                           2.9s
  [---------------->   ] test-checkoutidentifier-dirstateinfo.t               2.9s
  [---------->         ] test-debugcheckcasecollisions-treemanifest.t         2.9s
  [                    ] test-fb-hgext-copytrace.t                            2.9s
  [                    ] test-copytrace-heuristics.t                          2.9s
  [------------->      ] test-fb-hgext-grpcheck.t                             2.9s
  [----->              ] test-treestate-needcheck.t                           2.9s
  [----------------->  ] test-check-help.t                                    2.9s
  [----------->        ] test-commitcloud-smartlog.t                          2.9s
  [----------->        ] test-lfs-checksum.t                                  2.8s
  [-------->           ] test-progressfile.t                                  2.8s
  [-->                 ] test-dirstate-race.t                                 2.4s
  [->                  ] test-fb-hgext-copytrace-amend.t                      2.2s
  [                    ] test-help.t                                          1.9s

Reviewed By: singhsrb

Differential Revision: D18713921

fbshipit-source-id: 2897b2dda56a02842d8d88f31972156cf8f615ad
2019-11-27 00:24:06 -08:00
Jun Wu
13a6237c1d run-tests: silent some errors from run-tests itself
Summary:
I have seen errors like:

  Traceback (most recent call last):
    File "/usr/lib64/python2.7/threading.py", line 812, in __bootstrap_inner
      self.run()
    File "/usr/lib64/python2.7/threading.py", line 765, in run
      self.__target(*self.__args, **self.__kwargs)
    File "./run-tests.py", line 2636, in job
      del runningtests[test.name]
    File "/usr/lib64/python2.7/collections.py", line 68, in __delitem__
      dict_delitem(self, key)
  KeyError: 'test-empty-t.py'

It's not fatal and is caused by race condition. So let's just ignore it.

Reviewed By: ikostia

Differential Revision: D18538388

fbshipit-source-id: 85e38578bea4c9b27439e6f10abb7619a8bb9238
2019-11-18 11:42:09 -08:00
Jun Wu
b4f7ff744e run-tests: dott Python tests do not have reference outputs
Summary:
Before this patch, if `test-foo-t.py.out` exists, the output of `test-foo-t.py`
will be diffed against it, something like:

  % ./run-tests.py test-empty-t.py
  --- test-empty-t.py.out
  +++ test-empty-t.py.err
  @@ -1,4 +1,4 @@
   Traceback (most recent call last):
     File "tests/test-empty-t.py", line 77, in <module>
  -    raise RuntimeError('a')
  -RuntimeError: a
  +    raise RuntimeError('ab')
  +RuntimeError: ab

However, the dott Python tests are not using "reference output" at all. If they
output something, it's mostly likely some crash or back traces that we want to
see the full content of it.

This patch makes it so. The new output looks like:

  % ./run-tests.py test-empty-t.py
  Traceback (most recent call last):
    File "tests/test-empty-t.py", line 77, in <module>
      raise RuntimeError('ab')
  RuntimeError: ab

  ERROR: test-empty-t.py output changed

As we're here, also improve the detection of dott Python test so they don't
have to have the `-t.py` suffix in file name.

Reviewed By: ikostia

Differential Revision: D18534830

fbshipit-source-id: 826328be5de5841081e8f093b07295bc2fadc6b1
2019-11-18 11:42:08 -08:00
Adam Simpkins
ab3a7cb21f Move fb-mercurial sources into an eden/scm subdirectory.
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.
2019-11-13 16:04:48 -08:00