Skip to content

Commit 058921b

Browse files
committed
tests: Enable AutoHAT tests through Jenkins
Signed-off-by: Praneeth Bodduluri <[email protected]>
1 parent 58ada10 commit 058921b

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@
1616
[submodule "layers/oe-meta-go"]
1717
path = layers/oe-meta-go
1818
url = https://github.com/mem/oe-meta-go.git
19+
[submodule "tests/autohat"]
20+
path = tests/autohat
21+
url = https://github.com/resin-io/autohat.git

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Change log
22
-----------
33

4+
* Enable AutoHAT tests through Jenkins [Praneeth]
5+
46
# v2.0.0-rc4.rev1 - 2017-03-20
57

68
* Update meta-resin to v2.0.0-rc4 [Andrei]

tests/autohat

Submodule autohat added at 2f08f80

tests/boardtest.sh

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
git submodule update --init autohat
6+
cd autohat
7+
APPLICATION_NAME=`echo $testNode | tr '[:upper:]' '[:lower:]'`
8+
9+
cat <<EOM >start.sh
10+
#!/bin/sh
11+
cd /autohat
12+
robot --exitonerror --exitonfailure raspberrypi3.robot
13+
exit 0
14+
EOM
15+
chmod a+x start.sh
16+
17+
docker build -t ${APPLICATION_NAME} .
18+
tar -xf ../../deploy/resin.img.tar.gz
19+
20+
docker stop ${APPLICATION_NAME} || true
21+
docker rm ${APPLICATION_NAME} || true
22+
docker run -d -v `pwd`:/autohat --privileged \
23+
--env INITSYSTEM=on \
24+
--env RESINRC_RESIN_URL=${RESINRC_RESIN_URL} \
25+
--env email=${RESIN_EMAIL} \
26+
--env password=${RESIN_PASSWORD} \
27+
--env device_type=${device_type} \
28+
--env application_name=${APPLICATION_NAME} \
29+
--env image=/autohat/resin.img \
30+
--env rig_device_id=${rig_device_id} \
31+
--env rig_sd_card=${rig_sd_card} \
32+
--privileged \
33+
--name=${APPLICATION_NAME} \
34+
${AUTOHAT_IMAGE} ${APPLICATION_NAME}
35+
36+
docker exec -t ${APPLICATION_NAME} /autohat/start.sh
37+
docker stop ${APPLICATION_NAME} || true
38+
docker rm ${APPLICATION_NAME} || true

0 commit comments

Comments
 (0)