e904dda02107ec1a118e7b496cfa86c38da48a2f
[osm/vim-emu.git] / devops-stages / stage-test.sh
1 #!/bin/bash
2 #
3 # Runs the unittests of "vim-emu". Script needs to be executed inside
4 # the vim-emu Docker container by user "root". It requires the container
5 # to be started in privileged mode.
6 #
7 set -e
8 echo "vim-emu stage-test"
9 # trigger ovs setup since container entrypoint is overwritten by Jenkins
10 service openvswitch-switch start
11 # ensure the Docker image used during the unittests is there
12 docker pull 'ubuntu:trusty'
13 # debugging
14 echo "Tests executed inside: $(hostname)"
15 echo "Tests executed by user: $(whoami)"
16 # trigger the tests
17 cd /son-emu/
18 py.test -v src/emuvim/test/unittests
19