diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..2a4326f31bf64f914715ad95f291864f5c292164 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,5 @@ +image: gepgitlab.laas.fr:4567/Gepetto/example-robot-data + +test: + script: + - cd unittest && python test_all.py diff --git a/unittest/test_all.py b/unittest/test_all.py new file mode 100644 index 0000000000000000000000000000000000000000..02564cece5dbac37ff8d081bb3da71662cbed949 --- /dev/null +++ b/unittest/test_all.py @@ -0,0 +1,21 @@ +import unittest +import sys + +testmodules = [ + 'test_load', +] + +suite = unittest.TestSuite() + +for t in testmodules: + try: + # If the module defines a suite() function, call it to get the suite. + mod = __import__(t, globals(), locals(), ['suite']) + suitefn = getattr(mod, 'suite') + suite.addTest(suitefn()) + except (ImportError, AttributeError): + # else, just load all the test cases from the module. + suite.addTest(unittest.defaultTestLoader.loadTestsFromName(t)) + +result = unittest.TextTestRunner().run(suite) +sys.exit(len(result.errors) + len(result.failures))