Commit Graph

13 Commits

Author SHA1 Message Date
Jun Wu
1cde63d99c codemod: drop hacks changing PYTHONPATH in tests
Summary:
Now they are unnecessary since `run-tests.py` will set up `PYTONPATH`
correctly.

Differential Revision: D6865042

fbshipit-source-id: ca95314f725968e14349a9d916434aa832c596f9
2018-04-13 21:51:00 -07:00
Phil Cohen
1e0dbc1386 contbuild: fix test-shbang.t
Summary:
`build_rpm.py` has a /usr/bin/env shbang so it shouldn't be a failure here.

Although, it's had that shebang since 1/23/18.

Reviewed By: quark-zju

Differential Revision: D6825992

fbshipit-source-id: bf7ff3d61338384d8c6e26a93c71f4361687f1f2
2018-04-13 21:50:58 -07:00
Durham Goode
257a0246cf hg: fix check-shbang
Summary:
This was also using O(repo) file queries. Let's scope them down.
Performance here depends on us shipping a new rpm to users, so let's disable
this test until we do that.

Reviewed By: quark-zju

Differential Revision: D6803495

fbshipit-source-id: e49f00d1a606f0c0ceae6c1e8556f0137186da0a
2018-04-13 21:50:57 -07:00
Phil Cohen
5b330bb027 testsdir: fix for fb/packaging
Summary:
Moving stuff into fb/packaging broke a few tests since they're
trying to apply the Mercurial linters on scripts that don't conform.

Let's exclude these directorites for now.

Test Plan: This fixes a test.

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6701215
2018-01-10 21:19:51 -08:00
Durham Goode
7f67b6a618 tests: update check code tests for fb/facebook-hg-rpms/ 2018-01-10 13:27:59 -08:00
Ryan McElroy
dd04f38419 fb-hgext: fix up tests after file moves
Summary: A bunch of tests started failing due to file moves. Fix them.

Test Plan: run-tests.py

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D6676006

Tasks: T24908724
2018-01-08 11:17:58 -08:00
Kostia Balytskyi
f8473e7451 fb-hgext: accept test-check-shbang.t failures 2018-01-03 09:46:16 -08:00
Yuya Nishihara
8f3fa790c1 tests: alias syshg and syshgenv so they can be switched conditionally 2017-07-02 13:14:20 +09:00
Adam Simpkins
55a457de69 tests: use the system hg for examining the local repository
Most test scripts use "hg" to interact with a temporary test repository.
However a few tests also want to run hg commands to interact with the local
repository containing the mercurial source code.  Notably, many of the
test-check-* tests want to check local files and commit messages.

These tests were previously using the version of hg being tested to query the
source repository.  However, this will fail if the source repository requires
extensions or other settings not supported by the version of mercurial being
tested.  The source repository was typically initially cloned using the system
hg installation, so we should use the system hg installation to query it.

There was already a helpers-testrepo.sh script designed to help cope with
different requirements for the source repository versus the test repositories.
However, it only handled the evolve extension.  This new behavior works with
any extensions that are different between the system installation and the test
installation.
2017-06-27 17:24:31 -07:00
Augie Fackler
2e5ee0608f tests: enforce use of $PYTHON in tests 2017-06-15 14:22:39 -04:00
Augie Fackler
f5ff8e7bc2 test-check-shbang: work around check-code not wanting hardcoded paths
I'm about to fix a bug in check-code that a # anywhere on a line
treated the rest of the line as a comment, even if it was
meaningful. This test is the one place we explicitly *do* want
hardcoded paths referenced, but we can work around that by specifying
bin as a regular expression.
2016-07-12 15:32:24 -04:00
timeless
0c82fc02cd tests: silence test-repo obsolete warning
refactoring test-check-commit.t HGRCPATH bits as helpers-testrepo.sh
2016-05-11 04:49:27 +00:00
timeless
e22da4a832 tests: add new test for #! shebang lines
* use #!/bin/sh not e.g. #!/usr/bin/sh
* use #!/usr/bin/env python not e.g. #!/usr/bin/python
2016-04-06 19:09:12 +00:00