summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-10-02test: libremakepkg: Verify that it correctly forwards ports through ↵Luke Shumaker
distcc-tool [ci-skip]
2018-10-02test: Add runserver from the dbscripts test suiteLuke Shumaker
It was written by me, in May 2018.
2018-10-01(BATS) test: Manual Roundup→BATS conversionLuke Shumaker
2018-10-01(BATS) test/cases: Automated Roundup→BATS conversionLuke Shumaker
for file in test/cases/*.bats; do name=$(sed -n 's/^describe //p' -- "$file") sed -ri ' # Remove the roundup shebang /^#!\/usr\/bin\/env roundup$/d # Use $BATS_TEST_NAME instead of $roundup_test_name s,roundup_test_name,BATS_TEST_NAME,g # Use BATS built-in "skip" instead of just succeeding /^\trequire /s/\|\| return 0$/|| skip/ # Remove the chroot message, does not play well with BATS output /Creating a chroot, may take a few minutes/d # Update file locations s,^\. \./test-common\.sh$,load ../lib/common, s,\b(libre(chroot|dbdiff|fetch|makepkg|stage|xgettext)|pkgbuild-check-nonfree|toru)\.d\b,fixtures/\1,g # In BATS, the hook is setup(), not before() s,^before\(\),setup(), s,^\tcommon_before$,\tcommon_setup, # Convert test definitions from # describe FOO # it_does_a_thing() { … } # to # @test "FOO does a thing" { … } /^describe /d /^it_/ { s/_/ /g s,^it (.*)\(\),@test "'"$name"' \1\", } ' \ -- "$file" # Remove leading newline that might have been left behind by the above sed -i '1{/^$/d}' -- "$file" git add "$file" done sed -i \ -e 's,librexgettext\.d,fixtures/librexgettext,g' \ -e 's,/it_,/test_librexgettext_,g' \ -- test/fixtures/librexgettext/* git add test/fixtures/librexgettext/*
2018-10-01(BATS) test: Move files aroundLuke Shumaker
But don't edit them yet. This directory structure is based on that of dbscripts.
2018-10-01test: libremakepkg: Check that distcc works with long paths [ci-skip]Luke Shumaker
2018-10-01test/cases: Ditch trying to revert config customizationsLuke Shumaker
With $HOME now being owned by test-common.sh instead of testenv, it's sufficiently short-lived that we don't need to worry about reverting changes we make to it.
2018-10-01test: librerelease: Begone with setup()Luke Shumaker
- move REPODEST to common.bash - don't bother setting PKGEXT
2018-10-01test: Centalize setup in common_setup where it makes senseLuke Shumaker
2018-10-01test: librerelease: Better loggingLuke Shumaker
2018-10-01test: Fix file permissionsLuke Shumaker
Some files were marked executable that shouldn't have been.
2018-10-01test: Add globfile() to make it easy to check if a file matching a glob existsLuke Shumaker
2018-10-01test: Clean up (config) file writingLuke Shumaker
Instead of using in inconsistent mish-mash of `mkdir` and `echo >` and `printf >>`, use more readable and identifiable indented-heredocs: install -Dm644 /dev/stdin "FILENAME" <<-eot CONTENTS eot
2018-10-01test: pkgbuild-check-nonfree: Remove superfluous setting of BLACKLIST=Luke Shumaker
It's already set that way in setup() of that file.
2018-10-01test: librefetch: Use the common GPGKEY; don't create a new oneLuke Shumaker
2018-10-01test: testenv: Clean up the sudo hackLuke Shumaker
2018-10-01test: testenv: Group the list of variables in _sudo()Luke Shumaker
2018-10-01test: test-common.sh: Roll chroot_before in to common_beforeLuke Shumaker
The big reason for having it separate was that we needed to install an expensive after(). But, since that part of cleanup is now owned by testenv, that's not a concern.
2018-10-01test: test-common.bash: Remove hooks from before()Luke Shumaker
Instead, make the default before() an alias for common_before(), which test files can call if they override before().
2018-10-01test: pkgbuild-check-nonfree: Expand $pcn and $psnLuke Shumaker
2018-10-01test: librefetch: sed -i s,tmpdir/srcdest,tmpdir/workdir/srcdest,gLuke Shumaker
For consistency with other tests.
2018-10-01test: test-common.sh: Sync the unset list with restore_envvars in makepkgLuke Shumaker
The effective change is that CARCH is added to the list.
2018-10-01test: test-common.sh: Add some comments, tidyLuke Shumaker
2018-10-01test: testenv: Use the correct paths in makepkg.d/librefetch.confLuke Shumaker
Instead of having librefetch-test.sh do it.
2018-10-01test: Normalize on "status" instead of "stat" "ret" or "r" for storing exit ↵Luke Shumaker
codes The name "status" was chosen because BATS initializes status=0; if we switch from Roundup to BATS, our common setup won't need set it anymore. Accomplish this with: $ sed -ri -e 's/\$(stat|ret|r)\b/$status/g' -e 's/\b(stat|ret|r)=/status=/g' test/*.sh $ sed -ri '/^\s*(local\s+)?status=0$/d' test/*-test.sh
2018-09-30test: Have $HOME be owned by test-common.sh instead of testenvLuke Shumaker
2018-09-30test: Have $chrootdir be owned by testenv instead of test-common.shLuke Shumaker
2018-09-29test: Have GPG stop dropping private keys in my home directoryLuke Shumaker
2018-08-26test: librefetch: Fix to work with the new drop-in location.v20180826Luke Shumaker
This should have been part of the earlier commit. Oh well.
2018-08-26test: librechroot: Check whether chcleanup can install libretools [ci-skip]Luke Shumaker
2018-08-15test/: Use `librechroot install-name` rather than `librechroot run pacman`v20180815Luke Shumaker
2018-08-03test: libremakepkg: Add some failing tests [ci-skip]Luke Shumaker
2018-08-03test: librechroot: Add failing test case for chcleanup [ci-skip]Luke Shumaker
https://labs.parabola.nu/issues/1311
2018-08-03test: librechroot: Fix tragic typoLuke Shumaker
2018-07-31Begone with XBSLuke Shumaker
2018-06-02librechroot: Properly clean up temporary pacman.conf fileLuke Shumaker
2018-05-30test/libremakepkg: Verify that it correctly handles source signatures [ci-skip]Luke Shumaker
2018-05-30test/testenv: Don't "eval" the arguments; treat them as real argsLuke Shumaker
This means you now need to use 'bash -c' to do things like pipelines.
2018-05-30test/testenv: Wrap entire thing in {}Luke Shumaker
2018-05-30test/librefetch: Verify that it doesn't complain about backup=() entries ↵Luke Shumaker
[ci-skip] https://labs.parabola.nu/issues/1186
2018-05-30librefetch: Update for makepkg 5.1Luke Shumaker
2018-01-02test/test-common.sh: equals: fix quotingLuke Shumaker
2017-10-14blacklist get-rep: re-implement to query repos instead of blacklist.txtIsaac David
Rationale: https://lists.parabola.nu/pipermail/dev/2017-October/005936.html This makes get-rep a general-purpose tool for finding replacements and providers of any package, not just blacklisted-ones. It works equally well reading from full blacklist.txt lines, just pkgname lines, and unwittingly; a single line with many pkgnames. Some caveats for further discussion: - This changes behavior from showing just one replacement/provider to _all_ replacements and providers (including pkgname itself) in the repos. - By "repos" I mean the repos the executing machine is configured to access. This could be changed in the future with `expac --config` if more package databases are desired (e.g. different architecture). - Results are shown using the "repo/pkgname ..." format rather than just "pkgname ...". I think this makes the program more useful. - Results aren't reordered to ensure that the first provider of pkgname is pkgname itself. Order will be as expected otherwise, by virtue of expac parsing repos in order.
2017-10-13blacklist test: distinguish between empty string and empty line properIsaac David
Plenty of functions in libreblacklist are expected to print empty lines, so as to signify that the archpkg at that line in the input has an empty accompanying field. Printing no newline and skipping to the next archpkg is therefore a bug; one that would pass unnoticed by current tests. This is because command substitution removes trailing whitespace. I.e. the following is true: [[ $(libreblacklist get-rep <<<'') == $(libreblacklist get-rep <<<$'\n') ]] Process substitution and pipes preserve whitespace, but only the latter work with #!/usr/bin/env roundup, so we use that.
2017-10-09blacklist: implement `get-url` function from `reference` and `id` fieldsIsaac David
The blacklist allows referring to a number of trusted bug trackers to complement the information given in the reason field. However, maintainable shorthand identifiers are used instead of full URLs. Printing the latter based on the former is the job of this new functionality. This also introduces corresponding test cases and l10n strings (together with translations for the `es` locale).
2017-10-07blacklist.sh: update `normalize` and `get-reason` to reflect blacklist.txtIsaac David
the blacklist has had a couple extra fields (ref, id) for some time, but `libreblacklist` was never made aware of the change. this updates test/lib-blacklist-test.sh for the same reason, and adds a test for comment stripping under `it_normalizes_correctly()`.
2017-09-13test/librestage: mark the tests that make take a long timev20170913Luke Shumaker
2017-07-09test: librexgettext: Add testsLuke Shumaker
2017-07-09testenv: make resilient to changes in config.mkLuke Shumaker
2017-07-08test: librechroot: verify that the `-n` flag worksLuke Shumaker