Summary:
This applies the new feature to all tests.
The tests do not use revlog fallback but we plan to use revlog fallback
in production for faster migration.
Reviewed By: DurhamG
Differential Revision: D18737259
fbshipit-source-id: 69633c7b2026fb3d19ca16d40368bded972efd86
Summary:
For some reason, our linker flag `-uinitthreading` no longer works in buck opt
build. This affects the `indexes` and `threading` Python extensions. Move them
to `bindings` to solve the problem.
Reviewed By: fanzeyi
Differential Revision: D19340538
fbshipit-source-id: 0c82b472f2916229d3c5e481954b69415b5b0dc2
Summary:
Previously, each test uses a separate chg server, because there are different
states in different tests. So chg servers cannot be reused across tests.
Nowdays chg servers are more stateless, and can be shared for all tests.
Do that to reduce chg server startup overhead.
With this change, `./run-tests.py --time $(rg -l chg-compatible)` went down
from 4:57 to 4:04 on my devserver.
A configuration `--chg-sock-path` is added for advanced use-cases.
Reviewed By: DurhamG
Differential Revision: D18924911
fbshipit-source-id: c2f7d84ee4cbfb5d599cfdc0ab47f922fae4a67e
Summary:
The hgpython interpreter was used to run Python scripts in tests that might
rely on Mercurial modules.
The previous hgpython implementation is Python PAR based, which does not have
access to native Rust modules like bindings. Change it to use the native
"hg debugpython" implementation that is more compatible.
Reviewed By: markbt
Differential Revision: D19190496
fbshipit-source-id: 9791dbf9ba0ed92de702291faa9145f01b05ec40
Summary:
Detect `#chg-compatible` in test header and force enable chg. This would allow
us to mark tests as chg-compatible to get some speed ups.
Reviewed By: xavierd
Differential Revision: D18870508
fbshipit-source-id: 923d6cb10b0c621d9995809b60ae535126f6f2a5
Summary:
The chg logic is inlined in the "hg" binary so the old logic running "chg" as
an external binary needs to be changed.
The version check part can be annoying - it requires more frequent `make local`
to run the tests while `make local` is actually not necessary. So let's just
skip the version check if running in tests.
Reviewed By: ahornby
Differential Revision: D18870510
fbshipit-source-id: 2343549c4080a0425098698b5423c6cfc1f60c77
Summary:
We only support the "C" policy, therefore let's inline it and simplify the code
significantly.
Reviewed By: quark-zju
Differential Revision: D18819680
fbshipit-source-id: 0bc0a12b85ddc42af007d3a20c0f4e8497bedb21
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
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
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.