summaryrefslogtreecommitdiff
path: root/test/test-common.sh
AgeCommit message (Collapse)Author
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: 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: 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: 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: 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: 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-01-02test/test-common.sh: equals: fix quotingLuke Shumaker
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-05-24test: have 'empty' checks be a bit more verboseLuke Shumaker
2017-05-05test: librestage: add tests for the (not yet implemented) sourceball featureLuke Shumaker
2017-05-04random tidy upLuke Shumaker
2017-04-11test/test-common.sh: Ensure that an old gpg-agent isn't running.Luke Shumaker
It is possible that the gpg has been updated since the user's gpg-agent was started; this will cause mysterious errors, as they will detect the version mismatch. If the user isn't running a gpg-agent, then one will be started. However, it will persist longer than useful, and it will be left looking at a .gnupg directory that no longer exists. It's just not worth the trouble to let an existing agent keep running.
2017-04-11test/test-common.sh: Put the test name in the tmpdir path.Luke Shumaker
2017-04-11test/test-common.sh: Improve btrfs-aware rm-rf cleanupLuke Shumaker
2017-04-11test/: Tidy before()/after() definitions.Luke Shumaker
2017-04-11test: Do a better job of cleaning up chroots.Luke Shumaker
2017-02-14Add librechroot delete tests.Luke Shumaker
2015-05-20Use #!/hint/bash instead of the more verbose commentLuke Shumaker
2014-10-01clean up shebangsLuke Shumaker
2014-02-02test: `! true` doesn't trip `set -e`, do subshell magicLuke Shumaker
2014-01-19libremakepkg: Check the permissions of the bind-mounted directoriestesting-20140119Luke Shumaker
2014-01-05test/: re-jigger the chroot tests to be fast on btrfsLuke Shumaker
2013-10-04test: Avoid letting environmental variables affect thingsLuke Shumaker
2013-09-30test-common.sh: add an empty() routine to check if a file is empty, use itLuke Shumaker
2013-09-12test: tidy up, make everything use test-common.shLuke Shumaker
2013-09-11test: tidy upLuke Shumaker
- libremakepkg: set BLACKLIST, as it will be used when checking the PKGBUILD - test-common.sh: make sure that $HOME isn't the default, so we don't trash the user's home directory if accidentally run outside of testenv - testenv: don't worry about adding dest/usr/sbin to the path
2013-06-05add a system to skip tests that require networking or sudo.Luke Shumaker