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

CyberShadow / aconfmgr / 660

22 Dec 2025 03:28PM UTC coverage: 79.739% (-14.0%) from 93.708%
660

Pull #231

github

CyberShadow-Renovate
Update dependency Arch Linux Base to v2025.12.01
Pull Request #231: Update dependency Arch Linux Base to v2025.12.01

3239 of 4062 relevant lines covered (79.74%)

293.61 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]}")"
180✔
12

13
source ./lib-init.bash
90✔
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
90✔
33

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

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

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

57
source ./lib-funcs-common.bash
90✔
58
if ((${ACONFMGR_INTEGRATION:-0}))
90✔
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
90✔
68
        source ./lib-funcs-mock.bash
90✔
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
90✔
73
then
74
        diff_opts=(diff)
75
fi
76

77
TestInit
90✔
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