blob: 38437ed389d61eb8a9c3404a86816708d72d8d6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/usr/bin/env atf-sh
. $(atf_get_srcdir)/test_env.sh
init_tests \
setup_apkcache_usage \
setup_apkcache_abspath \
setup_apkcache_relpath_with_slash \
setup_apkcache_none \
setup_apkcache_usage_body() {
test_usage setup-apkcache
}
setup_apkcache_abspath_body() {
init_env
atf_check -s exit:0 \
-o empty \
-e empty \
setup-apkcache /media/LABEL=APKOVL/cache
[ "$(readlink etc/apk/cache)" = "/media/LABEL=APKOVL/cache" ] \
|| atf_fail "etc/apk/cache is not a symlink to /media/LABEL=APKOVL/cache"
}
setup_apkcache_relpath_with_slash_body() {
init_env
atf_check -s exit:0 \
-o empty \
-e empty \
setup-apkcache media/LABEL=APKOVL/cache
[ "$(readlink etc/apk/cache)" = "/media/LABEL=APKOVL/cache" ] \
|| atf_fail "etc/apk/cache is symlink to $(readlink /etc/apk/cache) instead of /media/LABEL=APKOVL/cache"
}
setup_apkcache_none_body() {
init_env
atf_check -s exit:0 \
-o empty \
-e empty \
setup-apkcache none
}
|