Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PandABox-tst
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
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
PandABox-tst
Commits
f912dbf8
Commit
f912dbf8
authored
Feb 28, 2017
by
Christopher Turner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass hostname and port as arguments to the script
parent
a48f90e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
run_tests.py
run_tests.py
+14
-4
No files found.
run_tests.py
View file @
f912dbf8
...
...
@@ -4,7 +4,7 @@ import read_config as cfg
import
importlib
import
socket
import
time
import
os
import
os
,
getopt
,
sys
,
argparse
import
logging
class
RunTests
(
object
):
...
...
@@ -102,13 +102,23 @@ def view_log(log_file_path):
f
.
close
()
def
main
():
def
main
(
argv
):
timestr
=
time
.
strftime
(
"
%
Y
%
m
%
d-
%
H
%
M
%
S"
)
log_file_name
=
os
.
path
.
join
(
'log'
,
"{}.log"
.
format
(
timestr
))
setup_logging
(
log_file_name
)
rt
=
RunTests
(
'config'
,
'172.23.252.202'
,
8888
)
#pass in as parameter
# Argument processing
parser
=
argparse
.
ArgumentParser
(
description
=
'Run PandA hardware I/O tests'
)
parser
.
add_argument
(
'--port'
,
'-p'
,
default
=
8888
,
help
=
'Configuration port number'
)
parser
.
add_argument
(
'hostname'
,
help
=
'Name or IP address of Panda device'
)
args
=
parser
.
parse_args
()
rt
=
RunTests
(
'config'
,
args
.
hostname
,
int
(
args
.
port
))
#pass in as parameter
rt
.
run_tests
()
view_log
(
log_file_name
)
if
__name__
==
'__main__'
:
main
()
\ No newline at end of file
main
(
sys
.
argv
[
1
:])
\ No newline at end of file
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