File: test.sh

package info (click to toggle)
ostree 2025.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,996 kB
  • sloc: ansic: 70,831; sh: 15,652; xml: 5,007; yacc: 1,236; javascript: 531; makefile: 243; python: 155
file content (32 lines) | stat: -rwxr-xr-x 1,015 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

set -e

export VERBOSE=1

# Ubuntu autopkgtest infra provides internet access via a proxy, and
# buildds could conceivably do the same, but libostree doesn't need
# that. However, libostree also doesn't support no_proxy, so it will try
# to use Ubuntu's proxy for localhost, and fail to reach itself.
unset ftp_proxy
unset http_proxy
unset https_proxy
unset no_proxy

failed=0
# Use line-buffering so stdout and stderr interleave somewhat nicely
stdbuf -oL make check || failed=1

pkill --full "gpg-agent --homedir /var/tmp/tap-test\\.[^/]+/.*" || :
pkill --full '\.libs/ostree-trivial-httpd' || :

if pgrep lt-ostree || pgrep --full '\.libs/ostree-trivial-httpd' || pgrep --full "gpg-agent --homedir /var/tmp/tap-test."; then \
    echo "WARNING: daemon processes were leaked"
    pgrep gpg-agent | xargs --no-run-if-empty ps ww
    pgrep --full '\.libs/ostree-trivial-httpd' | xargs --no-run-if-empty ps ww
    pgrep lt-ostree | xargs --no-run-if-empty ps ww
fi

exit $failed

# vim:set et sw=4 sts=4: