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

CyberShadow / aconfmgr / 373

02 Dec 2023 10:51AM UTC coverage: 84.045% (-9.6%) from 93.666%
373

push

github

CyberShadow-Renovate
Update dependency paru to v20231201221822

0 of 1 new or added line in 1 file covered. (0.0%)

410 existing lines in 22 files now uncovered.

3777 of 4494 relevant lines covered (84.05%)

145.36 hits per line

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

90.59
/test/t/lib-funcs-integ.bash
1
# Test case configuration functions (integration tests)
2

3
###############################################################################
4
# Initialization
5

6
function TestInit() {
7
        # No TTY for confirmations
8
        pacman_opts+=(--noconfirm)
2✔
9
        makepkg_opts+=(--noconfirm)
2✔
10

11
        pacaur_opts+=(--noconfirm --noedit)
2✔
12
        aurman_opts+=(--noconfirm --noedit --skip_news)
2✔
13
        yaourt_opts+=(--noconfirm)
2✔
14
        yay_opts+=(--noconfirm)
2✔
15
        paru_opts+=(--noconfirm)
2✔
16

17
        # pacaur insists that this is set, even if it will never invoke it
18
        export EDITOR=/bin/cat
4✔
19

20
        # Allows AUR helpers find perl tools etc.
21
        # shellcheck disable=SC2016
22
        PATH=$(env -i sh -c 'source /etc/profile 1>&2 ; printf -- %s "$PATH"')
4✔
23

24
        # Configuration matching the Docker image
25
        cat > "$config_dir"/10-system.sh <<'EOF'
2✔
26
AddPackage arch-install-scripts
2✔
27
AddPackage base
2✔
28
AddPackage base-devel
2✔
29

2✔
30
AddPackage ruby-rdoc
2✔
31
AddPackage rubygems
2✔
32

2✔
33
AddPackage git
2✔
34
AddPackage pacutils
2✔
35
AddPackage expect
2✔
36

2✔
37
AddPackage aur
2✔
38
IgnorePackage --foreign parent-package
2✔
39

2✔
40
IgnorePath /README
2✔
41
IgnorePath /version
2✔
42
IgnorePath /pkglist.x86_64.txt
2✔
43

2✔
44
IgnorePath /.dockerenv
2✔
45
IgnorePath /aconfmgr/\*
2✔
46
IgnorePath /aconfmgr-packages/\*
2✔
47
IgnorePath /aconfmgr-repo/\*
2✔
48
IgnorePath /opt/aur
2✔
49

2✔
50
IgnorePath /etc/\*
2✔
51
IgnorePath /usr/\*
2✔
52
IgnorePath /srv/\*
2✔
53
IgnorePath /var/\*
2✔
54
EOF
2✔
55

2✔
56
        test_fs_root=/
2✔
57
}
2✔
58

2✔
59
function TestPhase_RunHook() {
2✔
60
        if [[ "${#test_adopted_packages[@]}" -gt 0 ]]
2✔
61
        then
2✔
62
                TestCreateParentPackage
2✔
63
        fi
2✔
64

2✔
65
        command sudo rm -f /var/log/pacman.log
2✔
66
}
2✔
67

2✔
68
###############################################################################
2✔
69
# Files
2✔
70

2✔
71
function TestAddFSObj() {
2✔
72
        local package=$1 # empty string to add to filesystem
248✔
73
        local path=$2
248✔
74
        local type=$3 # file, dir, link
248✔
75
        local contents=$4 # file contents or link data
248✔
76
        local mode=${5:-}
248✔
77
        local owner=${6:-}
248✔
78
        local group=${7:-}
248✔
79
        local mtime=${8:-@0}
248✔
80

2✔
81
        local root prefix
248✔
82
        if [[ -z "$package" ]]
248✔
83
        then
2✔
84
                root=
2✔
85
                prefix=(command sudo)
2✔
86
        else
2✔
87
                root="$test_data_dir"/package-files/"$package"/files
248✔
88
                mkdir -p "$root"
248✔
89
                prefix=()
248✔
90
        fi
2✔
91
        local fn="$root"/"$path"
248✔
92

2✔
93
        case "$type" in
496✔
94
                file)
2✔
95
                        "${prefix[@]}" mkdir -p "$(dirname "$fn")"
496✔
96
                        printf -- "%s" "$contents" | "${prefix[@]}" sh -c "$(printf 'cat > %q' "$fn")"
