summaryrefslogtreecommitdiff
path: root/test/libapt
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge remote-tracking branch 'donkult/debian/sid' into debian/experimentalMichael Vogt2014-06-181-0/+35
|\| | | | | | | | | Conflicts: apt-private/private-install.cc
| * fix SubstVar to be usable as a replace_all methodDavid Kalnischkies2014-06-181-0/+35
| | | | | | | | | | | | | | The name suggests that it is supposed to substitute a variable with a value, but we tend to use it in a more liberal replace_all() fashion, but this breaks if either of the parameters is empty or more importantly if two "variable" occurrences follow each other directly.
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-06-181-1/+1
|\| | | | | | | | | Conflicts: debian/changelog
| * Fix uninitialized valueMichael Vogt2014-05-281-1/+1
| | | | | | | | Reported-By: scan-build
* | improve pkgTagSection scanning and parsingDavid Kalnischkies2014-05-101-0/+179
| | | | | | | | | | | | Removes the 256 fields limit, deals consistently with spaces littered all over the place and is even a tiny bit faster than before. Even comes with a bunch of new tests to validate these claims.
* | use HashStringList in the acquire systemDavid Kalnischkies2014-05-091-8/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | It is not very extensible to have the supported Hashes hardcoded everywhere and especially if it is part of virtual method names. It is also possible that a method does not support the 'best' hash (yet), so we might end up not being able to verify a file even though we have a common subset of supported hashes. And those are just two of the cases in which it is handy to have a more dynamic selection. The downside is that this is a MAJOR API break, but the HashStringList has a string constructor for compatibility, so with a bit of luck the few frontends playing with the acquire system directly are okay.
* | add a simple container for HashStringsDavid Kalnischkies2014-05-091-12/+52
| | | | | | | | | | | | | | | | APT supports more than just one HashString and even allows to enforce the usage of a specific hash. This class is intended to help with storage and passing around of the HashStrings. Git-Dch: Ignore
* | Merge branch 'feature/abspath' into feature/apt-install-debMichael Vogt2014-04-281-0/+4
|\ \
| * | fix testsMichael Vogt2014-04-281-0/+4
| | |
* | | Merge branch 'feature/abspath' into feature/apt-install-debMichael Vogt2014-04-281-1/+7
|\| | | | | | | | | | | | | | Conflicts: test/libapt/fileutl_test.cc
| * | add flAbsPath() as a wrapper to realpath()Michael Vogt2014-04-281-0/+7
| |/
* / Implement Popen() execv helper to avoid popen()Michael Vogt2014-04-281-0/+48
|/
* use Google C++ Testing Framework for libapt testsDavid Kalnischkies2014-04-1628-2085/+1917
| | | | | | | | | | | | My commit 45df0ad2 from 26. Nov 2009 had a little remark: "The commit also includes a very very simple testapp." This was never intended to be permanent, but as usually… The commit adds the needed make magic to compile gtest statically as it is required and links it against a small runner. All previous testcase binaries are reimplemented in gtest and combined in this runner. While most code is a 1:1 translation some had to be rewritten like compareversion_test.cc, but the coverage remains the same.
* clear HitEof flag in FileFd::SeekDavid Kalnischkies2014-04-163-24/+90
| | | | | | | | | fseek and co do this to their eof-flags and it is more logic this way as we will usually seek away from the end (e.g. to re-read the file). The commit also improves the testcase further and adds a test for the binary compressor codepath (as gz, bzip2 and xz are handled by libraries) via the use of 'rev' as a 'compressor'.
* extend FileFd test behond basic permission testsDavid Kalnischkies2014-04-111-10/+99
| | | | | | | | | | We now do Open, Write and Read (the later multiple ways) for each permission and each compressor we have configured to cover more cases and especially ensure that compressors do not change our premissions. This test is also to be credited for discovering the skippos-fix. Git-Dch: Ignore
* Fix insecure file permissions when using FileFd with OpenMode::AtomicMichael Vogt2014-04-101-0/+31
| | | | | | | | | | Commit 7335eebea6dd43581d4650a8818b06383ab89901 introduced a bug that caused FileFd to create insecure permissions when FileFd::Atomic is used. This commit fixes the permissions and adds a test. The bug is most likely caused by the confusing "Perm" parameter that is passed to Open() - its not the file permissions but intead the "mode" part of open/creat.
* Add progressbar to "Dpkg::Progress-Fancy"Michael Vogt2014-03-272-0/+36
| | | | | | A text progressbar is now displayed in the Dpkg::Progress-Fancy mode. It can be turned off via the apt option Dpkg::Progress-Fancy::Progress-Bar=false
* support very long mtab entries in mountpoint discoveryDavid Kalnischkies2014-03-133-0/+40
| | | | | | Old code limited lines to 250 characters which is probably enough for everybody, but who knows… It also takes care of device nodes which start with the same prefix.
* follow method attribute suggestions by gccDavid Kalnischkies2014-03-131-1/+3
| | | | | Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-1318-30/+77
| | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
* warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-1310-9/+14
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* warning: no previous declaration for foobar() [-Wmissing-declarations]David Kalnischkies2014-03-134-5/+14
| | | | | Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations
* implement BuildProfileSpec support as dpkg has in 1.17.2Johannes Schauer2014-03-131-27/+61
| | | | | | | | Build-dependencies are now able to include a <profile.foo …> specification limiting usage similar to already supported [arch …]. More details: https://wiki.debian.org/BuildProfileSpec Closes: 661537
* add default and override handling for Cnf::FindVectorDavid Kalnischkies2014-03-132-3/+39
| | | | | | Automatically handle the override of list options via its parent value which can even be a comma-separated list of values. It also adds an easy way of providing a default for the list.
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-13/+13
|
* Merge remote-tracking branch 'donkult/debian/sid' into debian/sidMichael Vogt2014-01-261-1/+1
|\ | | | | | | | | | | | | Conflicts: apt-private/private-list.cc doc/po/de.po test/integration/framework
| * rework some code to fix some scan-build warningsDavid Kalnischkies2014-01-161-1/+1
| | | | | | | | | | | | | | | | No visible functional changes, just code moved around and additional checks to eliminate impossible branches Reported-By: scan-build Git-Dch: Ignore
* | fix testMichael Vogt2014-01-241-0/+2
| |
* | Merge remote-tracking branch 'upstream/debian/experimental-no-abi-break' ↵Michael Vogt2014-01-211-0/+1
|\ \ | | | | | | | | | | | | | | | | | | into feature/source-deb822 Conflicts: test/integration/test-apt-sources-deb822
| * \ Merge remote-tracking branch 'mvo/feature/source-deb822' into ↵Michael Vogt2014-01-181-2/+2
| |\ \ | | | | | | | | | | | | debian/experimental-no-abi-break
| * \ \ Merge remote-tracking branch 'mvo/feature/source-deb822' into ↵Michael Vogt2014-01-181-2/+2
| |\ \ \ | | | | | | | | | | | | | | | debian/experimental-no-abi-break
| * \ \ \ merged mvo/feature/deb822Michael Vogt2014-01-161-4/+4
| |\ \ \ \
| * | | | | actually register the tempfile removal atexitDavid Kalnischkies2014-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Git-Dch: Ignore
* | | | | | add support for multipl types in one lineMichael Vogt2014-01-201-4/+4
| | | | | |
* | | | | | add support for multiple URIs in deb822 style sources.listMichael Vogt2014-01-201-2/+2
| | | | | |
* | | | | | add Description tag for deb822 sourcesMichael Vogt2014-01-201-2/+2
| |_|_|/ / |/| | | |
* | | | | rename "Suite/Section" to pluralMichael Vogt2014-01-181-2/+2
| |_|/ / |/| | |
* | | | implement suggestion by donkult (thanks!)Michael Vogt2014-01-171-2/+2
| |/ / |/| |
* | | update libapt testMichael Vogt2014-01-161-4/+4
|/ /
* | Merge branch 'debian/sid' into feature/source-deb822Michael Vogt2014-01-041-0/+13
|\|
| * add basic tests for GetTempDir()Michael Vogt2013-12-231-0/+13
| |
* | add unittest for new sourceslist parser as wellMichael Vogt2013-12-052-0/+58
|/
* add "APT::String::Endswith" and automatic adding of ".list" in apt edit-sourceMichael Vogt2013-11-291-0/+18
|
* Merge remote-tracking branch 'mvo/bugfix/dpkg-progress-multiarch' into ↵Michael Vogt2013-10-051-0/+27
|\ | | | | | | debian/sid
| * change maxsplit default from "0" to maxintMichael Vogt2013-10-011-0/+4
| |
| * add maxsplit parameter to StringSplitMichael Vogt2013-09-071-0/+6
| |
| * implement StringSplit() as we need this to fix the dpkg status-fd output parsingMichael Vogt2013-09-071-0/+17
| |
* | use FileFd in HashSum test to unbreak non-linux portsDavid Kalnischkies2013-09-031-16/+16
|/ | | | | | | | | | | | The testcode happily mixes FILE* operations and direct access to fds which is even a bit suprising that it works on linux and worked so long for non-linux ports, so we switch to usage of FileFd instead which provides us with simple fd-only operations. Its overkill for this test as its a bare file and we ask for the descriptor all the time, but it shouldn't hurt to implicitly test it a bit this way. Closes: 721723 Thanks: Aaron M. Ucko
* set MALLOC_CHECK_ and MALLOC_PERTURB_ for testcasesDavid Kalnischkies2013-08-151-2/+2
| | | | | | | In bugreport deb:719629 Paul Wise mentions both to enable some malloc checks and as more testing can't hurt we enable both for all testcases. Git-Dch: Ignore
* rework the parameter creation for the Hashsum testDavid Kalnischkies2013-08-151-3/+5
| | | | | | Avoids having to different places from which test binaries are called Git-Dch: Ignore