Commit 183f00ba authored by Dimitris Lampridis's avatar Dimitris Lampridis

add path to rsa key to CONFIG.ini

parent d18731bd
......@@ -14,4 +14,5 @@ MgtPassword = Gr@nBr@st0
CpuHostName = cfv-774-opt-pts1
CpuPort = 22
# Please set CpuUserName to an account name you have access to on the CTR.FEC
CpuUserName = nobody
CpuUserName = optpts1
CpuUserNameRsa = ~/.ssh/id_rsa
......@@ -43,10 +43,10 @@ import utilities as util
import ptsexcept
def get_ctrtest_err(user, host, port, module):
def get_ctrtest_err(user, rsa, host, port, module):
cmd = 'echo "mo {0} rst" | /usr/local/bin/ctrtest-timdt | grep -A 7 -e MsMissedErrs | xargs'.format(module)
output = os.popen("ssh -p %d %s@%s '%s'" % (port, user, host, cmd)).read()
output = os.popen("ssh -i %s -p %d %s@%s '%s'" % (rsa, port, user, host, cmd)).read()
items = string.split(output)
......@@ -73,6 +73,7 @@ def main (card=None, default_directory='.',suite=None, serial=""):
host = config['CTR.FEC']['CpuHostName']
port = int(config['CTR.FEC']['CpuPort'])
user = config['CTR.FEC']['CpuUserName']
rsa = config['CTR.FEC']['CpuUserNameRsa']
duration = float(config['CTR.FEC']['TstDuration'])
......@@ -103,12 +104,12 @@ def main (card=None, default_directory='.',suite=None, serial=""):
###############################################################################
for i in range(0,4):
ms1[i], pll1[i], miss1[i] = get_ctrtest_err(user, host, port, i+1)
ms1[i], pll1[i], miss1[i] = get_ctrtest_err(user, rsa, host, port, i+1)
time.sleep(duration)
for i in range(0,4):
ms2[i], pll2[i], miss2[i] = get_ctrtest_err(user, host, port, i+1)
ms2[i], pll2[i], miss2[i] = get_ctrtest_err(user, rsa, host, port, i+1)
if (ms1[i] != ms2[i]):
test_results['Ms errors'] = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment