-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·37 lines (25 loc) · 849 Bytes
/
test.sh
File metadata and controls
executable file
·37 lines (25 loc) · 849 Bytes
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
#!/bin/sh -ex
DIR=$( cd "$( dirname "$0" )" && pwd )
cd ${DIR}
if [[ "$#" -lt 2 ]]; then
echo "Usage: $0 distro arch"
exit 1
fi
DISTRO=$1
ARCH=$2
DOMAIN=${ARCH}
apk add sshpass cmd:pip
device=rootfs
sed '/allow-hotplug eth0/d' -i rootfs/etc/network/interfaces
tar c -C rootfs . | docker import - ${device}
docker run -d --privileged -i --name ${device} -p 22:22 ${device} /sbin/init
./integration/wait-ssh.sh docker root syncloud 22
sshpass -p syncloud scp -o StrictHostKeyChecking=no test-on-device.sh root@docker:/test-on-device.sh
DOCKER_RUN="sshpass -p syncloud ssh -o StrictHostKeyChecking=no docker"
${DOCKER_RUN} /test-on-device.sh
#cd integration
#pip install -r requirements.txt
#py.test -sx verify.py --domain=${DOMAIN} --device-host=docker --arch=${ARCH}
docker kill ${device}
docker rm ${device}
docker rmi ${device}