Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Production Test Suite
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Commits
4d84d423
Commit
4d84d423
authored
May 20, 2011
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tps: validate test sequence parameters
parent
18a88e32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
tps.py
tps.py
+13
-1
No files found.
tps.py
View file @
4d84d423
...
...
@@ -17,7 +17,8 @@ from pprint import pprint
default_config_file
=
'tpsdefault.cfg'
default_log_pattern
=
'tps_
%(board)
s_
%(serial)
s_
%(number)
s_
%(timestamp)
s.txt'
default_log_name
=
'tps_run_{0}_{1}_{2}_{3}.txt'
default_test_pattern
=
'test[0-9][0-9]'
default_test_pattern
=
r'test[0-9][0-9]'
default_test_syntax
=
r'(test)?(\d?\d)'
def
run_test
(
testname
,
logname
):
"""run test testname with output redirected to logname
...
...
@@ -269,9 +270,20 @@ def main1():
help
=
"run the batch in random order"
,
)
(
options
,
args
)
=
parser
.
parse_args
()
if
not
args
:
parser
.
print_usage
()
return
invalid_args
=
[
arg
for
arg
in
args
if
not
re
.
match
(
default_test_syntax
,
arg
)
]
if
invalid_args
:
print
'invalid test names, aborting:'
,
for
i
in
invalid_args
:
print
i
,
print
return
s
=
Cli
(
options
.
config
)
s
.
__dict__
.
update
(
options
.
__dict__
)
s
.
sequence
=
args
if
options
.
cli
:
s
.
cmdloop
()
...
...
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