summaryrefslogtreecommitdiff
path: root/tests/lib
Commit message (Collapse)AuthorAge
* 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>
* test suite: Do not tolerate any stderr output from git-fsckIan Jackson2017-01-05
| | | | | | | | | | We must tolerate notice: HEAD points to an unborn branch (master) notice: No default references which are generated by some of our existing test cases and are pretty much harmless. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Introduce t-expect-fsck-failIan Jackson2017-01-05
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Make expect_fsck_fail contain objidsIan Jackson2017-01-05
| | | | | | This will make it possible to be stricter. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Merge tag dgit/2.14 into `defence in dgit-repos-server' branchIan Jackson2017-01-05
|\ | | | | | | | | | | | | | | | | | | Fix up semantic conflict: the new git-fsck test (in 2.14) fails on the new broken commits (in the `defence in dgit-repos-server' branch). We need to disable this. Ideally we would make a tighter test, but that's too much to do in a merge. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
| * test suite: Run git-fsck a lotIan Jackson2017-01-04
| | | | | | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
| * test suite: Introduce t-ok.Ian Jackson2017-01-04
|/ | | | | | | | | | | No functional change. perl -i~ -pe 's/^echo ok\.$/t-ok/' tests/tests/*[^~] perl -i~ -pe 's/^echo ok\.$/t-ok/' tests/setup/*[^~] perl -i~ -pe 's/^echo done\.$/t-ok/' tests/tests/*[^~] perl -i~ -pe 's/^echo done\.$/t-ok/' tests/setup/*[^~] Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Provide and use stunt lintian and debuildIan Jackson2016-12-19
| | | | | | | | | This avoids lintian complaining about our stupid test packages. We need the stunt debuild because debuild likes to launder the environment, removing our stunt lintian from PATH ! Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: t-archive: DTRT if $suite is not sidIan Jackson2016-11-07
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Pass --force-distribution to dchIan Jackson2016-11-07
| | | | | | If it's wrong, we know what we're doing. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Introduce $t_archive_methodIan Jackson2016-11-06
| | | | | | | | | * Indirect t-archive-none and t-archive-query via this variable * Rename t-archive-updated; it is for callers that have updated aq/package.$suite.$p. There is one out-of-lib caller. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Change t-has-parent to t-has-parent-or-isIan Jackson2016-10-30
| | | | | | | | | This is only used by the inarchivecopy test. And that ought not to fail if there is no into-suite pseudomerge: that is, when the suite branch contains the intended commit, rather than something merging the intended commit into the suite branch. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: t-splitbrain-pushed-good--unpack: Handle new .origsIan Jackson2016-10-30
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Test --dgit-view-save everywhereIan Jackson2016-10-30
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Make t-ref-same* errors better by tracking and printing namesIan Jackson2016-10-30
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Make t-refs-same* not wrongly ignore some nonexistent refsIan Jackson2016-10-30
| | | | | | | | | | Previously, t_ref_val="" was meant to mean "no refs specified yet" but could also arise from "ref was specified but did not exist". Distinguish these two cases, by using t_ref_val="" to mean only the latter. "No refs specified yet" is represented as t_ref_val unset. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Provide t-has-parentIan Jackson2016-10-30
| | | | | | No callers yet. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>