summaryrefslogtreecommitdiff
path: root/test/libapt
Commit message (Collapse)AuthorAgeFilesLines
* allow options between command and -- on commandlineDavid Kalnischkies2014-11-102-2/+70
| | | | | | | This used to work before we implemented a stricter commandline parser and e.g. the dd-schroot-cmd command constructs commandlines like this. Reported-By: Helmut Grohne
* add a simple container for HashStringsDavid Kalnischkies2014-11-101-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. The cherry-pick here the un-const-ification of HashType() compared to f4c3850ea335545e297504941dc8c7a8f1c83358. The point of this commit is adding infrastructure for the next one. All by itself, it just adds new symbols. Git-Dch: Ignore
* implement the updated build profile specjosch2014-10-061-9/+20
|
* strip everything spacey in APT::String::StripDavid Kalnischkies2014-09-071-0/+15
| | | | Git-Dch: Ignore
* StringToBool: only act if the entire string is consumed by strtol()Michael Vogt2014-07-161-0/+29
| | | | | | | | | StringToBool uses strtol() internally to check if the argument is a number. This function stops when it does not find any more numbers. So a string like "0ad" (which is a valid packagename) is interpreted as a "0". The code now checks that the entire string is consumed not just a part of it. Thanks to Johannes Schauer for raising this issue.
* build: Convert from DebianDoc SGML to DocBook XMLGuillem Jover2014-07-081-2/+2
|
* 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.
* Fix uninitialized valueMichael Vogt2014-05-281-1/+1
| | | | Reported-By: scan-build
* 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
* do not call make from libapt/run-tests if its called by makeDavid Kalnischkies2013-08-151-3/+5
| | | | | | | | | If we are called by make everything is build already and so this is just a noise nop we can just skip. (Noisy as it complains about being unable to communicate with the other makes to coordinate with the jobserver) Git-Dch: Ignore
* * lp:~mvo/apt/add-glob-function:Michael Vogt2013-08-152-0/+47
| | | | | | | - add Glob() to fileutl.{cc,h} Conflicts: apt-pkg/contrib/fileutl.h debian/changelog
* * lp:~mvo/apt/config-clear:Michael Vogt2013-08-151-0/+4
| | | | | | | - support Configuration.Clear() for a clear of the entire configuration Conflicts: debian/changelog
* stop building l10n if strings are unchangedDavid Kalnischkies2013-06-091-0/+1
| | | | | | The buildsystem tried to build l10n for test applications which never produced the output it expected causing it to try building it all the time.