forked from coala/coala
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_tests.py
executable file
·37 lines (29 loc) · 1.28 KB
/
run_tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python3
import os
import tempfile
from distutils.sysconfig import get_python_lib
from coalib.tests.TestHelper import TestHelper
if __name__ == '__main__':
parser = TestHelper.create_argparser(description="Runs coalas tests.")
parser.add_argument("-b",
"--ignore-bear-tests",
help="ignore bear tests",
action="store_true")
parser.add_argument("-m",
"--ignore-main-tests",
help="ignore main program tests",
action="store_true")
testhelper = TestHelper(parser)
if not testhelper.args.ignore_main_tests:
testhelper.add_test_files(os.path.abspath(os.path.join("coalib",
"tests")))
if not testhelper.args.ignore_bear_tests:
testhelper.add_test_files(os.path.abspath(os.path.join("bears",
"tests")))
ignore_list = [
os.path.join(tempfile.gettempdir(), "**"),
os.path.join(os.path.dirname(get_python_lib()), "**"),
os.path.join("coalib", "tests", "**"),
os.path.join("bears", "tests", "**")
]
exit(testhelper.execute_python3_files(ignore_list))