744✔
97
                        ;;
2✔
98
                dir)
2✔
99
                        test -z "$contents" || FatalError 'Attempting to create directory with non-empty contents\n'
2✔
100
                        "${prefix[@]}" mkdir -p "$fn"
2✔
101
                        ;;
2✔
102
                link)
2✔
103
                        "${prefix[@]}" mkdir -p "$(dirname "$fn")"
2✔
104
                        "${prefix[@]}" ln -s "$contents" "$fn"
2✔
105
                        ;;
2✔
106
                *)
2✔
107
                        FatalError 'Unknown filesystem object type %s\n' "$type"
2✔
108
                        ;;
2✔
109
        esac
2✔
110
        "${prefix[@]}" touch --no-dereference --date "$mtime" "$fn"
248✔
111

2✔
112
        if [[ -n "$mode"  ]] ; then "${prefix[@]}" chmod "$mode"  "$fn" ; fi
248✔
113

2✔
114
        if [[ -z "$package" ]]
248✔
115
        then
2✔
116
                if [[ -n "$owner" ]] ; then "${prefix[@]}" chown --no-dereference "$owner" "$fn" ; fi
2✔
117
                if [[ -n "$group" ]] ; then "${prefix[@]}" chgrp --no-dereference "$group" "$fn" ; fi
2✔
118
        else
2✔
119
                tar rf "$test_data_dir"/package-files/"$package"/files.tar \
248✔
120
                        -C "$root" \
2✔
121
                        --owner="${owner:-root}" \
2✔
122
                        --group="${group:-root}" \
2✔
123
                        ./"$path"
2✔
124
                rm -rf "$root"
248✔
125
        fi
2✔
126
}
2✔
127

2✔
128
function TestDeleteFile() {
2✔
129
        local path=$1
2✔
130

2✔
131
        command sudo rm -rf "$path"
2✔
132
}
2✔
133

2✔
134
###############################################################################
2✔
135
# Packages
2✔
136

2✔
137
# Helper
2✔
138
function TestMakePkg() {
2✔
139
        local dir=$1
374✔
140
        shift
374✔
141

2✔
142
        local args=(makepkg --nodeps "$@")
748✔
143

2✔
144
        rm -rf /tmp/aconfmgr-build
374✔
145
        cp -a "$dir" /tmp/aconfmgr-build
374✔
146

2✔
147
        {
2✔
148
                cat /etc/makepkg.conf
374✔
149
                cat <<-'EOF'
374✔
150
                        PKGEXT='.pkg.tar.zst'
2✔
151
                        COMPRESSZST=(zstd -c -T0 -18 -)
2✔
152
                EOF
2✔
153
        } > /tmp/aconfmgr-build/makepkg.conf
2✔
154
        args+=(--config /tmp/aconfmgr-build/makepkg.conf)
374✔
155

2✔
156
        local timestamp=0
374✔
157
        if [[ -f "$dir"/time ]]
374✔
158
        then
2✔
159
                timestamp=$(stat --format=%Y "$dir"/time)
2✔
160
        fi
2✔
161

2✔
162
        if [[ "$EUID" -eq 0 ]]
374✔
163
        then
2✔
164
                chown -R nobody: /tmp/aconfmgr-build
2✔
165
                env -i -C /tmp/aconfmgr-build su nobody -s /bin/sh -c "env SOURCE_DATE_EPOCH=$timestamp $(printf ' %q' "${args[@]}")"
2✔
166
        else
2✔
167
                env -i -C /tmp/aconfmgr-build SOURCE_DATE_EPOCH="$timestamp" "${args[@]}"
374✔
168
        fi
2✔
169
}
2✔
170

