github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/contrib/cirrus/integration_test.sh (about) 1 #!/bin/bash 2 3 set -e 4 5 source $(dirname $0)/lib.sh 6 7 req_env_var GOSRC SCRIPT_BASE OS_RELEASE_ID OS_RELEASE_VER CONTAINER_RUNTIME VARLINK_LOG 8 9 # Our name must be of the form xxxx_test or xxxx_test.sh, where xxxx is 10 # the test suite to run; currently (2019-05) the only option is 'integration' 11 # but pr2947 intends to add 'system'. 12 TESTSUITE=$(expr $(basename $0) : '\(.*\)_test') 13 if [[ -z $TESTSUITE ]]; then 14 die 1 "Script name is not of the form xxxx_test.sh" 15 fi 16 17 cd "$GOSRC" 18 19 case "$SPECIALMODE" in 20 in_podman) 21 ${CONTAINER_RUNTIME} run --rm --privileged --net=host \ 22 -v $GOSRC:$GOSRC:Z \ 23 --workdir $GOSRC \ 24 -e "CGROUP_MANAGER=cgroupfs" \ 25 -e "STORAGE_OPTIONS=--storage-driver=vfs" \ 26 -e "CRIO_ROOT=$GOSRC" \ 27 -e "PODMAN_BINARY=/usr/bin/podman" \ 28 -e "CONMON_BINARY=/usr/libexec/podman/conmon" \ 29 -e "DIST=$OS_RELEASE_ID" \ 30 -e "CONTAINER_RUNTIME=$CONTAINER_RUNTIME" \ 31 $IN_PODMAN_IMAGE bash $GOSRC/$SCRIPT_BASE/container_test.sh -b -i -t 32 ;; 33 rootless) 34 req_env_var ROOTLESS_USER 35 ssh $ROOTLESS_USER@localhost \ 36 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \ 37 -o CheckHostIP=no $GOSRC/$SCRIPT_BASE/rootless_test.sh ${TESTSUITE} 38 ;; 39 endpoint) 40 make 41 make install PREFIX=/usr ETCDIR=/etc 42 make test-binaries 43 make endpoint 44 ;; 45 bindings) 46 make 47 make install PREFIX=/usr ETCDIR=/etc 48 cd pkg/bindings/test && ginkgo -trace -noColor -debug -r 49 ;; 50 none) 51 make 52 make install PREFIX=/usr ETCDIR=/etc 53 make install.config PREFIX=/usr 54 make test-binaries 55 if [[ "$TEST_REMOTE_CLIENT" == "true" ]] 56 then 57 make remote${TESTSUITE} VARLINK_LOG=$VARLINK_LOG 58 else 59 make local${TESTSUITE} 60 fi 61 ;; 62 *) 63 die 110 "Unsupported \$SPECIALMODE: $SPECIALMODE" 64 esac