summaryrefslogtreecommitdiff
path: root/tests/test_env.sh
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2023-01-25 16:22:11 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2023-01-25 16:24:47 +0100
commitfe3f23437a5d8534b2c64a39c430d366de3e6387 (patch)
treed043dce0299f569c331b08fee95e0501fad2df6d /tests/test_env.sh
parent6500eff2a2818c2f50b185e1df7f50b962bda9a5 (diff)
downloadalpine-conf-fe3f23437a5d8534b2c64a39c430d366de3e6387.zip
tests: add tests for setup-disk's uuid_or_device
also add a convenience function to create fake binaries.
Diffstat (limited to 'tests/test_env.sh')
-rw-r--r--tests/test_env.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_env.sh b/tests/test_env.sh
index 57fd09f..c74f9d1 100644
--- a/tests/test_env.sh
+++ b/tests/test_env.sh
@@ -4,6 +4,13 @@ init_env() {
export ROOT=$PWD LIBDIR=$(atf_get_srcdir)/.. MOCK=echo
}
+fake_bin() {
+ mkdir -p bin
+ cat > bin/"$1"
+ chmod +x bin/"$1"
+ PATH="$PWD/bin:$PATH"
+}
+
init_tests() {
TESTS="$@"
export TESTS