2✔
171
function TestCreatePackage() {
2✔
172
        local package=$1
248✔
173
        local kind=$2
248✔
174
        local pkgver=1.0
248✔
175
        local pkgrel=1
248✔
176
        local arch=x86_64
248✔
177
        local groups=()
496✔
178
        local depends=()
496✔
179
        local provides=()
496✔
180
        local time=@0
248✔
181
        local pkgbuild
248✔
182
        local pkg_fn="$package"-"$pkgver"-"$pkgrel"-"$arch".pkg.tar.zst
248✔
183

2✔
184
        shift 2
248✔
185
        local arg
248✔
186
        for arg in "$@"
2✔
187
        do
2✔
188
                eval "$arg"
2✔
189
        done
2✔
190

2✔
191
        local dir="$test_data_dir"/packages/"$kind"/"$package"
248✔
192
        mkdir -p "$dir"
248✔
193
        touch --date "$time" "$dir"/time
248✔
194

2✔
195
        mkdir "$dir"/build
248✔
196

2✔
197
        local tar="$test_data_dir"/package-files/"$package"/files.tar
248✔
198
        if [[ -f "$tar" ]]
248✔
199
        then
2✔
200
                cp "$tar" "$dir"/build/
248✔
201
        fi
2✔
202

2✔
203
        # shellcheck disable=SC2059
2✔
204
        (
2✔
205
                if [[ -v pkgbuild ]]
248✔
206
                then
2✔
207
                        printf -- %s "$pkgbuild"
2✔
208
                else
2✔
209
                        cat <<EOF
992✔
210
pkgname=$package
2✔
211
pkgver=$pkgver
2✔
212
pkgrel=$pkgrel
2✔
213
pkgdesc="Dummy aconfmgr test suite package: subtitle"
2✔
214
arch=($arch)
2✔
215
groups=($(PrintQArray groups))
2✔
216
depends=($(PrintQArray depends))
2✔
217
provides=($(PrintQArray provides))
2✔
218
EOF
2✔
219

2✔
220
                        if [[ -f "$tar" ]]
248✔
221
                        then
2✔
222
                                cat <<'EOF'
248✔
223
source=(files.tar)
2✔
224
md5sums=(SKIP)
2✔
225

2✔
226
package() {
2✔
227
        tar xf "$srcdir"/files.tar -C "$pkgdir"
2✔
228
}
2✔
229
EOF
2✔
230
                        fi
2✔
231
                fi
2✔
232
        ) > "$dir"/build/PKGBUILD
2✔
233

2✔
234
        TestMakePkg "$dir"/build
248✔
235

2✔
236
        local pkg_path=/tmp/aconfmgr-build/"$pkg_fn"
248✔
237
        test -f "$pkg_path" || FatalError 'Package expected to exist: %q\n' "$pkg_path"
248✔
238
        cp "$pkg_path" "$dir"/
248✔
239
        ln -s "$pkg_fn" "$dir"/pkg
248✔
240

2✔
241
        if [[ "$kind" == native ]]
248✔
242
        then
2✔
243
                command sudo repo-add /aconfmgr-repo/aconfmgr.db.tar "$pkg_path"
124✔
244
                command sudo cp "$pkg_path" /aconfmgr-repo/
124✔
245
                command sudo pacman -Sy
124✔
246
        fi
2✔
247

2✔
248
        if [[ "$kind" == foreign && -f ~/aur-initialized ]]
372✔
249
        then
2✔
250
                (
2✔
251
                        cd "$dir"/build
124✔
252

2✔
253
                        TestMakePkg . --printsrcinfo > .SRCINFO
124✔
254

2✔
255
                        git init .
124✔
256
                        git add PKGBUILD .SRCINFO
124✔
257
                        if [[ -f files.tar ]]
124✔
258
                        then
2✔
259
                                git add files.tar
124✔
260
                        fi
2✔
261
                        git commit -m 'Initial commit'
124✔
262
                        git push aur@aur.archlinux.org:"$package".git master
124✔
263
                )
2✔
264
        fi
2✔
265

2✔
266
        rm -rf "$test_data_dir"/package-files/"$package"
248✔
267
}
2✔
268

2✔
269
# Delete an installable package.
2✔
270
function TestDeletePackage() {
2✔
271
        local package=$1
124✔
272
        local kind=$2
124✔
273

2✔
274
        local dir="$test_data_dir"/packages/"$kind"/"$package"
124✔
275
        test -d "$dir"
124✔
276
        rm -rf "$dir"
124✔
277

2✔
278
        if [[ "$kind" == native ]]
124✔
279
        then
2✔
280
                command sudo find /aconfmgr-repo/ -name "$package"'-*.pkg.tar.*' -delete
62✔
281
                command sudo repo-remove /aconfmgr-repo/aconfmgr.db.tar "$package"
62✔
282
                command sudo pacman -Sy
62✔
283
        fi
2✔
284

2✔
285
        if [[ "$kind" == foreign && -f ~/aur-initialized ]]
186✔
286
        then
2✔
287
                Log 'TOOO: delete packages from AUR\n'
62✔
288
        fi
2✔
289
}
2✔
290

