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
03e12195
Commit
03e12195
authored
May 18, 2011
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tps: make CLI inherit from Suite
parent
10a825fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
tps.py
tps.py
+15
-15
No files found.
tps.py
View file @
03e12195
...
...
@@ -120,29 +120,28 @@ def sha(blob, len=7):
if
len
:
return
ret
[:
len
]
class
Cli
(
cmd
.
Cmd
):
def
__init__
(
self
,
suite
):
# Suite instance manipulated by this cli
self
.
suite
=
suite
class
Cli
(
cmd
.
Cmd
,
Suite
):
def
__init__
(
self
,
cfgfilename
=
default_config_file
):
cmd
.
Cmd
.
__init__
(
self
)
Suite
.
__init__
(
self
,
cfgfilename
)
def
do_board
(
self
,
arg
):
if
arg
:
self
.
suite
.
board
=
arg
self
.
board
=
arg
else
:
print
self
.
suite
.
board
print
self
.
board
def
do_serial
(
self
,
arg
):
if
arg
:
self
.
s
uite
.
s
erial
=
arg
self
.
serial
=
arg
else
:
print
self
.
s
uite
.
s
erial
print
self
.
serial
def
do_path
(
self
,
arg
):
if
arg
:
self
.
suite
.
path
=
arg
self
.
path
=
arg
else
:
print
self
.
suite
.
path
print
self
.
path
def
do_run
(
self
,
arg
):
pass
...
...
@@ -150,19 +149,19 @@ class Cli(cmd.Cmd):
pass
def
do_save
(
self
,
arg
):
self
.
suite
.
write_config
()
self
.
write_config
()
def
do_log
(
self
,
arg
):
if
arg
:
self
.
suite
.
log
=
arg
self
.
log
=
arg
else
:
print
self
.
suite
.
log
print
self
.
log
def
do_log_path
(
self
,
arg
):
if
arg
:
self
.
suite
.
log_path
=
arg
self
.
log_path
=
arg
else
:
print
self
.
suite
.
log_path
print
self
.
log_path
def
do_EOF
(
self
,
arg
):
print
...
...
@@ -184,6 +183,7 @@ def main1():
s
.
run
()
def
main2
():
s
=
Suite
()
cli
=
Cli
()
cli
.
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