summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* tainted-objects: tests: Enhance debpolicy-newreject moreIan Jackson2022-12-29
| | | | | | | Test that the previously-rewound-from tainted object is found early, and can be overridden permanently. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tainted-objects: tests: Insist that test-dummy supports itIan Jackson2022-12-29
| | | | | | This will ensure that the direct command fallback is tested, I think. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tainted-objects: tests: Fix and improve debpolicy-newrejectIan Jackson2022-12-28
| | | | | | | | | | | | Replace several t-expect-push-fail with t-expect-push-fail-tainted. Abolish the adhoc use of --force-push-tainted. Adjust the expected errors accordingly. Fix the expected errors to use anchored patterns (see the comment for t-expect-push-fail-tainted). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: debpolicy-newreject: Fix a mistaken t-expect-push-failIan Jackson2022-12-28
| | | | | | | This is not anything to do with push. (Not sure why this isn't a call to t-git-objects-not-present.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tainted-objects (cleanup): Improve t-expect-push-fail-taintedIan Jackson2022-12-28
| | | | | | | Make it take one string, and expect the same message both locally and when printed by the remote. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tainted-objects (cleanup): Use common message generator in dgitIan Jackson2022-12-28
| | | | | | The messages now come out the same. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tainted-objects (cleanup): Move t-expect-push-fail-tainted to libIan Jackson2022-12-28
| | | | | | And rename it. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tainted-objects tests: Test for --d-n-f-f when not sufficientIan Jackson2022-12-28
| | | | | | | Check that saying --deliberately-not-fast-forward when it's not actually reound, doesn't help. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tainted-objects tests: Check error messages are in right contextIan Jackson2022-12-28
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: Test that tainted commits are retriableIan Jackson2022-12-28
| | | | | | And test that they still fail if forced. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: Provide t-expect-push-fail-retriablyIan Jackson2022-12-28
| | | | | | Our new checks on tainted objects will use this. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: Bodge debpolicy-newreject for forthcoming work (2)Ian Jackson2022-12-28
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: Bodge debpolicy-newreject for forthcoming workIan Jackson2022-12-28
| | | | | | | | | | | The early detection is going to change quite a few some error messages, since they'll be generated from different information in a different way. For now, pass the force option that forces the previous behaviour, where the server rejects it. That retains the error message. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: debpolicy-taintrm: Add before-cut test tooIan Jackson2022-12-27
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: --quilt=try-linear: Convert the test caseIan Jackson2022-12-26
| | | | | | Testing only the new spelling is fine I think. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: --quilt=auto: Add a test caseIan Jackson2022-12-26
| | | | | | Apparently we don't have one of these! Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Scan for duplicated orig tarballs with different names (test)Ian Jackson2022-12-26
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: sbuild-gitish: Pass -v to sbuildIan Jackson2022-12-26
| | | | | | | | This doesn't appear in the default rune, but we want it for our testing. Hopefully adding it won't cause bad divergence between test case and reality. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* include-binaries: Silently tolerate mentions of debian/Ian Jackson2022-12-26
| | | | | Closes: #1026918 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: rpush: Add test cases for configurable aliasIan Jackson2022-12-11
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: rpush: Break out t-dgit-rpushIan Jackson2022-12-11
| | | | | | | | | We're going to want to call this several times. Use the config override here. This is going to become the test case for all that. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Make rpush be a configurable alias like pushIan Jackson2022-12-11
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: test rpush-sourceIan Jackson2022-12-11
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: rpush: Remove some commented out codeIan Jackson2022-12-11
| | | | | | This doesn't seem relevant any more, if it ever was. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: tests: include-binaries: Test forbidden stuff (2)Ian Jackson2022-12-11
| | | | | | | | | | | | Check that we get the expected warnings, and that dpkg-source hates a named pipe. (In practice if I nobble the code in dgit which checks all this, we get a different quilt fixup error, but not after dgit caused tar to read files it shouldn't and make unreferenced git objects out of them, which is still bad.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: tests: include-binaries: Test forbidden stuff (1)Ian Jackson2022-12-11
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: tests: include-binaries: Basic testIan Jackson2022-12-11
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Do not use gdr to make patches with unmarked breakwater startIan Jackson2022-12-10
| | | | | | | | | | | | | | We must also adjust the gdr-fresh test case: now its patches are made by dgit, not gdr. We now check that they are correct (that is, that dgit is now happy with things) but not what they look like). Several other test cases test the dgit gdr makepatches functionality, calling t-gdr-made-patches (via t-gdr-good, for example). (I have verified that changing the remaining "return 1" from branch_is_gdr to "return 0" does cause many test failures.) Closes: #1015779 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: quilt-splitbrains: Test that we gen cache if neededIan Jackson2022-11-11
| | | | | | Have tested that this fails before the previous fix. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: gdr-import-dgitview: Test conversion mismatchIan Jackson2022-11-11
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: gdr-import-dgitview: Make tree good before failing testIan Jackson2022-11-11
| | | | | | | Otherwise the check we're about to add spots the problem before the error we are checking for occurs. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit push: Add a test that we can make it mean push-sourceIan Jackson2022-09-04
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit push: Update testsIan Jackson2022-09-04
| | | | | | | | | | | | Change the global test git config to reject plain "git push". Update almost all tests to use "push-built". In some cases, change to using "push-source". In one case (chosen essentially arbitrarily), use the config override and continue using push to mean push-built. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: unrepresentable check: Restrict occurrence of LATE:Ian Jackson2022-09-03
| | | | | | | | | This represents a poor outcome which happily no longer occurs unless the user is using the deprecated-by-us "single-debian-patch" features. For more discussion see comments in quilt_fixup_dpkgsource_singlepatch. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: unrepresentable check: Remove BUILD: outcome caseIan Jackson2022-09-03
| | | | | | This represents a poor outcome which happily no longer occurs. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Provide --quilt=singleIan Jackson2022-09-03
| | | | | | | This is to replace single-debian-patch. Closes: #1018984 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit; Pass --include-removal to dpkg-source -bIan Jackson2022-09-03
| | | | | | | Now, with single-debian-patch, we can still handle file removals. (This may fix other corner cases too.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: unrepresentable check: Don't tolerate symlink creationIan Jackson2022-09-03
| | | | | | | | | | | | git diff can represent changes to symlinks, but dpkg-source uses diff(1) to apply changes, and git diff cannot. The result if we permit them is that we end up making source packages that can't be built, or aren't treesame to our HEAD. Reject this early. This resolves the error handling regression in dgit: quilt fixup: Don't use dpkg-source --commit, but git diff Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: unrepresentable check: Normalise the mode for execIan Jackson2022-09-03
| | | | | | | | | | | | | Now we use git diffs, which can represent changes to the executability of files. dpkg-source uses diff(1) to apply these. So it all works. Handle this by normalising the +x bits before seeing if the mode changed. Now we properly support executable files. Closes: #995056 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: quilt fixup: Don't use dpkg-source --commit, but git diffIan Jackson2022-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | There are many things that dpkg-source can successfully extract, but which it can't create. (This is because dpkg-source largely delegates application to diff(1), and diff can do many more things nowadays.) Most real packages were made with git-format-patch or equivalent nowadays, so use of these features is common. (Hence #949675 and #995056, where even glibc has patches that dpkg-source cannot make.) Right now the practical consequences are: * Creating an executable file is fixed. This actually completes the work for #949675. * Creating a symlink has a regression in the error handling. Previously, dpkg-source --commit failed during quilt fixup. Now, we happily git diff which generates a patch that dpkg-source can't apply. We're going to fix this soon by aligning the representable change checking with reality. * It's faster and less complicated. Closes: #1018143 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: unrepresentable: Add test case for adding executable fileIan Jackson2022-09-03
| | | | | | | | | | | | | | | | | | A test case like this was removed in a0ac573f8359 dgit: tolerate making quilt patches creating +x files That removal was a mistake. We should have changed the test outcome. In fact, right now the test outcome is that we can't in fact make new patches like this, because dpkg-source can't. When we try, we createa source package which doesn't represent our git tree. However, dpkg-source can *apply* such patches if they already exist. In #949675, there was an *existing* patch with this property. We don't test for this separately, and never have. Instead, I propose to make all dpkg-source-applicable patches creatable by dgit. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: Test dpkg-source debian-single-patch with strange changesIan Jackson2022-09-03
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: unrepresentable: Prep for richer bahvioursIan Jackson2022-09-03
| | | | | | | | | | | | | We are going to want to run these tests in different modes, and the results might vary between mode. So encode the expected results in the *arguments* to the sub-test finish subroutine (which we rename). The filenames go on the sub-test start subroutine. finish is going to gain features. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: gdr: Provide a way to pass --diagnoseIan Jackson2022-05-28
| | | | | | I wanted this to debug gdr-import-dgitview wrt #1005873. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests: Update all using tests/update-db-compatIan Jackson2022-01-02
| | | | | | Closes: #1002927. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests/update-db-compat: Call git gcIan Jackson2022-01-02
| | | | | | | We want to pack everything down, as we're going to commit this stuff as tarballs into dgit's permanent history ! Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests/update-db-compat: Adjust worktrees too.Ian Jackson2022-01-02
| | | | | | Now all the tests pass even with the debhelper that doesn't support 5. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests/update-db-compat: Strip all git-filter-branch original/ refsIan Jackson2022-01-02
| | | | | | | Apparently some of our trees have these already. This stops g-f-b from working. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests/update-db-compat: Some more refactoringIan Jackson2022-01-02
| | | | | | Break out git_filter_strip_origs. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* tests/update-db-compat: Add a reassuring message.Ian Jackson2022-01-02
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>