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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
9dd1892b
Commit
9dd1892b
authored
Jan 17, 2015
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'larsmans-runtests-explain-bugs-txt'
parents
480c9784
efb69888
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
runtests.py
runtests.py
+11
-3
No files found.
runtests.py
View file @
9dd1892b
...
@@ -1487,8 +1487,10 @@ class VersionDependencyExcluder:
...
@@ -1487,8 +1487,10 @@ class VersionDependencyExcluder:
class FileListExcluder:
class FileListExcluder:
def __init__(self, list_file):
def __init__(self, list_file, verbose=False):
self.verbose = verbose
self.excludes = {}
self.excludes = {}
self._list_file = list_file
f = open(list_file)
f = open(list_file)
try:
try:
for line in f.readlines():
for line in f.readlines():
...
@@ -1499,7 +1501,12 @@ class FileListExcluder:
...
@@ -1499,7 +1501,12 @@ class FileListExcluder:
f.close()
f.close()
def __call__(self, testname, tags=None):
def __call__(self, testname, tags=None):
return testname in self.excludes or testname.split('.')[-1] in self.excludes
exclude = (testname in self.excludes
or testname.split('.')[-1] in self.excludes)
if exclude and self.verbose:
print("Excluding %s because it's listed in %s"
% (testname, self._list_file))
return exclude
class TagsSelector:
class TagsSelector:
...
@@ -1904,6 +1911,7 @@ def runtests(options, cmd_args, coverage=None):
...
@@ -1904,6 +1911,7 @@ def runtests(options, cmd_args, coverage=None):
test_bugs = True
test_bugs = True
selectors = [ string_selector(r) for r in cmd_args ]
selectors = [ string_selector(r) for r in cmd_args ]
verbose_excludes = selectors or options.verbosity >= 2
if not selectors:
if not selectors:
selectors = [ lambda x, tags=None: True ]
selectors = [ lambda x, tags=None: True ]
...
@@ -1935,7 +1943,7 @@ def runtests(options, cmd_args, coverage=None):
...
@@ -1935,7 +1943,7 @@ def runtests(options, cmd_args, coverage=None):
exclude_selectors.append(ShardExcludeSelector(options.shard_num, options.shard_count))
exclude_selectors.append(ShardExcludeSelector(options.shard_num, options.shard_count))
if not test_bugs:
if not test_bugs:
exclude_selectors += [ FileListExcluder(os.path.join(ROOTDIR, "bugs.txt")) ]
exclude_selectors += [ FileListExcluder(os.path.join(ROOTDIR, "bugs.txt")
, verbose=verbose_excludes
) ]
if sys.platform in ['win32', 'cygwin'] and sys.version_info < (2,6):
if sys.platform in ['win32', 'cygwin'] and sys.version_info < (2,6):
exclude_selectors += [ lambda x: x == "run.specialfloat" ]
exclude_selectors += [ lambda x: x == "run.specialfloat" ]
...
...
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