From 1c94fda030525a1f39176bf1ed2945e4e4daae67 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 18 Jun 2018 21:33:01 +0200 Subject: [PATCH] ci: moved test stage before the build stage --- .gitlab-ci.yml | 2 +- tests/run_itests.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 881258c..8f08c79 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ --- stages: - - build - test + - build .mbusd_job_template: &mbusd_job_template # Hidden key that defines an anchor image: debian:stable diff --git a/tests/run_itests.py b/tests/run_itests.py index 8fcb3a9..adc52e2 100755 --- a/tests/run_itests.py +++ b/tests/run_itests.py @@ -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")