2✔
291
# Create dummy parent package to distinguish dependency from orphan packages.
2✔
292
function TestCreateParentPackage() {
2✔
293
        local dir="$test_data_dir"/parent-package
2✔
294
        mkdir "$dir"
2✔
295

2✔
296
        # shellcheck disable=SC2059
2✔
297
        printf "$(cat <<EOF
2✔
298
pkgname=parent-package
2✔
299
pkgver=1.0
2✔
300
pkgrel=1
2✔
301
pkgdesc="Dummy aconfmgr test suite parent package"
2✔
302
depends=(%s)
2✔
303
arch=(any)
2✔
304

2✔
305
EOF
2✔
306
)" "$(printf '%q ' "${test_adopted_packages[@]}")" > "$dir"/PKGBUILD
6✔
307

2✔
308
        TestMakePkg "$dir"
2✔
309

2✔
310
        command sudo pacman -U --noconfirm /tmp/aconfmgr-build/parent-package-1.0-1-any.pkg.tar.*
2✔
311
}
2✔
312

2✔
313
# Packages to give a parent to,
2✔
314
# so that they're not considered orphaned.
2✔
315
test_adopted_packages=()
2✔
316

2✔
317
function TestInstallPackage() {
2✔
318
        local package=$1
96✔
319
        local kind=$2
96✔
320
        local inst_as=$3
96✔
321

2✔
322
        local dir="$test_data_dir"/packages/"$kind"/"$package"
96✔
323

2✔
324
        local args=(command sudo pacman --noconfirm)
192✔
325
        case "$inst_as" in
96✔
326
                explicit)
2✔
327
                        args+=(--asexplicit)
32✔
328
                        ;;
2✔
329
                dependency)
2✔
330
                        args+=(--asdeps)
32✔
331
                        test_adopted_packages+=("$package")
32✔
332
                        ;;
2✔
333
                orphan)
2✔
334
                        args+=(--asdeps)
32✔
335
                        ;;
2✔
336
                *)
2✔
337
                        FatalError "Unknown inst_as parameter: %s\n" "$inst_as"
2✔
338
        esac
2✔
339

2✔
340
        if [[ "$kind" == native ]]
96✔
341
        then
2✔
342
                "${args[@]}" -S "$package"
48✔
343
        else
2✔
344
                "${args[@]}" -U "$dir"/"$(readlink "$dir"/pkg)"
96✔
345
        fi
2✔
346

2✔
347
}
2✔
348

