summaryrefslogtreecommitdiff
path: root/tests/lib
Commit message (Collapse)AuthorAge
* test suite: Run everything with LC_CTYPE=C.UTF-8Ian Jackson2018-11-08
| | | | | | | | | Things are not likely to work otherwise. (If someone wants to try to run dgit in another ctype then I think things will mostly work...) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: t-expect-fail: Set LANGUAGE tooIan Jackson2018-09-29
| | | | | | | The user may have this in their environment, in which case we must squash it too. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests suite; t-expect-fail: Honour expect_fail_lcmessagesIan Jackson2018-09-29
| | | | | | No users yet so NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: t-check-only-bpd: Check $tmp/.. not ..Ian Jackson2018-09-28
| | | | | | | | | | | | | | | The test might call t-ok in $p, say, or in $tmp. The effect of this bug was that in tests where t-ok was called in $tmp, it looked in $tmp/.. which might contain anything, rather than $tmp as intended. That means the test was not effective. Also it causes a spurious failure of t-import-nonnative in the Ubuntu CI infrastructure, where $AUTOPKGTEST_TMP/../autopkgtest-satdep.deb happens to exist. Reported-by: Mattia Rizzolo <mattia@debian.org> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: build-products-dir: Check nothing in ../Ian Jackson2018-08-26
| | | | | | If bpd was set then .. shouldn't have this kind of junk in it. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* gdr-fresh: Honour $bpdIan Jackson2018-08-26
| | | | | | | Nothing depends on this right now, but I don't want to leave this latent bug. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Work if $tmp is on a different filesystem.Ian Jackson2018-08-26
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: t-make-orig: Pass -1 to gzipIan Jackson2018-08-26
| | | | | | This makes everything faster. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: lib-gdr: Factor out t-make-origIan Jackson2018-08-26
| | | | | | NFC, overall. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Update date to one with nontrivial DST in Europe/LondonIan Jackson2018-08-26
| | | | | | This may make more things fail for me if they have timezone bugs. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: dch: Always use tstunt/debchangeIan Jackson2018-08-26
| | | | | | | | | | | | | | We are going to make this more sophisticated, so use it everywhere to avoid duplication. We need to soup up tstunt/debchange so that it does not depend on DGIT_TEST_REAL_DEBCHANGE. If it hasn't been put on the PATH by t-tstunt, that isn't set, and we can just run debchange from PATH. This makes faketime a test dependency for all the tests which don't have NO-DEFAULT. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: unset GIT_EDITOR, so it works if user has that set.Ian Jackson2018-08-19
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: merge: test: Introduce t-merge-conflicted-*Ian Jackson2018-08-11
| | | | | | NFC Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* 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>