• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CyberShadow / aconfmgr / 690

25 Jun 2026 08:13PM UTC coverage: 79.575% (-14.1%) from 93.67%
690

Pull #235

github

CyberShadow-Renovate
Update dependency Arch Linux Base to v2026
Pull Request #235: Update dependency Arch Linux Base to v2026

3261 of 4098 relevant lines covered (79.58%)

291.27 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

63.89
/test/t/lib.bash
1
# aconfmgr test suite support code.
2
# Sourced by test case scripts.
3

4
# aconfmgr tests work by:
5
# - mocking operations that inspect and modify the system (see
6
#   ./lib-mocks.bash)
7
# - helper functions that set up or inspect aconfmgr's configuration /
8
#   environment / results (see ./lib-funcs.bash)
9

10
# Allow running test scripts from any current directory
11
cd "$(dirname "${BASH_SOURCE[0]}")"
184✔
12

13
source ./lib-init.bash
92✔
14

15
for arg in "$@"
×
16
do
17
        if [[ "$arg" == -i ]]
×
18
        then
19
                if ((${ACONFMGR_INTEGRATION:-0}))
×
20
                then
21
                        printf 'Already in integration mode!\n' 1>&2
×
22
                        exit 1
×
23
                else
24
                        printf 'Re-executing in integration mode.\n' 1>&2
×
25
                        exec ../docker/run-test.sh "$ACONFMGR_CURRENT_TEST".sh
×
26
                fi
27
        else
28
                printf 'Unknown command line switch: %q\n' "$arg" 1>&2
×
29
                exit 1
×
30
        fi
31
done
32
unset arg
92✔
33

34
source ../../src/common.bash
92✔
35
source ../../src/save.bash
92✔
36
source ../../src/apply.bash
92✔
37
source ../../src/check.bash
92✔
38
source ../../src/diff.bash
92✔
39
source ../../src/helpers.bash
92✔
40

41
if [[ -v GITHUB_ACTIONS ]] ; then printf '::group::%s\n' "$test_name" 1>&2 ; fi
184✔
42
LogEnter 'Running test case %s ...\n' "$(Color C "$test_name")"
184✔
43
LogEnter 'Setting up test suite...\n'
92✔
44

45
for dir in "$config_dir" "$tmp_dir" "$test_data_dir" "$test_aur_dir"
368✔
46
do
47
        if ((${ACONFMGR_INTEGRATION:-0}))
368✔
48
        then
49
                command sudo rm -rf "$dir" # Clean up after root tests
×
50
        else
51
                rm -rf "$dir"
368✔
52
        fi
53
done
54
unset dir
92✔
55
mkdir -p "$config_dir" "$test_data_dir"
92✔
56

57
source ./lib-funcs-common.bash
92✔
58
if ((${ACONFMGR_INTEGRATION:-0}))
92✔
59
then
60
        if ! ((${ACONFMGR_IN_CONTAINER:-0}))
×
61
        then
62
                FatalError 'aconfmgr integration tests should only ever be run inside a throw-away container!''\n'
×
63
        fi
64

65
        source ./lib-funcs-integ.bash
×
66
else
67
        source ./lib-mocks.bash
92✔
68
        source ./lib-funcs-mock.bash
92✔
69
fi
70

71
# Don't use diff --color=auto when it's not available
72
if test -v BUILD_BASH && ! diff --color=auto /dev/null /dev/null 2>/dev/null
92✔
73
then
74
        diff_opts=(diff)
75
fi
76

77
TestInit
92✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc