mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
55a457de69
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.
24 lines
764 B
Perl
24 lines
764 B
Perl
#require test-repo slow debhelper
|
|
|
|
$ . "$TESTDIR/helpers-testrepo.sh"
|
|
$ syshgenv
|
|
|
|
Ensure debuild doesn't run the testsuite, as that could get silly.
|
|
$ DEB_BUILD_OPTIONS=nocheck
|
|
$ export DEB_BUILD_OPTIONS
|
|
$ OUTPUTDIR=`pwd`
|
|
$ export OUTPUTDIR
|
|
|
|
$ cd "$TESTDIR"/..
|
|
$ make deb > $OUTPUTDIR/build.log 2>&1
|
|
$ cd $OUTPUTDIR
|
|
$ ls *.deb
|
|
mercurial-common_*.deb (glob)
|
|
mercurial_*.deb (glob)
|
|
main deb should have .so but no .py
|
|
$ dpkg --contents mercurial_*.deb | egrep '(localrepo|parsers)'
|
|
* ./usr/lib/python2.7/dist-packages/mercurial/parsers*.so (glob)
|
|
mercurial-common should have py but no .so or pyc
|
|
$ dpkg --contents mercurial-common_*.deb | egrep '(localrepo|parsers)'
|
|
* ./usr/lib/python2.7/dist-packages/mercurial/localrepo.py (glob)
|