def run_tests_parralel(): if six.PY2: test_env.setup_test_env() # append attribute filter option "--attribute '!no_run'" # https://nose2.readthedocs.io/en/latest/plugins/attrib.html sys.argv.extend(['--attribute', '!no_run']) return parallel_test_runner.run_tests(python3=six.PY3)
def run_tests_parralel(): # TODO(jwata): delete this adhoc path insertion # after fixing swarming_test_env.setup_test_env if six.PY2: import swarming_test_env swarming_test_env.setup_test_env() # append attribute filter option "--attribute '!no_run'" # https://nose2.readthedocs.io/en/latest/plugins/attrib.html sys.argv.extend(['--attribute', '!no_run']) # execute test runner return parallel_test_runner.run_tests(python3=six.PY3)
def run_tests_parralel(): # TODO(jwata): add only root level directory to # avoid adhoc sys.path insertions # add path for test_support sys.path.insert(0, THIS_DIR) import test_env_bot test_env_bot.setup_test_env() # append attribute filter option "--attribute '!no_run'" # https://nose2.readthedocs.io/en/latest/plugins/attrib.html sys.argv.extend(['--attribute', '!no_run']) # enable plugins only on linux plugins = [] if sys.platform.startswith('linux'): plugins.append('nose2.plugins.mp') # execute test runner sys.path.insert(0, COMPONENTS_DIR) from test_support import parallel_test_runner return parallel_test_runner.run_tests(python3=six.PY3, plugins=plugins)
def run_tests_parralel(): sys.path.insert(0, TESTS_DIR) import test_env test_env.setup() # Need to specify config path explicitly # because test_env.setup() changes directory cfg = os.path.join(THIS_DIR, 'unittest.cfg') sys.argv.extend(['-c', cfg]) # enable plugins only on linux plugins = [] if sys.platform.startswith('linux'): plugins.append('nose2.plugins.mp') # append attribute filter option "--attribute '!no_run'" # https://nose2.readthedocs.io/en/latest/plugins/attrib.html from test_support import parallel_test_runner sys.argv.extend(['--attribute', '!no_run']) # execute test runner return parallel_test_runner.run_tests(python3=six.PY3, plugins=plugins)
def main(): return parallel_test_runner.run_tests(python3=six.PY3)