summaryrefslogtreecommitdiff
path: root/debian/tests
Commit message (Collapse)AuthorAgeFilesLines
* Include everything in our pkg-config autopkgtestDavid Kalnischkies2025-05-191-7/+59
| | | | | | | | | | | GCC defaults to C++17 currently, but our library users could be on other (newer/older) standard still e.g. by explicit request, so to avoid accidentally breaking them the pkg-config-test is adapted to include all of our public headers as a smoke test for if you can build an application against our library in a certain C++ standard. The test script is also adapted to be runnable outside of autopkgtest like in our CI or manually.
* d/t/control: Don't depend on gdb-minimal.Sergio Durigan Junior2025-01-111-1/+1
| | | | | | | | gdb-minimal will soon be dropped from the archive; it doesn't offer any advantages over the gdb binary package. Just depend on gdb directly. Signed-off-by: Sergio Durigan Junior <sergiodj@debian.org>
* debian: Plug sqv into the package buildJulian Andres Klode2024-12-221-0/+1
| | | | | | | | | | | | | | Our goal is for each platform to have one blessed OpenPGP verification system: Platforms that support sqv get sqv, platforms that don't get gpgv. To do so we hardcode the architecture list at build time. At build time we check if /usr/bin/sqv exists, which is the condition that apt uses to see if it should build with sqv support. We use a slight hack here to build with sqv on the official Debian buildds but use gpgv on Ubuntu by abusing the fact that Ubuntu resolves alternative build dependencies, and gpgv is installed in the buildd image.
* Remove gnupg and versioned gpgv test dependsJulian Andres Klode2024-12-201-2/+1
|
* Use sq in the test suite, remove apt-keyJulian Andres Klode2024-12-191-0/+2
| | | | | | | | | | | | | Remove the test case for MD5 and expired signatures, as we can't create them (can't set signing digest, and can't set signature expiry). Tests for them have been added to test-method-gpgv instead. We override sq in a function with cert-store and key-store set to none. This supports both sq 0.40 and sq 1.0.
* Introduce automatic pager for read commandsJulian Andres Klode2024-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically show the output of `show`, `policy`, `list`, `search`, `showsrc` in a pager. The pager setup is inspired by git's pager setup. Notably, the pager is found using APT_PAGER and PAGER variables. We wait for the pager to be setup somewhat correctly by using a notify pipe to figure out whether execvp() was succesful - then the pipe will read EOF as the other end got closed by CLOEXEC during exec - or not, then the pipe will contain an errno. We set up the correct handlers for signals and exit to close the fds and wait for the pager. Notably inside the signal handler we cannot flush our streams, only close them, so there is some duplication. We call the InitOutputPager() function from inside the various Do...() functions rather than setting it up generally in InitOutput(). Doing so allows us to first render the progress without a pager, and then setup the pager for the content only which improves user experience. When we setup a pager we also take care to disable standard input, as we should not be prompting users while a pager is running (the pager will be reading from the tty directly). We do this by dup2-ing() a /dev/null over it; if we just close()d the fd, another open() might reuse the fd number and problems could occur.
* test: Ensure we test both gpgv-g10code and gpgv-sqJulian Andres Klode2024-11-221-0/+1
|
* tests: Temporarily disable valgrind-if-available on armhf and ppc64elJulian Andres Klode2024-11-201-1/+1
|
* Merge branch 'json-config' into 'main'Julian Andres Klode2024-11-141-0/+1
|\ | | | | | | | | JSON: Pass options to hooks in hello message See merge request apt-team/apt!389
| * test: Prettify JSON tests using jqJulian Andres Klode2024-11-121-0/+1
| | | | | | | | | | | | | | | | This also ensures that our JSON is actually correct JSON. echo may fail now with EPIPE, given that it is multiline, so wrap it in 2>/dev/null
* | Only run valgrind in tests if valgrind available on hostнаб2024-11-111-1/+1
|/
* tests: Add g++ dependency to pkg-config testJulian Andres Klode2022-05-171-1/+1
|
* Link interactive helpers against system libapt for autopkgtestDavid Kalnischkies2022-05-071-3/+3
| | | | | | Building the library just so we can build the helpers against it is not only wasteful but as we are supposed to test the system we can use that as an additional simple smoke test before the real testing starts.
* Avoid building inside the source dir in autopkgtestDavid Kalnischkies2022-05-071-8/+19
| | | | | | | | | autopkgtest says: Tests may not modify the source tree (and may not have write access to it). We don't really modify the source of course, but we created our build/ directory in the tree, which seems to work just fine (for now), but lets be nice.
* Mark pkg-config-test autopkgtest as superficialDavid Kalnischkies2022-05-072-17/+27
| | | | | | Reorganising the control file allows this simple test to run first and be marked as superficial which makes no practical difference, but is more correct.
* Try to show core dump info in test frameworkDavid Kalnischkies2021-08-282-1/+2
| | | | | | | | If the system tells us that a core dump was created we should try to display the contained info as that system might not be easily available when we see the error (like C-I or autopkgtest). Gbp-Dch: Ignore
* Require dpkg >= 1.20.8Julian Andres Klode2021-04-211-1/+1
| | | | | | We use a Breaks for the binary package instead of adding a versioned depends, as Breaks will cause apt solver to upgrade dpkg, while depends would make apt try to remove apt as first choice.
* test: Use valgrind to ensure Acquire::Queue-Mode=access does not crashJulian Andres Klode2019-08-151-1/+2
| | | | | | Unfortunately for us, apt update with Acquire::Queue-Mode=access does not always crash on a real system, so run the whole thing in valgrind.
* Fix pkg-config-test autopkgtestJulian Andres Klode2019-06-171-1/+2
|
* Add pkg-config files for the apt-pkg and apt-inst librariesCorentin Noël2019-03-082-2/+25
| | | | Closes: #439121
* tests: install aptitude for test-method-mirrorDavid Kalnischkies2018-02-191-1/+1
| | | | | | | | This is an optional dependency for the test, but the skipping of the test is very noisy and checking that an unchanged aptitude isn't downright exploding with our libapt isn't a bad idea either. Gbp-Dch: Ignore
* debian/tests/control: Add dpkg so we get triggered by itJulian Andres Klode2017-10-261-1/+1
| | | | | | We do want to get our autopkgtests triggered by dpkg uploads in Ubuntu, but this does not happen because we don't have an explicit dependency on it. Add one.
* reset HOME, USER(NAME), TMPDIR & SHELL in DropPrivilegesDavid Kalnischkies2016-11-091-1/+1
| | | | | | | | | We can't cleanup the environment like e.g. sudo would do as you usually want the environment to "leak" into these helpers, but some variables like HOME should really not have still the value of the root user – it could confuse the helpers (USER) and HOME isn't accessible anyhow. Closes: 842877
* tests/control: Handle the gpg1/gpg2 mess a bit betterJulian Andres Klode2016-08-191-1/+4
| | | | | | | Hardcoding gpgv1 and gnupg1 breaks Ubuntu, because on Ubuntu, these packages do not exist yet. Instead allow gnupg (<< 2) for gnupg1 and gnupg2 for gnupg (>= 2), so we cover all potential combinations.
* add the gpg-classic variant to the gpgv/gnupg or-groupDavid Kalnischkies2016-08-171-1/+2
| | | | | | We need to support partial upgrades anyhow, so we have to deal with the different versions and your tests try to ensure that we do, so we shouldn't make any explicit higher requirements.
* debian: make autopkgtest run with CMake build dirJulian Andres Klode2016-08-101-5/+6
|
* CMake: debian: Switch packaging over to CMake and dh 9Julian Andres Klode2016-08-061-0/+1
| | | | | | | | | | | This new packaging is much easier to read, although the duplication in the install files is a bit annoying. We should probably also get rid of the movefiles for solvers, planners, and https method; but then we have to keep track of which methods exist in the apt package. Another disadvantage is that building only the documentation packages also requires building the code, as there's no way to turn off code building in the project.
* eipp: let apt make a plan, not make stuff planeDavid Kalnischkies2016-06-291-1/+1
| | | | | | | | | | | | | | Julian noticed on IRC that I fall victim to a lovely false friend by calling referring to a 'planer' all the time even through these are machines to e.g. remove splinters from woodwork ("make stuff plane"). The term I meant is written in german in this way (= with a single n) but in english there are two, aka: 'planner'. As that is unreleased code switching all instances without any transitional provisions. Also the reason why its skipped in changelog. Thanks: Julian Andres Klode Gbp-Dch: Ignore
* eipp: provide the internal planer as an external oneDavid Kalnischkies2016-06-271-0/+1
| | | | | | Testing the current implementation can benefit from being able to be feed an EIPP request and produce a fully compliant response. It is also a great test for EIPP in general.
* Fix bug where the problemresolve can put a pkg into a heisenstateMichael Vogt2016-03-151-1/+1
| | | | | | | | | | | | | | | | The problemresolver will set the candidate version for pkg P back to the current version if it encounters an impossible to satisfy critical dependency on P. However it did not set the State of the package back as well which lead to a situation where P is neither in Keep,Install,Upgrade,Delete state. Note that this can not be tested via the traditional sh based framework. I added a python-apt based test for this. LP: #1550741 [jak@debian.org: Make the test not fail if apt_pkg cannot be imported]
* tests: Depend on libfile-fcntllock-perl to shut up dpkg-gencontrolJulian Andres Klode2015-12-141-1/+2
| | | | | | | | | | | Ubuntu's autopkgtest server always prints dpkg-gencontrol: warning: File::FcntlLock not available; using flock which is not NFS-safe which is somewhat annoying. Work around that by depending on that perl stuff for the test suite. Gbp-Dch: ignore
* autopkgtest: use the quiet mode as for travis and coDavid Kalnischkies2015-11-281-1/+1
| | | | Git-Dch: Ignore
* tests: don't use hardcoded port for http and httpsDavid Kalnischkies2015-09-151-1/+1
| | | | | | This allows running tests in parallel. Git-Dch: Ignore
* sync TFRewrite*Order arrays with dpkg and dakDavid Kalnischkies2015-05-111-0/+1
| | | | | | | | | | dpkg and dak know various field names and order them in their output, while we have yet another order and have to play catch up with them as we are sitting between chairs here and neither order is ideal for us, too. A little testcase is from now on supposed to help ensureing that we do not derivate to far away from which fields dpkg knows and orders.
* streamline display of --help in all toolsDavid Kalnischkies2014-11-091-0/+1
| | | | | | | By convention, if I run a tool with --help or --version I expect it to exit successfully with the usage, while if I do call it wrong (like without any parameters) I expect the usage message shown with a non-zero exit.
* add gnupg and gnupg2 as test-dependencyDavid Kalnischkies2014-09-271-2/+2
| | | | | | | apt can work with both, so it has an or-dependency on them, but the tests want to play with both of them. Git-Dch: Ignore
* Run autopkgtest tests with "env -i" to avoid pollution from the host envMichael Vogt2014-09-031-1/+3
| | | | Closes: #759655
* Use @builddeps@ in the debian/tests/control fileMichael Vogt2014-07-171-1/+1
|
* build: Convert from DebianDoc SGML to DocBook XMLGuillem Jover2014-07-081-1/+1
|
* fix test-apt-ftparchive-cachedb-lp1274466 and apt-internal-solver testsMichael Vogt2014-06-111-1/+1
|
* fix autopkgtest testsMichael Vogt2014-06-112-1/+2
|
* correct LD_LIBRARY_PATH and config loading for apt-helperDavid Kalnischkies2014-03-131-0/+1
| | | | | | | Mostly ensures that we use the build methods and not the system provided methods in the tests (if we don't want it that way). Git-Dch: Ignore
* unset LANGUAGE in the testing framework directlyDavid Kalnischkies2014-03-131-3/+0
| | | | Git-Dch: Ignore
* initial version of apt-helperMichael Vogt2014-02-271-0/+1
|
* Bug#739988: Fix autopkgtest missing dependencies and localeMartin Pitt2014-02-252-1/+4
| | | | | | | | debian/tests/control: Add missing build-essential, fakeroot, and wget test dependencies. debian/tests/run-tests: Pin locale to C to avoid test failures in other locales.
* add missing libdb-dev to debian/tests/controlMichael Vogt2014-02-221-1/+1
|
* use "Restrictions: allow-stderr and avoid apt-stderr.log in ↵Michael Vogt2014-02-132-5/+3
| | | | debian/tests/run-tests
* run autopkgtest against the installed aptMichael Vogt2013-12-131-3/+14
|
* add autopkgtestMichael Vogt2013-11-292-0/+9