2✔
349
function TestExpectPacManLog() {
2✔
350
        command sudo touch /var/log/pacman.log
2✔
351
        diff -u /dev/stdin <( sed -n 's/^.*\[PACMAN\] Running '\''pacman \(--noconfirm \)\?\(.*\)'\''$/\2/p' /var/log/pacman.log )
2✔
352
}
2✔
353

2✔
354
###############################################################################
2✔
355
# AUR
2✔
356

2✔
357
function TestInitAUR() {
2✔
358
        test ! -f ~/aur-initialized || return 0
2✔
359

2✔
360
        LogEnter 'Initializing AUR support...\n'
2✔
361

2✔
362
        if [[ ! -v ACONFMGR_IN_CONTAINER ]]
2✔
363
        then
2✔
364
                FatalError 'Refusing to start outside Docker.\n'
2✔
365
        fi
2✔
366

2✔
367
        LogEnter 'Starting AUR...\n'
2✔
368
        command sudo env ACONFMGR_IN_CONTAINER=1 /opt/aur/start.sh
2✔
369
        LogLeave
2✔
370

2✔
371
        LogEnter 'Generating a SSH key...\n'
2✔
372
        mkdir -p ~/.ssh
2✔
373
        chmod 700 ~/.ssh
2✔
374
        ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519
2✔
375
        LogLeave
2✔
376

2✔
377
        LogEnter 'Registering on AUR...\n'
2✔
378
        local args=(
2✔
379
                curl
2✔
380
                --fail
2✔
381
                --output /dev/null
2✔
382
                'http://127.0.0.1/register/'
2✔
383
                -H 'Host: aur.archlinux.org'
2✔
384
                -H 'Content-Type: application/x-www-form-urlencoded'
2✔
385
                --data-urlencode 'Action=NewAccount'
2✔
386
                --data-urlencode 'U=aconfmgr'
2✔
387
                --data-urlencode 'E=aconfmgr@thecybershadow.net'
2✔
388
                --data-urlencode 'R='
2✔
389
                --data-urlencode 'HP='
2✔
390
                --data-urlencode 'I='
2✔
391
                --data-urlencode 'K='
2✔
392
                --data-urlencode 'L=en'
2✔
393
                --data-urlencode 'TZ=UTC'
2✔
394
                --data-urlencode 'PK='"$(cat ~/.ssh/id_ed25519.pub)"
2✔
395
                --compressed
2✔
396
        ) ; "${args[@]}"
8✔
397
        LogLeave
2✔
398

2✔
399
        LogEnter 'Adding SSH host keys...\n'
2✔
400
        ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
2✔
401
        LogLeave
2✔
402

2✔
403
        LogEnter 'Checking SSH...\n'
2✔
404
        ssh aur@aur.archlinux.org help
2✔
405
        LogLeave
2✔
406

2✔
407
        LogEnter 'Configuring git...\n'
2✔
408
        git config --global user.name aconfmgr
2✔
409
        git config --global user.email 'aconfmgr@thecybershadow.net'
2✔
410
        LogLeave
2✔
411

2✔
412
        # Create "$tmp_dir" now with the correct mode.
2✔
413
        mkdir --mode=700 "$tmp_dir"
2✔
414

2✔
415
        touch ~/aur-initialized
2✔
416

2✔
417
        LogLeave
2✔
418
}
2✔
419

2✔
420
# Copies a package from the real AUR to our local instance.
2✔
421
function TestNeedAURPackage() {
2✔
422
        local package=$1
2✔
423
        local commit=$2
2✔
424
        shift 2
2✔
425
        local pkgbuild_extras=("$@")
2✔
426

2✔
427
        function TestEditHosts() {
2✔
428
                local transform=$1
2✔
429

2✔
430
                # Docker bind-mounts /etc/hosts; sed -i doesn't work
2✔
431
                local hosts
2✔
432
                hosts=$(cat /etc/hosts)
2✔
433
                printf -- %s "$hosts" | sed "$transform" | command sudo tee /etc/hosts > /dev/null
2✔
434
        }
2✔
435

2✔
436
        LogEnter 'Copying package %s from AUR...\n' "$(Color M "%q" "$package")"
2✔
437

2✔
438
        local dir="$test_aur_dir"/"$package"
2✔
439

2✔
440
        LogEnter 'Downloading package...\n'
2✔
441
        TestEditHosts 's/^.*aur.archlinux.org$/#\0/'
2✔
442
        mkdir -p "$(dirname "$dir")"
2✔
443
        git clone https://aur.archlinux.org/"$package".git "$dir"
2✔
444
        git -C "$dir" reset --hard "$commit"
2✔
445
        LogLeave
2✔
446

2✔
447
        if [[ "${#pkgbuild_extras[@]}" -gt 0 ]]
2✔
448
        then
2✔
449
                LogEnter 'Patching PKGBUILD...\n'
2✔
450
                test -f "$dir"/PKGBUILD
2✔
451
                printf '\n' >> "$dir"/PKGBUILD
2✔
452
                local line
2✔
453
                for line in "${pkgbuild_extras[@]}"
2✔
454
                do
2✔
455
                        printf '%s\n' "$line" >> "$dir"/PKGBUILD
2✔
456
                done
2✔
457
                git -C "$dir" commit -am 'Patch PKGBUILD for aconfmgr test suite'
2✔
458
                LogLeave
2✔
459
        fi
2✔
460

2✔
461
        LogEnter 'Uploading package...\n'
2✔
462
        TestEditHosts 's/^#\(.*aur.archlinux.org\)$/\1/'
2✔
463
        git -C "$dir" push aur@aur.archlinux.org:"$package".git master
2✔
464
        LogLeave
2✔
465

2✔
466
        LogLeave
2✔
467
}
2✔
468

2✔
469
function TestNeedPacaur() {
2✔
470
        TestNeedAURPackage pacaur da18900a6fe888654867748fa976f8ae0ab96334
2✔
471
}
2✔
472

2✔
473
function TestNeedAuracle() {
2✔
474
        # shellcheck disable=SC2016,SC1004
2✔
475
        TestNeedAURPackage auracle-git 76415be1eed235d0a7236749b1231f9e2bdf1691 "$(cat <<-'EOF'
2✔
476
                source[0]="${source[0]/%/#commit=87399290d15900a2fcbc4d1d382f57bdac2ee4be}"
2✔
477
                EOF
2✔
478
)"
×
479
}
480

