summaryrefslogtreecommitdiff
path: root/tests/lib
Commit message (Collapse)AuthorAge
* test suite: add t-pushed-good-check-changesSean Whitton2018-07-28
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* test suite: add t-push-includedSean Whitton2018-07-28
| | | | Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
* test suite: Provide a gbp.conf which sets --export-dir to $bpdIan Jackson2018-07-26
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Introduce $bpd variable (nfc)Ian Jackson2018-07-26
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite lib: add t-buildproductsdir-configSean Whitton2018-07-26
| | | | | | | No users yet so NFC. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Honour DGIT_SCHROOT_CHROOT to set the schroot to use for the ↵Ian Jackson2018-07-26
| | | | | | sbuild tests. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: unset VISUAL, which interferes.Ian Jackson2018-07-23
| | | | | | Closes:#904308. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Drop a couple of useless test log output lines.Ian Jackson2018-07-14
| | | | | | | We don't need these (((((((((( )))))))))) now that it's just one line inside them. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: tar up the artifacts, and name the tarball after the testIan Jackson2018-07-13
| | | | | | | | | | | | | | | Naming the output after the test works around #903696. tarring the whole lot up turns out to make it a lot smaller. Before: $ du -sk ; du -sk --apparent-size 1640 . 853 . After: 236 . 235 . Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: chmod a+r $AUTOPKGTEST explicitly.debian/5.9+exp3archive/debian/5.9+exp3Ian Jackson2018-07-13
|
* test suite: Do not save non-world-readable artifactsdebian/5.9+exp2archive/debian/5.9+exp2Ian Jackson2018-07-13
| | | | | | | | | Save things to $AUTOPKGTEST_ARTIFACTS without preserving access control information. Works around #903680. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Save much stuff to $AUTOPKGTEST_ARTIFACTS.Ian Jackson2018-07-12
| | | | | | | | | We take some care to make this of reasonable size. In particular, we delete raw tarballs (typically, IMPORT) and .git's sample hooks. And, we git gc the git trees. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Use dch -r -D sid '' not dch -r sid.Ian Jackson2018-07-12
| | | | | | | | | | | | | | | | | Bizarrely, dch -r [-D suite] runs $EDITOR but dch -r [-D suite] weevils ignores `weevils' but does not run $EDITOR. This is #903598. Apparently, this is well known, and convention is to pass ''. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903598#8. So use that. Closes:#903441. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Factor out t-dch-commit-rIan Jackson2018-07-12
| | | | | | | | The pattern `dch -r sid' is actually wrong and we will want to change it. See #903441 and #903598. For future-proofing, factor this out before we fix it. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Always pass LC_COLLATE=C to sort(1).Ian Jackson2018-07-05
| | | | | | | | | | Specifically, by replacing every invocation of sort with the new function t-sort. The one case where we already took care of this, we change LC_ALL to LC_COLLATE, which should be sufficient. Closes:#903006. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Provide DGIT_TEST_BYHAND if appropriateIan Jackson2018-06-30
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: gdr-viagit, gdr-newupstream: do not auto-import t-setup-gnupg.Ian Jackson2018-06-27
| | | | | | | | | | | | | | | | We provide a new mechanism for individual tests to disable the automatic t-setup-import of gnupg. We need to add this to all the other setup/ that these import, too. gdr-convert-gbp is particularly awkward because it wants gnupg if $ifarchive isn't `:'. There we arrange to suppress its automatic inclusion, but add it again by hand if appropriate. This fixes these two tests in chroots without gnupg. Closes:#902559. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Get perl -I for source tree rightIan Jackson2018-06-17
| | | | | | | | We wanted the Dgit.pm in the source tree (ie, the test suite's). Previously this would work by accident, because Dgit.pm would be installed in /usr. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: t-setup-done: get $import right setup using t-chain-testIan Jackson2018-06-17
| | | | | | | We need to honour DGIT_TEST_NAME, rather than just using $0, in that case. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Prepare for calling git-debrebaseIan Jackson2018-06-17
| | | | | | | Provide the --git-debrebase= option, and pass it in the test suite. Nothing uses this yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: test suite: gdr-*: use faketime to control dch datesIan Jackson2018-06-16
| | | | | | | | | This means that the dgit- and gdr-generated commits with dates from changelogs are all adjusted. This makes the gitk in the gdr tests look more like a real one would, so we can see if it's pretty. (It also makes it easier to debug the tests.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Update dummy datesIan Jackson2018-06-16
| | | | | | | | To make things look nice in gitk in our test trees, etc., it is nice if the fake date is at least as recent as the commits etc. in the worktree tarballs and pkg-srcs. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: test suite: introduce t-dch-commitIan Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: something to have a salsa (general purpose git) repoIan Jackson2018-06-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: bugfix: Use full key hash rather than short keyid.Ian Jackson2018-04-23
| | | | | | Closes:#896653. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Add library function t-push-was-source-onlySean Whitton2018-01-07
| | | | | | | No functional change. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name> Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: lib: t-git-fsck: put dgit-test-fsck.errs in git dirIan Jackson2018-01-07
| | | | | | | | | | This needs to not be in the working tree; it causes trouble there. This was broken in 090071ae8e31c8f81283af477c1114835ed8fd02 "test suite: Tolerate worktrees when trying to git-fsck" Reported-by: Sean Whitton <spwhitton@spwhitton.name> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: t-git-fsck: Introduce fsckerrs variableIan Jackson2018-01-07
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Export troot as an environment variableIan Jackson2018-01-07
| | | | | | This will be useful in a moment. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Break out t-dgit-manpageIan Jackson2017-08-04
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Make t-dgit print pwd to stderr, not stdoutIan Jackson2017-08-03
| | | | | | | This means that tests can capture the output from t-dgit without going wrong. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Tolerate worktrees when trying to git-fsckIan Jackson2017-08-03
| | | | | | | | | A `git worktree' has a file for .git. We still want to fsck them. We can simply run the fsck in the directory containing .git, instead. That works for ordinary trees with a .git directory, and for worktrees. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: t-report-fail: print $PWD as part of failure messageIan Jackson2017-07-16
| | | | | | This is really helpful when debugging. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: t-defdistro: Set distro='' tooIan Jackson2017-01-23
| | | | | | | This means that t-defdistro works without t-chain-test and reinvocation. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Internal change: fix handling of nonempty distro=Ian Jackson2017-01-13
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: default dsc distro config setting: Move to lib.Ian Jackson2017-01-13
| | | | | | We need this for the .dscs we have in tests/pkg-srcs/. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* infra: mirroring and policy hooks: Provide ((( ))) bannersIan Jackson2017-01-12
| | | | | | | When we invoke these, this makes their output easier to find in the middle of the test suite debug scrool. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Arrange not to overwrite .save-env on t-chain-testIan Jackson2017-01-10
| | | | | | | | | | | | | We want .save-env to be the env on entry to the original test, not on execution of t-chain-test with a modified environment. Without this the effects of t-defdistro might leak into the execution of tests/setup/examplegit. This is no good because tests/setup/examplegit relies in the -dtest-dummy which is our usual dgit runes. (Or to put it another way, examplegit uses many suites which are not (yet) set up properly by t-defdistro.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: defdistro-rpush: Remove workaround for missing isuite paramIan Jackson2017-01-09
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Provide t-defdistro (for use with t-alt-test)Ian Jackson2017-01-09
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: t-tstunt: When looking for real thing, strip stunt from PATHIan Jackson2017-01-09
| | | | | | | Otherwise if we run this again in a fresh environment, the wrapper may be on PATH even though DGIT_TEST_REAL_<FOO> is not set. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Mark the start of t-okIan Jackson2017-01-09
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Support varying debian aliasIan Jackson2017-01-09
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Fail tests if we look up any debian configIan Jackson2017-01-09
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Allow overriding of -dtest-dummy dgit argumentIan Jackson2017-01-08
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Parse Dgit: field properly (look for initial \w+ only)Ian Jackson2017-01-08
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Generalise DGIT_TEST_REAL_<FOO> handlingIan Jackson2017-01-08
| | | | | | No overall functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Shell bug: avoid local=$(....) as it defeats set -eIan Jackson2017-01-06
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: t-make-badcommit: Generate a commit we can fix upIan Jackson2017-01-06
| | | | | | | | | | | This is very like a commit generated by #849041. The wrongness is the same. The difference is that it's not in a dgit-generated merge, but the fixup script doesn't care about that. The existing test case which uses this (drs-push-rejects) still sees badness and is therefore still happy. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Break out t-make-badcommitIan Jackson2017-01-06
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>