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
2307d68d
Commit
2307d68d
authored
May 20, 2011
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tps: add cli commands
parent
b0b12219
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
tps.py
tps.py
+21
-21
No files found.
tps.py
View file @
2307d68d
...
...
@@ -177,6 +177,7 @@ class Cli(cmd.Cmd, Suite):
def
__init__
(
self
,
cfgfilename
=
default_config_file
):
cmd
.
Cmd
.
__init__
(
self
)
Suite
.
__init__
(
self
,
cfgfilename
)
self
.
ruler
=
''
def
do_board
(
self
,
arg
):
if
arg
:
...
...
@@ -190,25 +191,11 @@ class Cli(cmd.Cmd, Suite):
else
:
print
self
.
serial
def
do_path
(
self
,
arg
):
def
do_
test_
path
(
self
,
arg
):
if
arg
:
self
.
path
=
arg
self
.
test_
path
=
arg
else
:
print
self
.
path
def
do_run
(
self
,
arg
):
pass
def
do_repeat
(
self
,
arg
):
pass
def
do_save
(
self
,
arg
):
self
.
write_config
()
def
do_log
(
self
,
arg
):
if
arg
:
self
.
log
=
arg
else
:
print
self
.
log
print
self
.
test_path
def
do_log_path
(
self
,
arg
):
if
arg
:
...
...
@@ -216,13 +203,25 @@ class Cli(cmd.Cmd, Suite):
else
:
print
self
.
log_path
def
do_save
(
self
,
arg
):
self
.
write_config
()
def
do_run
(
self
,
arg
):
pass
def
do_repeat
(
self
,
arg
):
pass
def
do_EOF
(
self
,
arg
):
print
return
True
def
do_quit
(
self
,
arg
):
"exit cli"
return
True
do_q
=
do_quit
do_h
=
cmd
.
Cmd
.
do_help
def
main1
():
parser
=
OptionParser
()
parser
.
add_option
(
"-c"
,
"--config"
,
dest
=
"config"
,
...
...
@@ -243,13 +242,14 @@ def main1():
(
options
,
args
)
=
parser
.
parse_args
()
s
=
Suite
(
options
.
config
)
s
=
Cli
(
options
.
config
)
s
.
__dict__
.
update
(
options
.
__dict__
)
s
.
sequence
=
args
s
.
log_name
=
default_log_name
s
.
write_config
()
s
.
run
()
if
options
.
cli
:
s
.
cmdloop
()
else
:
s
.
run
()
def
main2
():
s
=
Suite
()
...
...
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