Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
666e8d70
Commit
666e8d70
authored
6 years ago
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Did some refactoring.
parent
e1e7b956
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
35 deletions
+20
-35
runtests.py
runtests.py
+20
-35
No files found.
runtests.py
View file @
666e8d70
...
@@ -518,28 +518,26 @@ class ErrorWriter(object):
...
@@ -518,28 +518,26 @@ class ErrorWriter(object):
class TestBuilder(object):
class TestBuilder(object):
def __init__(self, rootdir, workdir, selectors, exclude_selectors, annotate,
def __init__(self, rootdir, workdir, selectors, exclude_selectors, options,
cleanup_workdir, cleanup_sharedlibs, cleanup_failures,
with_pyregr, languages, test_bugs, language_level,
with_pyregr, cython_only, languages, test_bugs, fork, language_level,
test_determinism,
common_utility_dir, pythran_dir=None,
common_utility_dir, pythran_dir=None,
default_mode='run',
default_mode='run',
add_embedded_test=
Tru
e):
add_embedded_test=
Fals
e):
self.rootdir = rootdir
self.rootdir = rootdir
self.workdir = workdir
self.workdir = workdir
self.selectors = selectors
self.selectors = selectors
self.exclude_selectors = exclude_selectors
self.exclude_selectors = exclude_selectors
self.annotate =
annotat
e
self.annotate =
options.annotate_sourc
e
self.cleanup_workdir = cleanup_workdir
self.cleanup_workdir =
options.
cleanup_workdir
self.cleanup_sharedlibs = cleanup_sharedlibs
self.cleanup_sharedlibs =
options.
cleanup_sharedlibs
self.cleanup_failures = cleanup_failures
self.cleanup_failures =
options.
cleanup_failures
self.with_pyregr = with_pyregr
self.with_pyregr = with_pyregr
self.cython_only = cython_only
self.cython_only =
options.
cython_only
self.languages = languages
self.languages = languages
self.test_bugs = test_bugs
self.test_bugs = test_bugs
self.fork = fork
self.fork =
options.
fork
self.language_level = language_level
self.language_level = language_level
self.test_determinism = test_determinism
self.test_determinism =
options.
test_determinism
self.common_utility_dir = common_utility_dir
self.common_utility_dir = common_utility_dir
self.pythran_dir = pythran_dir
self.pythran_dir = pythran_dir
self.default_mode = default_mode
self.default_mode = default_mode
...
@@ -2134,25 +2132,16 @@ def runtests(options, cmd_args, coverage=None):
...
@@ -2134,25 +2132,16 @@ def runtests(options, cmd_args, coverage=None):
if options.filetests and languages:
if options.filetests and languages:
filetests = TestBuilder(ROOTDIR, WORKDIR, selectors, exclude_selectors,
filetests = TestBuilder(ROOTDIR, WORKDIR, selectors, exclude_selectors,
options.annotate_source, options.cleanup_workdir,
options, options.pyregr, languages, test_bugs,
options.cleanup_sharedlibs, options.cleanup_failures,
options.language_level, common_utility_dir,
options.pyregr,
options.pythran_dir, add_embedded_test=True)
options.cython_only, languages, test_bugs,
options.fork, options.language_level,
options.test_determinism,
common_utility_dir, options.pythran_dir)
test_suite.addTest(filetests.build_suite())
test_suite.addTest(filetests.build_suite())
if options.examples and languages:
if options.examples and languages:
filetests = TestBuilder(options.examples_dir, WORKDIR, selectors, exclude_selectors,
filetests = TestBuilder(options.examples_dir, WORKDIR, selectors, exclude_selectors,
options.annotate_source, options.cleanup_workdir,
options, options.pyregr, languages, test_bugs,
options.cleanup_sharedlibs, options.cleanup_failures,
options.language_level, common_utility_dir,
options.pyregr,
options.pythran_dir,
options.cython_only, languages, test_bugs,
default_mode='compile')
options.fork, options.language_level,
options.test_determinism,
common_utility_dir, options.pythran_dir,
default_mode='compile',
add_embedded_test=False)
test_suite.addTest(filetests.build_suite())
test_suite.addTest(filetests.build_suite())
if options.system_pyregr and languages:
if options.system_pyregr and languages:
...
@@ -2161,13 +2150,9 @@ def runtests(options, cmd_args, coverage=None):
...
@@ -2161,13 +2150,9 @@ def runtests(options, cmd_args, coverage=None):
sys_pyregr_dir = os.path.join(os.path.dirname(sys.executable), 'Lib', 'test') # source build
sys_pyregr_dir = os.path.join(os.path.dirname(sys.executable), 'Lib', 'test') # source build
if os.path.isdir(sys_pyregr_dir):
if os.path.isdir(sys_pyregr_dir):
filetests = TestBuilder(ROOTDIR, WORKDIR, selectors, exclude_selectors,
filetests = TestBuilder(ROOTDIR, WORKDIR, selectors, exclude_selectors,
options.annotate_source, options.cleanup_workdir,
options, True, languages, test_bugs,
options.cleanup_sharedlibs, options.cleanup_failures,
sys.version_info[0], common_utility_dir,
True,
add_embedded_test=True)
options.cython_only, languages, test_bugs,
options.fork, sys.version_info[0],
options.test_determinism,
common_utility_dir)
sys.stderr.write("Including CPython regression tests in %s
\
n
" % sys_pyregr_dir)
sys.stderr.write("Including CPython regression tests in %s
\
n
" % sys_pyregr_dir)
test_suite.addTest(filetests.handle_directory(sys_pyregr_dir, 'pyregr'))
test_suite.addTest(filetests.handle_directory(sys_pyregr_dir, 'pyregr'))
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment