Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Xiaowu Zhang
slapos
Commits
7a325c69
Commit
7a325c69
authored
May 19, 2020
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! buildout: add profile to test with Python 3
parent
8a1f4101
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
software/buildout-testing/runTestSuite.in
software/buildout-testing/runTestSuite.in
+7
-7
No files found.
software/buildout-testing/runTestSuite.in
View file @
7a325c69
...
@@ -40,17 +40,17 @@ class DummyTestResult:
...
@@ -40,17 +40,17 @@ class DummyTestResult:
class BuildoutTestSuite(TestSuite):
class BuildoutTestSuite(TestSuite):
RUN_RE = re.compile(
RUN_RE = re.compile(
r'Ran (?P<all_tests>\d+) tests with'
b
r'Ran (?P<all_tests>\d+) tests with'
' (?P<failures>\d+) failures,'
br
' (?P<failures>\d+) failures,'
' (?P<errors>\d+) errors and'
br
' (?P<errors>\d+) errors and'
' (?P<skips>\d+) skipped in')
br
' (?P<skips>\d+) skipped in')
def run(self, test):
def run(self, test):
start = time()
start = time()
try:
try:
status_dict = self.spawn(os.path.join('bin', 'zope-testrunner'),
status_dict = self.spawn(os.path.join('bin', 'zope-testrunner'),
'--test-path', os.path.join(test_dict[test], 'src'))
'--test-path', os.path.join(test_dict[test], 'src'))
except SubprocessError
,
e:
except SubprocessError
as
e:
status_dict = e.status_dict
status_dict = e.status_dict
end = time()
end = time()
status_dict.update(
status_dict.update(
...
@@ -93,7 +93,7 @@ def main():
...
@@ -93,7 +93,7 @@ def main():
else:
else:
test_result = DummyTestResult(list(test_dict))
test_result = DummyTestResult(list(test_dict))
fd = os.open('buildout.cfg', os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0666)
fd = os.open('buildout.cfg', os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0
o
666)
try:
try:
os.write(fd, str2bytes("""\
os.write(fd, str2bytes("""\
[buildout]
[buildout]
...
@@ -116,7 +116,7 @@ eggs +=
...
@@ -116,7 +116,7 @@ eggs +=
scripts =
scripts =
zope-testrunner
zope-testrunner
""" % (os.path.join(slapos_buildout, 'buildout.cfg'),
""" % (os.path.join(slapos_buildout, 'buildout.cfg'),
''.join('\n ' + x for x in test_dict.
iter
values()),
''.join('\n ' + x for x in test_dict.values()),
'\n'.join(x + ' =' for x in test_dict))))
'\n'.join(x + ' =' for x in test_dict))))
finally:
finally:
os.close(fd)
os.close(fd)
...
...
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