summaryrefslogtreecommitdiff
path: root/tests/lib
Commit message (Collapse)AuthorAge
* 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>
* Test suite: Document args to t-has-ancestorIan Jackson2016-10-30
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: t-archive-process-incoming: Process everythingIan Jackson2016-10-30
| | | | | | | | | | | The previous rune wouldn't process any new .origs. And in fact there is no good reason to restrict this. certainly not right now, because right now we are going to want to process whatever is in incoming so that the orig-include-exclude test can easily see what dgit push uploaded. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* default config: Switch to new archive/ tag formatIan Jackson2016-10-22
| | | | | | | Even in non-split-brain mode. Also change the test suite to expect this. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Introduce setup/gnupgIan Jackson2016-10-22
| | | | | | | To work around #841143 and improve performance by amortising gnupg migration cost. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Propagate tmpbase into nested (setup) runsIan Jackson2016-10-22
| | | | | | | This stops t-setup-import wrongly deciding we are in ADT non-shared mode. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: setup import: Cope with nested and multiple importsIan Jackson2016-10-22
| | | | | | | | | | Name the IMPORT file after the setup name. This is important when running under autopkgtest, where all the setups share the tmp directory with each other and with the main test. The setups need distinct IMPORTS. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: t-gbp-example-prep-no-ff: break out from t-gbp-example-prepIan Jackson2016-10-18
| | | | | | No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Filter out .../git-core from PATH so that we catch git-fooIan Jackson2016-10-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git- prefixes: Test suite: Fix t-gbp-example-prepIan Jackson2016-10-16
| | | | | | Broken ever since it was introduced. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Do not fail when git requires --allow-unrelated-histories.Ian Jackson2016-10-16
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Fix entirely-broken tstunt PERLLIB arrangementsIan Jackson2016-10-15
| | | | | | | | | | | | Specifically: * Properly dereference the variable when looking for the stunt dir to be there already * Do not add "." to the path if the path starts out empty. * Crash _with the right message_ in dpkg-parsechangelog if PERLLIB is unset. (PERLLIB mustn't be unset because we're trying to strip our own value from it.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Make t-archive-none idempotentIan Jackson2016-10-08
| | | | | | | No overall functional change just yet, but it means we can wipe our test archives. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Make t-newtag specify maint tooIan Jackson2016-09-26
| | | | | | | | Since actually several tests which use t-newtag are quilty split brain ones which technically require it, although nothing checks this right now. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Test --quilt=unapplied and --quilt=dpmIan Jackson2016-09-26
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: t-gbp-pushed-good: Refactor (nfc)Ian Jackson2016-09-26
| | | | | | | Provide various t-splitbrain-*. These will be needed for tests of --quilt=unapplied and --quilt=dpm. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Test suite: Add t-tstunt-parsechangelog to a couple of testsIan Jackson2016-09-25
| | | | | | inarchivecopy and the quilt-gbp tests just use the `example' package. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>