sapling/tests/test-check-py3-compat-hg.t
Jun Wu 2247a2f8df test-cstore: run native Python tests directly
Previously the test sets up `LD_LIBRARY_PATH` and `PYTHONPATH`, then runs
Python tests.

Within Python code, setting `sys.path` would achieve the same effect of
setting `PYTHONPATH`. For `LD_LIBRARY_PATH`, it's necessary for C libraries.
But the only C library that cstore depends on is `lz4`, which is supposed to
use the system version. There is no C library provided by this repo -
features like sha1 are compiled in `cstore.so`.

Therefore it's unnecessary to have a separate `.t` file wrapping `.py`
tests. Let's just use `.py` tests directly.

Test Plan:
`./script/unit.py`

Make a temporary change to `cdatapack.c` so it fails unconditionally in
open_datapack. Build the repo in different ways: `make local` and
`python2 setup.py build_clib build_ext`. Then run the test by using
`$HG_CREW/tests/run-tests.py -l test-remotefilelog-datapack.py` without the
`hg-dev` environment and make sure it fails with the expected exception.

Differential Revision: https://phab.mercurial-scm.org/D1429
2017-11-16 10:56:44 -08:00

119 lines
5.8 KiB
Perl

#require test-repo
$ . $TESTDIR/require-core-hg.sh contrib/check-py3-compat.py
This file is backported from mercurial/tests/test-check-py3-compat.t.
$ . "$TESTDIR/helper-testrepo.sh"
$ cd "$TESTDIR"/..
$ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON $RUNTESTDIR/../contrib/check-py3-compat.py
fastmanifest/__init__.py not using absolute_import
fastmanifest/cachemanager.py not using absolute_import
fastmanifest/concurrency.py not using absolute_import
fastmanifest/constants.py not using absolute_import
fastmanifest/debug.py not using absolute_import
fastmanifest/implementation.py not using absolute_import
fastmanifest/metrics.py not using absolute_import
hgext3rd/arcdiff.py not using absolute_import
hgext3rd/backups.py not using absolute_import
hgext3rd/catnotate.py not using absolute_import
hgext3rd/checkmessagehook.py not using absolute_import
hgext3rd/chistedit.py not using absolute_import
hgext3rd/copytrace.py not using absolute_import
hgext3rd/debugcommitmessage.py not using absolute_import
hgext3rd/dialect.py not using absolute_import
hgext3rd/directaccess.py not using absolute_import
hgext3rd/drop.py not using absolute_import
hgext3rd/edrecord.py not using absolute_import
hgext3rd/errorredirect.py not using absolute_import
hgext3rd/extorder.py not using absolute_import
hgext3rd/fastannotate/error.py not using absolute_import
hgext3rd/fastannotate/formatter.py not using absolute_import
hgext3rd/fastannotate/protocol.py not using absolute_import
hgext3rd/fastlog.py not using absolute_import
hgext3rd/fastpartialmatch.py not using absolute_import
hgext3rd/fbconduit.py not using absolute_import
hgext3rd/fbhistedit.py not using absolute_import
hgext3rd/fbshow.py not using absolute_import
hgext3rd/fbsparse.py not using absolute_import
hgext3rd/generic_bisect.py not using absolute_import
hgext3rd/githelp.py not using absolute_import
hgext3rd/gitlookup.py not using absolute_import
hgext3rd/grepdiff.py not using absolute_import
hgext3rd/grpcheck.py not using absolute_import
hgext3rd/hiddenerror.py not using absolute_import
hgext3rd/linkrevcache.py not using absolute_import
hgext3rd/logginghelper.py not using absolute_import
hgext3rd/morestatus.py not using absolute_import
hgext3rd/myparent.py not using absolute_import
hgext3rd/nointerrupt.py not using absolute_import
hgext3rd/ownercheck.py not using absolute_import
hgext3rd/p4fastimport/filetransaction.py not using absolute_import
hgext3rd/patchpython.py not using absolute_import
hgext3rd/perftweaks.py not using absolute_import
hgext3rd/phabdiff.py not using absolute_import
hgext3rd/phabstatus.py not using absolute_import
hgext3rd/phrevset.py not using absolute_import
hgext3rd/pullcreatemarkers.py not using absolute_import
hgext3rd/rage.py not using absolute_import
hgext3rd/remoteid.py not using absolute_import
hgext3rd/reset.py not using absolute_import
hgext3rd/sampling.py not using absolute_import
hgext3rd/sigtrace.py not using absolute_import
hgext3rd/simplecache.py not using absolute_import
hgext3rd/sparse.py not using absolute_import
hgext3rd/sshaskpass.py not using absolute_import
hgext3rd/stat.py not using absolute_import
hgext3rd/upgradegeneraldelta.py not using absolute_import
hgext3rd/whereami.py not using absolute_import
infinitepush/bundleparts.py not using absolute_import
infinitepush/common.py not using absolute_import
infinitepush/fileindexapi.py not using absolute_import
infinitepush/indexapi.py not using absolute_import
infinitepush/sqlindexapi.py not using absolute_import
infinitepush/store.py not using absolute_import
linelog/pyext/test-random-edits.py not using absolute_import
phabricator/arcconfig.py not using absolute_import
phabricator/diffprops.py not using absolute_import
remotefilelog/__init__.py not using absolute_import
remotefilelog/cacheclient.py not using absolute_import
remotefilelog/constants.py not using absolute_import
remotefilelog/historypack.py not using absolute_import
remotefilelog/lz4wrapper.py not using absolute_import
remotefilelog/metadatastore.py not using absolute_import
remotefilelog/remotefilectx.py not using absolute_import
remotefilelog/shallowbundle.py not using absolute_import
remotefilelog/shallowrepo.py not using absolute_import
remotefilelog/shallowstore.py not using absolute_import
remotefilelog/shallowverifier.py not using absolute_import
remotefilelog/wirepack.py not using absolute_import
scripts/lint.py not using absolute_import
scripts/lint.py requires print_function
scripts/unit.py not using absolute_import
scripts/utils.py not using absolute_import
setup.py not using absolute_import
tests/bundlerepologger.py not using absolute_import
tests/conduithttp.py not using absolute_import
tests/dummyext1.py not using absolute_import
tests/dummyext2.py not using absolute_import
tests/get-with-headers.py not using absolute_import
tests/get-with-headers.py requires print_function
tests/getflogheads.py not using absolute_import
tests/heredoctest.py not using absolute_import
tests/heredoctest.py requires print_function
tests/killdaemons.py not using absolute_import
tests/ls-l.py not using absolute_import
tests/ls-l.py requires print_function
tests/perftest.py not using absolute_import
tests/perftest.py requires print_function
tests/test-absorb-filefixupstate.py not using absolute_import
tests/test-extutil.py not using absolute_import
tests/test-fastmanifest.py not using absolute_import
tests/test-generic-bisect.py not using absolute_import
tests/test-patchpython.py not using absolute_import
tests/test-sshaskpass.py not using absolute_import
tests/treemanifest_correctness.py not using absolute_import
tests/waitforfile.py not using absolute_import
treemanifest/__init__.py not using absolute_import