Commit Graph

18 Commits

Author SHA1 Message Date
Kostia Balytskyi
08acbb5629 entrypoint: introduce buck-buildable hg.rust
Reviewed By: farnz

Differential Revision: D15844921

fbshipit-source-id: 16ef18915b82344a553fec92af9ec9fc445e3ccb
2019-06-17 11:34:08 -07:00
Kostia Balytskyi
8fa3d943d9 bring back the hg python entry point
Summary:
Back out "[hg] entrypoint: remove hg python script"

Original commit changeset: f3c8cfe4beb7

Reviewed By: mitrandir77

Differential Revision: D15739595

fbshipit-source-id: d13dd5a8cf7c645de622a2dd18960eba6561d131
2019-06-10 10:45:27 -07:00
Kostia Balytskyi
ad8627a859 entrypoint: remove hg python script
Summary: We want to have just one entry point to Mercurial, namely the Rust binary. Getting rid of the `hg` Python script means that we finally can do things that only exist in Rust and not in Python.

Reviewed By: simpkins

Differential Revision: D13186374

fbshipit-source-id: f3c8cfe4beb7bf764172a8af04fd25202eca9af2
2019-06-06 14:25:22 -07:00
Durham Goode
e2bfcbcca4 tests: add Mononoke integration test target
Summary:
This adds a new test target that will use Mononoke as the server.
Initially we only support one test, but we can add to this list in the future.

Reviewed By: quark-zju

Differential Revision: D15382714

fbshipit-source-id: ad9b3bd35ffefc01239ff05f9f65829fb7a94555
2019-05-29 01:30:28 -07:00
Durham Goode
a1f0accf72 tests: add whitelist support for buck test runs
Summary:
In a future diff we'll be adding support for running tests with
mononoke integration enabled. Initially it will be a small set of tests, so
having whitelist support will make this easier.

Reviewed By: markbt

Differential Revision: D15382019

fbshipit-source-id: ca9faa8ccecbcb8a10c691131c56784a166ea5c9
2019-05-28 03:17:03 -07:00
Kostia Balytskyi
b2284a0ad1 chg: remove the ability to produce an actual binary
Summary: We don't run this binary anymore, no reason to build and ship it.

Reviewed By: quark-zju

Differential Revision: D14437317

fbshipit-source-id: dd6da521783f18a2a518a7aa042be98950894e89
2019-03-14 06:35:45 -07:00
Jun Wu
c12e300bb8 codemod: move Python packages to edenscm
Summary:
Move top-level Python packages `mercurial`, `hgext` and `hgdemandimport` to
a new top-level package `edenscm`. This allows the Python packages provided by
the upstream Mercurial to be installed side-by-side.

To maintain compatibility, `edenscm/` gets added to `sys.path` in
`mercurial/__init__.py`.

Reviewed By: phillco, ikostia

Differential Revision: D13853115

fbshipit-source-id: b296b0673dc54c61ef6a591ebc687057ff53b22e
2019-01-28 18:35:41 -08:00
Jun Wu
061ca2cef4 unittestify: treat skip as success by default
Summary:
The test infra does not handle "skip" state gracefully and treats skips as
"failure". That generated scary reports like hundreds of tests are failing.
Stop reporting skips to fix it.

An enivronment variable is added to get the old behavior.

Reviewed By: singhsrb

Differential Revision: D12808196

fbshipit-source-id: 2356a1d6fdfe1d2991d28368787c7d2b7b525b6b
2018-10-26 15:47:07 -07:00
Jun Wu
a9ed32f839 tests: set maxdifflines to 1000 for buck test
Summary:
Buck test does not print outputs directly to the terminal. So it's better to
not limit the diff size.

Reviewed By: singhsrb

Differential Revision: D9842709

fbshipit-source-id: f17c7321d75761fdac21b9def52dec38f7e0b60c
2018-09-14 19:05:35 -07:00
Jun Wu
0cd76376ed tests: run watchman tests in CI
Summary: Run tests with watchman built from fbcode master. So we get signals about watchman/hg changes.

Reviewed By: DurhamG

Differential Revision: D8448187