481
# Upload a new version of an AUR package with the given lines to
482
# override existing declarations.
483
function TestUpdateAurPackage() {
UNCOV
484
        local package=$1
×
UNCOV
485
        local kind=foreign
×
UNCOV
486
        shift
×
487
        local lines=("$@")
488

489
        (
UNCOV
490
                cd "$test_data_dir"/packages/"$kind"/"$package"/build
×
UNCOV
491
                local line
×
UNCOV
492
                printf '%s\n' "${lines[@]}" >> PKGBUILD
×
UNCOV
493
                TestMakePkg . --printsrcinfo > .SRCINFO
×
UNCOV
494
                git add PKGBUILD .SRCINFO
×
UNCOV
495
                git commit -m 'AUR package update'
×
UNCOV
496
                git push aur@aur.archlinux.org:"$package".git master
×
497
        )
×
498
}
499

500
# Common test code for testing integration with an AUR helper.
501
function TestAURHelper() {
UNCOV
502
        aur_helper=$1
×
UNCOV
503
        local cache_dir=$2
×
UNCOV
504
        local can_build_only=$3
×
505

UNCOV
506
        TestPhase_Setup ###############################################################
×
UNCOV
507
        TestAddPackageFile test-package /testfile.txt 'File contents'
×
UNCOV
508
        TestCreatePackage test-package foreign
×
509

UNCOV
510
        TestPhase_Run #################################################################
×
511

UNCOV
512
        LogEnter 'Test installing a package:\n'
×
UNCOV
513
        TestAddConfig AddPackage --foreign test-package
×
UNCOV
514
        AconfApply
×
UNCOV
515
        diff -u <(cat /testfile.txt) <(printf 'File contents')
×
UNCOV
516
        test -z "$cache_dir" -o -d "$cache_dir"
×
UNCOV
517
        LogLeave 'OK\n'
×
518

UNCOV
519
        LogEnter 'Test getting a file from an installed package:\n'
×
UNCOV
520
        diff -u "$(GetPackageOriginalFile test-package /testfile.txt)" <(printf 'File contents')
×
UNCOV
521
        RemoveFile /testfile.txt
×
UNCOV
522
        LogLeave 'OK\n'
×
523

UNCOV
524
        LogEnter 'Test getting a file from a non-installed package:\n'
×
UNCOV
525
        command sudo pacman -R --noconfirm test-package
×
UNCOV
526
        diff -u "$(GetPackageOriginalFile test-package /testfile.txt)" <(printf 'File contents')
×
UNCOV
527
        RemoveFile /testfile.txt
×
UNCOV
528
        LogLeave 'OK\n'
×
529

UNCOV
530
        if "$can_build_only"
×
531
        then
UNCOV
532
                LogEnter 'Test getting a file from a non-installed package (clean cache):\n'
×
UNCOV
533
                test -z "$cache_dir" || rm -rf "$cache_dir"
×
UNCOV
534
                diff -u "$(GetPackageOriginalFile test-package /testfile.txt)" <(printf 'File contents')
×
UNCOV
535
                test -z "$cache_dir" -o -d "$cache_dir"
×
UNCOV
536
                RemoveFile /testfile.txt
×
UNCOV
537
                LogLeave 'OK\n'
×
538

UNCOV
539
                LogEnter 'Test getting a file from another version of the package:\n'
×
UNCOV
540
                test -z "$cache_dir" || rm -rf "$cache_dir"
×
UNCOV
541
                TestUpdateAurPackage test-package 'pkgver=2.0'
×
UNCOV
542
                diff -u "$(GetPackageOriginalFile test-package /testfile.txt)" <(printf 'File contents')
×
UNCOV
543
                test -z "$cache_dir" -o -d "$cache_dir"
×
UNCOV
544
                RemoveFile /testfile.txt
×
UNCOV
545
                LogLeave 'OK\n'
×
546
        fi
547
}
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

© 2025 Coveralls, Inc