def main(): """ Run experiment : - parse command line options and arguments - read simulation config file - run [command] """ parser = fms.set_parser() options, arguments = parser.parse_args() logger = fms.set_logger(options) command = fms.get_command(arguments, parser) getattr(fms, "do_%s" % command)(arguments, options) return 0
continue s = s.split('.')[0] liste.append(s) return liste def expList(): """ Return list of experiments conffiles in fixtures/experiments dir """ return glob.glob("fixtures/experiments/*.yml") old_dir = os.getcwd() os.chdir(os.path.dirname(__file__)) logger = fms.set_logger('info','fms-tests') logger.info("Running unittests") suite = unittest.TestSuite() for modtestname in sourceList(): exec "import %s" % modtestname modtest = globals()[modtestname] if hasattr(modtest, 'suite'): suite.addTest(modtest.suite()) else: suite.addTest(unittest.defaultTestLoader.loadTestsFromModule(modtest)) for root, dir, files in os.walk(os.path.dirname(fms.__file__)): for f in files: if os.path.splitext(f)[1] == '.py':