summaryrefslogtreecommitdiffstats
path: root/test/scripts
AgeCommit message (Collapse)AuthorFilesLines
2015-05-12makepkg-template: support multiple --template-dirsDominik Fischer12-4/+56
Especially when maintaining local templates in addition to the ones stored in /usr/share/makepkg-template, it can be useful to include templates stored in multiple different locations into one PKGBUILD. This patch makes this possible by allowing --template-dir to be specified multiple times. This also introduces a dedicated error message when a template cannot be found, in contrast to the already existing "Couldn't detect version for template '%s'". If a template of the same name is present in more than one of the given directories, the last one always takes precedence. Neither the default behaviour without the option given, nor the handling of a single template dir is changed. Signed-off-by: Dominik Fischer <d.f.fischer@web.de> Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-11test makepkg-template: Add update-version-with-newest-optionFlorian Pritz5-0/+50
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add template-without-versionFlorian Pritz3-0/+17
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add name-charset-validFlorian Pritz3-0/+28
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add name-charset-invalidFlorian Pritz2-0/+18
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add missing-template-symlinkFlorian Pritz3-0/+17
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add missing-template-fileFlorian Pritz2-0/+21
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add keep-old-versionFlorian Pritz5-0/+58
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add invalid-template-line-unknown-markerFlorian Pritz2-0/+20
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add invalid-template-line-missing-nameFlorian Pritz2-0/+12
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add invalid-keyFlorian Pritz2-0/+12
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11Add testrunner for makepkg-templateFlorian Pritz3-0/+77
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-12-28add tap_ prefix to test helper functionsAndrew Gregory2-45/+45
Allows tap.sh to show the line number where the helper function was called on failures. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-28use tap.sh for bash testsAndrew Gregory2-69/+14
tap.sh is a reusable TAP library that handles test counting and provides useful diagnostic messages on test failures. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24add vim modeline to test filesAndrew Gregory2-0/+4
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-04add pacman-db-upgrade-v9.py to check_SCRIPTSAndrew Gregory1-0/+1
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-04tests/pacman-db-upgrade-v9: set additional pathsAndrew Gregory1-1/+5
--config does not respect root, causing pacman-db-upgrade to read the local pacman.conf rather than the one in the test root. Also add a rule to ensure the ALPM_DB_VERSION file is actually being created. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-13add pacman-db-upgrade testAndrew Gregory1-0/+21
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-28Remove ts and sw from vim modeline when noet is setFlorian Pritz1-1/+1
Forcing vim users to view files with a tabstop of 2 seems really unnecessary when noet is set. I find it much easier to read code with ts=4 and I dislike having to override the modeline by hand. Command run: find . -type f -exec sed -i '/vim.* noet/s# ts=2 sw=2##' {} + Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Replace "echo" command with "printf" in human_to_size_test.shJason St. John1-1/+1
Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Fix whitespace and other formatting issuesJason St. John2-56/+56
This commit: -- replaces space-based indents with tabs per the coding standards -- removes extraneous whitespace (e.g. extra spaces between function args) -- adds missing braces for a one-line if statement Signed-off-by: Jason St. John <jstjohn@purdue.edu>
2013-11-15Makefile.am: fix typo in LOG_DRIVER variableAndrew Gregory2-2/+2
Self-executing tests were not being run through the tap log driver. This caused `make check` to ignore discrepancies between the expected number of tests and the actual number of tests. Also, fix some uncommented output from test scripts that could confuse TAP parsers. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21provide default values for test scriptsAndrew Gregory2-6/+8
Our test scripts currently require that the first argument be the library or binary to be tested. This makes integrating them with automake which doesn't have a mechanism for passing specific arguments to individual tests. Instead, provide a default built from paths in the environment which can be provided to all test scripts by automake. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21convert test scripts to tap outputAndrew Gregory2-20/+29
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-07Merge branch 'maint'Allan McRae1-1/+1
2013-04-30Add --noprepare option to makepkgEric Bélanger1-1/+1
This new option disables the prepare function. Useful in combination with -o to get an unpatched copy of the sources for testing purpose. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-18Fix spelling errors using 'codespell' toolAnatol Pomozov1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07make test/scripts/human_to_size.sh executableAndrew Gregory1-0/+0
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2012-06-26Scripts testsuite output consistencyAllan McRae2-4/+4
Signed-off-by: Allan McRae <allan@archlinux.org>
2012-06-26scripts/library: add human_to_sizeDave Reisner2-1/+77
This is a bash wrapper around an awk function that parses human readable sizes and returns their representative values in bytes, as a string. A small test harness is added to validate the functionality. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-24scripts/library: introduce parseoptsDave Reisner2-0/+147
This will replace our current options parser used in pacman-key, makepkg, and ideally elsewhere. It follows heuristics closer to that of GNU getopt long (and thus pacman itself), with the exception that it does not allow for options with optional arguments. Due to the way this parser will be used, this sort of functionality will not be needed. Instead of relying on eval+set, options are normalized into an array, OPTRET, which callers should expect to be populated after returning from parseopts. This avoids problems with quotes and spaces in arguments, assuming that the user quotes properly when passing into the application. A new test harness for parseopts is added in test/scripts. Signed-off-by: Dave Reisner <dreisner@archlinux.org>