tests/test-debian-packages.t
author Yuya Nishihara <yuya@tcha.org>
Mon, 07 Aug 2017 22:22:28 +0900
branchstable
changeset 33644 943c91326b23
parent 29219 3c9066ed557c
child 33116 6c113a7dec52
permissions -rw-r--r--
ssh: unban the use of pipe character in user@host:port string This vulnerability was fixed by the previous patch and there were more ways to exploit than using '|shellcmd'. So it doesn't make sense to reject only pipe character. Test cases are updated to actually try to exploit the bug. As the SSH bridge of git/svn subrepos are not managed by our code, the tests for non-hg subrepos are just removed. This may be folded into the original patches.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26147
a02c22e48142 test-debian-packages: new test for testing construction of debian packages
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
#require test-repo slow debhelper
26148
7f49efcaa9b4 debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents: 26147
diff changeset
     2
29219
3c9066ed557c tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents: 26148
diff changeset
     3
  $ . "$TESTDIR/helpers-testrepo.sh"
3c9066ed557c tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents: 26148
diff changeset
     4
26148
7f49efcaa9b4 debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents: 26147
diff changeset
     5
Ensure debuild doesn't run the testsuite, as that could get silly.
7f49efcaa9b4 debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents: 26147
diff changeset
     6
  $ DEB_BUILD_OPTIONS=nocheck
7f49efcaa9b4 debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents: 26147
diff changeset
     7
  $ export DEB_BUILD_OPTIONS
26147
a02c22e48142 test-debian-packages: new test for testing construction of debian packages
Augie Fackler <augie@google.com>
parents:
diff changeset
     8
  $ OUTPUTDIR=`pwd`
a02c22e48142 test-debian-packages: new test for testing construction of debian packages
Augie Fackler <augie@google.com>
parents:
diff changeset
     9
  $ export OUTPUTDIR
a02c22e48142 test-debian-packages: new test for testing construction of debian packages
Augie Fackler <augie@google.com>
parents:
diff changeset
    10
a02c22e48142 test-debian-packages: new test for testing construction of debian packages
Augie Fackler <augie@google.com>
parents:
diff changeset
    11
  $ cd "$TESTDIR"/..
a02c22e48142 test-debian-packages: new test for testing construction of debian packages
Augie Fackler <augie@google.com>
parents:
diff changeset
    12
  $ make deb > $OUTPUTDIR/build.log 2>&1
a02c22e48142 test-debian-packages: new test for testing construction of debian packages
Augie Fackler <augie@google.com>
parents:
diff changeset
    13
  $ cd $OUTPUTDIR
a02c22e48142 test-debian-packages: new test for testing construction of debian packages
Augie Fackler <augie@google.com>
parents:
diff changeset
    14
  $ ls *.deb
26148
7f49efcaa9b4 debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents: 26147
diff changeset
    15
  mercurial-common_*.deb (glob)
7f49efcaa9b4 debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents: 26147
diff changeset
    16
  mercurial_*.deb (glob)
7f49efcaa9b4 debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents: 26147
diff changeset
    17
main deb should have .so but no .py
7f49efcaa9b4 debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents: 26147
diff changeset
    18
  $ dpkg --contents mercurial_*.deb | egrep '(localrepo|parsers)'
7f49efcaa9b4 debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents: 26147
diff changeset
    19
  * ./usr/lib/python2.7/dist-packages/mercurial/parsers*.so (glob)
7f49efcaa9b4 debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents: 26147
diff changeset
    20
mercurial-common should have py but no .so or pyc
7f49efcaa9b4 debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents: 26147
diff changeset
    21
  $ dpkg --contents mercurial-common_*.deb | egrep '(localrepo|parsers)'
7f49efcaa9b4 debian: switch to using debhelper and dh_python2 to build debs
Augie Fackler <augie@google.com>
parents: 26147
diff changeset
    22
  * ./usr/lib/python2.7/dist-packages/mercurial/localrepo.py (glob)