Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Production Test Suite - base
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Production Test Suite - base
Commits
11fe94b1
Commit
11fe94b1
authored
Aug 31, 2011
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pts: remove spec test_path
parent
8e2b3d37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
pts.py
pts.py
+3
-3
No files found.
pts.py
View file @
11fe94b1
...
...
@@ -44,7 +44,7 @@ def make_zip(zipname, ziplist):
for
f
in
ziplist
:
z
.
write
(
f
)
def
run_test
(
testname
,
logname
,
yes
=
False
):
def
run_test
(
testname
,
logname
,
test_path
,
yes
=
False
):
"""run test testname with output redirected to logname
If yes is true, assume affirmative answers from the user
...
...
@@ -57,7 +57,7 @@ def run_test(testname, logname, yes=False):
sys
.
stdin
=
open
(
'/dev/null'
)
__builtins__
.
raw_input
=
pts_raw_input
mod
=
__import__
(
testname
,
globals
(),
locals
(),
[])
mod
.
main
(
default_directory
=
'./test/spec/python'
)
mod
.
main
(
default_directory
=
test_path
)
finally
:
sys
.
stdout
.
close
()
sys
.
stdout
=
tmpout
...
...
@@ -251,7 +251,7 @@ class Suite(object):
log
.
write
(
'------------------------
\n
'
)
log
.
write
(
'running test {0} = {1}
\n
'
.
format
(
shortname
,
test
))
print
'running test '
+
shortname
run_test
(
testname
,
logname
,
yes
=
self
.
yes
)
run_test
(
testname
,
logname
,
test_path
=
self
.
test_path
,
yes
=
self
.
yes
)
except
PtsCritical
,
e
:
print
'test [
%
s]: critical error, aborting: [
%
s]'
%
(
shortname
,
e
)
log
.
write
(
' critical error in test {0}, exception [{1}]
\n
'
.
format
(
shortname
,
e
))
...
...
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