File: e2e-test

package info (click to toggle)
apptainer 1.4.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,748 kB
  • sloc: sh: 3,321; ansic: 1,706; awk: 414; python: 103; makefile: 54
file content (43 lines) | stat: -rwxr-xr-x 1,569 bytes parent folder | download
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
41
42
43
#!/bin/sh
# Copyright (c) Contributors to the Apptainer project, established as
#   Apptainer a Series of LF Projects LLC.
#   For website terms of use, trademark policy, privacy policy and other
#   project policies see https://lfprojects.org/policies

if test ! -e scripts/go-test ; then
	echo 'E: Cannot find scripts/go-test. Abort.'
	exit 1
fi

if test ! -d e2e ; then
	echo 'E: Cannot find e2e directory. Abort.'
	exit 1
fi

os=`uname -s`
if [ ! -z "$E2E_PARALLEL" ]; then
    procs=$E2E_PARALLEL
elif [ "$os" = "Linux" ]; then
    procs=`nproc --all`
else
    procs=`getconf _NPROCESSORS_ONLN`
fi

if [ -n "$ALL_PROXY" -o -n "$HTTP_PROXY" -o -n "$HTTPS_PROXY" ]; then
    no_proxy_default="127.0.0.1,localhost,::1"
    if [ -z "$NO_PROXY" ]; then
        NO_PROXY=$no_proxy_default
    else
        NO_PROXY="$no_proxy_default,$NO_PROXY"
    fi
fi

uid=$(id -u)
gid=$(id -g)
id_vars="E2E_ORIG_UID=$uid E2E_ORIG_GID=$gid"
proxy_vars="HTTP_PROXY=$HTTP_PROXY HTTPS_PROXY=$HTTPS_PROXY ALL_PROXY=$ALL_PROXY NO_PROXY=$NO_PROXY"
cred_vars="E2E_DOCKER_USERNAME=$E2E_DOCKER_USERNAME E2E_DOCKER_PASSWORD=$E2E_DOCKER_PASSWORD"
docker_mirror_vars="E2E_DOCKER_MIRROR=$E2E_DOCKER_MIRROR E2E_DOCKER_MIRROR_INSECURE=$E2E_DOCKER_MIRROR_INSECURE"
rootless_vars="XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS"
export sudo_args="env -i PATH=$PATH HOME=$HOME $id_vars $proxy_vars $docker_mirror_vars $cred_vars $rootless_vars APPTAINER_E2E_COVERAGE=$APPTAINER_E2E_COVERAGE"
exec scripts/go-test -sudo -parallel $procs -tags "e2e_test" "$@" ./e2e