summaryrefslogtreecommitdiff
path: root/contrib/cirrus/setup_and_run_rootless.sh
blob: 7ca34a6ac40f69b55f2e1a9accc7b26e150ba954 (plain)
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
#!/bin/bash

set -ex

source $(dirname $0)/lib.sh

req_env_var "
CIRRUS_WORKING_DIR $CIRRUS_WORKING_DIR
GOSRC $GOSRC
SCRIPT_BASE $SCRIPT_BASE
ROOTLESS_USER $ROOTLESS_USER
ROOTLESS_UID $ROOTLESS_UID
ROOTLESS_GID $ROOTLESS_GID
"

if run_rootless
then
    die 86 "Error: Expected rootless env. vars not set or empty"
fi

cd $GOSRC
setup_rootless

ssh $ROOTLESS_USER@localhost \
            -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o CheckHostIP=no \
            $CIRRUS_WORKING_DIR/$SCRIPT_BASE/rootless_test.sh