ci: moved test stage before the build stage

This commit is contained in:
Nick 2018-06-18 21:33:01 +02:00
parent 0a35ef68b6
commit 1c94fda030
2 changed files with 3 additions and 1 deletions

View File

@ -1,7 +1,7 @@
---
stages:
- build
- test
- build
.mbusd_job_template: &mbusd_job_template # Hidden key that defines an anchor
image: debian:stable

View File

@ -34,6 +34,8 @@ class TestModbusRequests(unittest.TestCase):
cls.log.debug("3. run mbusd to be tested with the binary:%s" % MBUSD_BINARY)
cls.mbusd_main = Popen([MBUSD_BINARY, "-d", "-L", "-v9", "-p/tmp/pts0", "-s19200", "-P" + str(MBUSD_PORT)])
# wait a little bit for mbusd to come up
# alternatively do a poll for the socket
# https://stackoverflow.com/questions/667640/how-to-tell-if-a-connection-is-dead-in-python/667702#667702
sleep(5)
cls.log.debug("4. connect the modbus TCP client to mbusd")