sapling/eden/scm/tests/test-check-fix-code.t
Durham Goode 752c5ccff5 tests: remove test environment when running system hg
Summary:
dynamicconfig has logic to avoid loading remote configs during tests,
by checking the TESTTMP variable. Unfortunately, the tests currently run system
hg with that environment set, which causes it to generate incorrect
configuration for the real repository (i.e. fbsource).

Let's get rid of all test specific environment variables when running the system
hg. There's a comment in the code saying this breaks some tests (from 2017
03a31be593db), but as far as I can see they still work.

Reviewed By: quark-zju

Differential Revision: D26758364

fbshipit-source-id: 945cbd36f7eccc98149772a42421cbc51b157c5b
2021-03-02 12:53:57 -08:00

12 lines
299 B
Perl

#chg-compatible
#require test-repo
$ . "$TESTDIR/helpers-testrepo.sh"
$ cd "$TESTDIR"/..
$ testrepohg files . > $TESTTMP/filelist
$ PYTHONPATH= ./contrib/fix-code.py --dry-run `cat $TESTTMP/filelist`
# In case the above list is not empty, run 'contrib/fix-code.py FILE...' to
# fix them.