fbshipit-source-id: 8643f139932057f326bc75b0b0c5cc616355eeed
2018-06-20 19:35:31 -07:00
Jun Wu
2df677286b unittestify: add missing "port" parameter
Summary:
Mistake by D8414229. "port" should be passed to reduce chances of port
conflict.

Reviewed By: DurhamG, singhsrb

Differential Revision: D8447371

fbshipit-source-id: f45b58095ce3d74eb8ac8458d697b55f956f98b5
2018-06-15 10:10:19 -07:00
Jun Wu
a1c5a8fc76 buck: add a binary target of run-tests.py wrapper
Summary:
This makes it easier to run tests with advanced debug flags without going
through `buck test`.

Reviewed By: phillco

Differential Revision: D8414229

fbshipit-source-id: 62e2233618ea7c671c04bd0e96919c81c60302ae
2018-06-14 21:38:33 -07:00
Lukasz Langa
dfda82e492 Upgrade to 18.5b1
Summary: Mostly empty lines removed and added.  A few bugfixes on excessive line splitting.

Reviewed By: quark-zju

Differential Revision: D8199128

fbshipit-source-id: 90c1616061bfd7cfbba0b75f03f89683340374d5
2018-05-30 02:23:58 -07:00
Jun Wu
584656dff3 codemod: join the auto-formatter party
Summary:
Turned on the auto formatter. Ran `arc lint --apply-patches --take BLACK **/*.py`.
Then run `arc lint` again so some other autofixers like spellchecker etc. looked
at the code base. Manually accept the changes whenever they make sense, or use
a workaround (ex. changing "dict()" to "dict constructor") where autofix is false
positive. Disabled linters on files that are hard (i18n/polib.py) to fix, or less
interesting to fix (hgsubversion tests), or cannot be fixed without breaking
OSS build (FBPYTHON4).

Conflicted linters (test-check-module-imports.t, part of test-check-code.t,
test-check-pyflakes.t) are removed or disabled.

Duplicated linters (test-check-pyflakes.t, test-check-pylint.t) are removed.

An issue of the auto-formatter is lines are no longer guarnateed to be <= 80
chars. But that seems less important comparing with the benefit auto-formatter
provides.

As we're here, also remove test-check-py3-compat.t, as it is currently broken
if `PYTHON3=/bin/python3` is set.

Reviewed By: wez, phillco, simpkins, pkaush, singhsrb

Differential Revision: D8173629

fbshipit-source-id: 90e248ae0c5e6eaadbe25520a6ee42d32005621b
2018-05-25 22:17:29 -07:00
Jun Wu
e3010aca6b tests: restore simple error output for buck .t tests
Summary:
Partially revert D7584511 so buck test failures for `.t` tests would show
the `.t` output change instead of a long, less meaningful environment
variables.

Reviewed By: singhsrb

Differential Revision: D7992713

fbshipit-source-id: 64de5e19589277018e1e37968ea69a2329d67852
2018-05-14 13:00:29 -07:00
Martijn Pieters
abd2175e71 hg: actually run the tests in fb/tests
Summary:
There are tests in fb/tests we don't run as part of the test suite. Update the makefile and add buck infrastructure to run them.

 - Update the test-common-commands-hg.t test
 - Re-generate the fbcode/.hgignore file from the updated .gitignore

Reviewed By: quark-zju

Differential Revision: D7584511

fbshipit-source-id: d85800dccf0eb569a68db4b9e1d9796e3d7ac957
2018-04-13 21:51:54 -07:00
Jun Wu
adaee94f27 unittestify: randomize HGPORT
Summary:
Previously a stress test that runs a single test in parallel will have race
condition on HGPORT. This patch randomizes the port so the race becomes
unlikely.

Reviewed By: DurhamG

Differential Revision: D6900641

fbshipit-source-id: 2ad741032e3aa9b0cc9fa831fa57907cc493ce37
2018-04-13 21:51:04 -07:00
Jun Wu
5dabd90466 unittestify: add a script to generate python unittests
Summary:
The script is intended to be used in `python_unittest` target
in buck.

Reviewed By: DurhamG

Differential Revision: D6879870

fbshipit-source-id: 9ed27a691aa23b41dd2620be7871c0a005df60d0
2018-04-13 21:51:02 -07:00