summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* test suite: Test that we can copy an orig from bpdIan Jackson2019-01-06
| | | | | | | Manually move just the .orig from the bpd to `..'. Then check that when we are done they are (links to) the same file. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Test --clean-git[-ff],alwaysIan Jackson2019-01-06
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: clean: Do check the tree even when building in playtreeIan Jackson2019-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we might be doing quilt fixup, then the quilt fixup's attempt to merge back into master might fail if there are uncommitted debian/patches. So it is sometimes wrong to just not clean at all. We don't want the behaviour to depend on the source package format, and ideally not on the clean mode. Also, the user may have forgotten to `git add', in which case they will thank us for spotting their mistake. In the original design table in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910705#56 says this for this case /: disregarded would be fine to delete but ** better to trip ? ** ** want opt to disregard ** but this was not implemented at the time. So implement that now. I think I have concluded that with -wg and -wgf the right way to turn these new failures into successes is to have a way to have the clean actually done. If that is not wanted, one can say -wn instead. This is particularly true given that ignoring the problem can produce confusing failure, as seen in #914317. So there will be a new --clean=git[-ff],always shortly. Closes: #914317 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: exmaplegit: Do not leave the tree dirtyIan Jackson2019-01-06
| | | | | | | | This test setup facility passed a dirty working tree to all of its consumers. That was not really intended or useful, and is about to start causing trouble. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Pass --no-source-only-changes to pbuilder and cowbuilderIan Jackson2019-01-05
| | | | | | | | | | | This will break with older versions of pbuilder and cowbuilder, unfortunately. That breakage can be worked around by passing dgit one or both of the new options: --pbuilder!:--no-source-only-changes --cowbuilder!:--no-source-only-changes Closes: #904862. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: pretend-pbuilder: Reject unknown optionsIan Jackson2019-01-05
| | | | | | The failure to do this was simply a bug. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: manpages-format: pass --warningsIan Jackson2018-11-08
| | | | | Suggested-by: Colin Watson <cjwatson@chiark.greenend.org.uk> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* 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: push-source-with-changes: Make it test -wddaIan Jackson2018-10-13
| | | | | | | | | | We have plenty of other places where we used -wddn or ,no-check. Here we have an opportunity to test -wdda: create a ~ file (which would be ignored), clean everything else, and check that -wdda fails but the default (-wdd) succeds. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: push-source*: Drop --dpkg-buildpackage:-dIan Jackson2018-10-13
| | | | | | | | | These have been here since these test was created. I think this must have been done by copying the example of some other tests - but those other tests didn't use the `example' test package and actually needed it. `example' does not. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Demand that all clean modes are handled by clean_tree_checkIan Jackson2018-10-13
| | | | | | | | We've dealt with all the cases now, so we can add the default. Also, in the test suite. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: -wn clean check is a no-opIan Jackson2018-10-13
| | | | | | | Handle this explicitly in the clean_tree_check conditional and in the test suite. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: -wg / -wgf clean check is a no-opIan Jackson2018-10-13
| | | | | | | Document this, and handle it explicitly in the clean_tree_check conditional and in the test suite. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: dgit: Test that -wd catches the uncommitted changesIan Jackson2018-10-13
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: --clean=dpkg-source: Check for untracked unignored filesIan Jackson2018-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We would like to spot if the user forgot to `git add' a file. This can be done by calling clean_tree_check_git, after rules clean (if applicable). We need to make this configurable. We do so via the clean mode, with a comma-separated checking control suffix (and short aliases) like we did for --clean=git,ignores. The default should be cautious, ie to do this check, but often the user will want to disable it because the source package has a buggy clean target or no or insufficient .gitignore. Existing users should probably get the new check until they choose otherwise (which we have made easier for them with the .clean-mode-newer config option). So we change the meanings of -wd and -wdd to include the new check, and provide new build modes ...,no-check aka -wdn / -wddn to disable it. To implement this we introduce a new clean_tree_check_git_wd function to do the actual work, particularly because both during cleaning and cleanliness checking, we want to print some hints to the user if the check fails. We can't do the new check if we applied patches dirtily to run the rules target, because it will trip over the result of patch application. This way of working is just too poor to support this new check. The test suite generally tests the default versions, not the no-check versions. We must teach the test to expect the new check. This is most easily done with a separate case for the check side of the -wd clean modes. And we need to support the no-check variant too, because: The push-source-with-changes test does in fact work with a built tree and needs to test the no-check variant. The gbp tests sometimes involve patch application. Rather than trying to predict which of them do (in which cases there would be no clean check), we force them all to ,no-check. The oldnewtagalt test can use -wgf. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: lib-build-modes: Honour $cleanmodes_dpkgsource_extraIan Jackson2018-10-13
| | | | | | Nothing sets this now so NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: lib-build-modes: Reformat a couple of linesIan Jackson2018-10-13
| | | | | | | | This will make forthcoming change a less disruptive diff. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: clean_tree_check: Reorganise command constructionIan Jackson2018-10-13
| | | | | | | | This will make it easier to make the command vary. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Implement clean_tree_check for mode -wcIan Jackson2018-10-13
| | | | | | | | | | | | | This part of the fix for #910705. This makes -wc actually work with build_source. But per the discussion in #910705 we want to implement some checking in dpkg-source[-d] mode too. We need to teach the test suite about this notion of checking cleanlines rather than cleaning. For now we wildcard C*. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: gdr-makepatches7: Test dgit with missing git-debrebaseIan Jackson2018-10-04
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: gdr-makepatches7: Fix test for broken git-debrebaseIan Jackson2018-10-04
| | | | | | | | | | | dgit should treat git-debrebase not existing the same way as it exiting 7 (which in fact, is the same way it treats it succeeding). We are going to fix that. But first we need to make this test case not expect dgit to break in this situation. To test dgit with an actually *broken* git-debrebase, we specify `false' instead. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* i18n: po4a: Add a test that po4a.cfg is up to dateIan Jackson2018-10-04
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Test that the binary packages can be builtIan Jackson2018-10-04
| | | | 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>
* test suite: i18n-messages: Test message translationIan Jackson2018-09-29
| | | | | | | We test just one of the messages I provided for en_US.UTF-8. That's probably sufficient. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: New restriction x-dgit-out-of-tree-onlyIan Jackson2018-09-29
| | | | | | This is filtered out of debian/tests/control, but honoured in-tree. 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: Test dgit build --build=Ian Jackson2018-08-26
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: build-modes-*: Provide stunt dpkg-deb to pass -ZnoneIan Jackson2018-08-26
| | | | | | This speeds it up from about 105 seconds to about 90, on my laptop. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: tstunt debchange: Use execIan Jackson2018-08-26
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: Test dgit build with bpdIan Jackson2018-08-26
| | | | | | It's not expected to work. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: break out build-modes-sourceIan Jackson2018-08-26
| | | | 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>
* test suite: sbuild-gitish: Do not use build-products-dirIan Jackson2018-08-26
| | | | | | | | The runes in the manpage assume it's not set, and we run sbuild directly anyway. We are about to check that nothing ends up in .. which is not true for this test. 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: run-all: Understand `:' speciallyIan Jackson2018-08-26
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: run-all: Move setting of TESTSCRIPTSIan Jackson2018-08-26
| | | | | | NFC Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: run-all: Honour DGIT_TESTS_TMPDIRIan Jackson2018-08-26
| | | | | | | | | | | If this variable is set, tests/tmp will be made a symlink to a real subdirectory under $DGIT_TESTS_TMPDIR. The real subdirectory will be removed and recreated as tests/tmp would otherwise be. I set it to /run/user/`id -u`/dgit-tests-tmp Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: run-all: Without --progressive, rm and recreate tests/tmpIan Jackson2018-08-26
| | | | | | | | | This arranges to rerun tests/setup/ scripts, which wouldn't otherwise happen; that is IMO a bug. While we are here, introduce $tmpdir. 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>
* test suite: gdr-makepatches7: use t-make-origIan Jackson2018-08-26
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: gdr-fresh: use t-make-origIan 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: gdr-new-upstream: Test updating existing clog entryIan Jackson2018-08-26
| | | | | | This is the test case for #905888. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* git-debrebase: Use debchange for new-upstream changelog entryIan Jackson2018-08-26
| | | | | | Closes: #905888. 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: debchange: Work around faketime TZ bugIan Jackson2018-08-26
| | | | | | | | | faketime's CLI does not permit correct unparsing of times in arbitrary timezones. So we must save and restore TZ. See #907264. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* test suite: debchange: Freeze timeIan Jackson2018-08-26
| | | | | | | Use faketime's advanced format. Otherwise if debchange takes too long, the timestamp generated by debchange is not what we expected. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>