Commit 7ef7f90d authored by Christopher Turner's avatar Christopher Turner

Clean up userinpuit for plugged and unplugged tests

parent a6462259
......@@ -4,15 +4,19 @@ import PandATest
class LvdsUnplugged(PandATest.PandATest):
def test_code(self):
inputs = [1, 2]
outputs = [1, 2]
def __init__(self, *args, **kwargs):
super(LvdsUnplugged, self).__init__(*args, **kwargs)
def get_user_input(self):
inputy = '.'
while inputy not in ['']:
print "Loopback connecters for LVDS NOT connected, OK ? [return]"
inputy = raw_input()
def test_code(self):
inputs = [1, 2]
outputs = [1, 2]
self.logger.info("UNPLUGGED")
for o in outputs:
self.set_output('LVDSOUT', o, '.VAL=BITS.ONE', 'OK')
......@@ -24,5 +28,4 @@ class LvdsUnplugged(PandATest.PandATest):
self.test_result.append(
self.check_input('LVDSIN',o, 0, i, o, 1, 1))
return not all(self.test_result)
return not all(self.test_result)
\ No newline at end of file
......@@ -18,6 +18,7 @@ class PandATest(object):
return rootLogger
def run(self):
self.get_user_input()
self.logger.info("TEST START")
result = self.test_code()
if result == 0:
......@@ -69,4 +70,7 @@ class PandATest(object):
self.__class__.__name__,
self.blocknum,
error_count)]
return summary
\ No newline at end of file
return summary
def get_user_input(self):
pass
\ No newline at end of file
......@@ -11,8 +11,9 @@ class PluggedTests(PandATest.PandATest):
self.tp = ttl.ttl(*args, **kwargs)
def test_code(self):
self.lp.run()
self.tp.run()
self.lp.test_code()
self.tp.test_code()
#NEED TO RETURN IF PASSED OR NOT..
def get_summary(self):
summary = ["{:<10}{:<10} ERRORS: {}".format(
......@@ -24,4 +25,10 @@ class PluggedTests(PandATest.PandATest):
self.blocknum,
self.tp.test_result.count(0)),
]
return summary
\ No newline at end of file
return summary
def get_user_input(self):
inputy = '.'
while inputy not in ['']:
print "Loopback connecters connected, OK ? [return]"
inputy = raw_input()
\ No newline at end of file
......@@ -7,15 +7,16 @@ class TtlUnplugged(PandATest.PandATest):
def __init__(self, *args, **kwargs):
super(TtlUnplugged, self).__init__(*args, **kwargs)
def test_code(self):
outputs = [1,2,3,4,5,6,7,8,9,10]
inputs = [1,2,3,4,5,6]
def get_user_input(self):
inputy = '.'
while inputy not in ['']:
print "Loopback connecters for TTL NOT connected, OK ? [return]"
inputy = raw_input()
def test_code(self):
outputs = [1,2,3,4,5,6,7,8,9,10]
inputs = [1,2,3,4,5,6]
self.logger.info("UNPLUGGED")
for o in outputs:
self.set_output('TTLOUT', o, '.VAL=BITS.ONE', 'OK')
......
......@@ -11,8 +11,9 @@ class UnpluggedTests(PandATest.PandATest):
self.tu = TtlUnplugged.TtlUnplugged(*args, **kwargs)
def test_code(self):
self.lu.run()
self.tu.run()
self.lu.test_code()
self.tu.test_code()
#NEED TO RETURN IF PASSED OR NOT..
def get_summary(self):
summary = ["{:<10}{:<10} ERRORS: {}".format(
......@@ -24,4 +25,10 @@ class UnpluggedTests(PandATest.PandATest):
self.blocknum,
self.tu.test_result.count(0)),
]
return summary
\ No newline at end of file
return summary
def get_user_input(self):
inputy = '.'
while inputy not in ['']:
print "Loopback connecters NOT connected, OK ? [return]"
inputy = raw_input()
\ No newline at end of file
......@@ -4,6 +4,12 @@ import PandATest
class lvds(PandATest.PandATest):
def get_user_input(self):
inputy = '.'
while inputy not in ['']:
print "Loopback connecters for LVDS connected, OK ? [return]"
inputy = raw_input()
def test_code(self):
outputs = [1, 2]
inputs = [1, 2]
......@@ -12,11 +18,6 @@ class lvds(PandATest.PandATest):
outputs[1]: inputs[1]
}
inputy = '.'
while inputy not in ['']:
print "Loopback connecters for LVDS connected, OK ? [return]"
inputy = raw_input()
self.logger.info("PLUGGED")
for outp, inp in channel_connect.iteritems():
self.set_output('LVDSOUT', outp, '.VAL=BITS.ONE', 'OK')
......
......@@ -7,6 +7,12 @@ class ttl(PandATest.PandATest):
def __init__(self, *args, **kwargs):
super(ttl, self).__init__(*args, **kwargs)
def get_user_input(self):
inputy = '.'
while inputy not in ['']:
print "Loopback connecters for TTL connected, OK ? [return]"
inputy = raw_input()
def test_code(self):
outputs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
inputs = [1, 2, 3, 4, 5, 6]
......@@ -23,11 +29,6 @@ class ttl(PandATest.PandATest):
outputs[9]: inputs[3]
}
inputy = '.'
while inputy not in ['']:
print "Loopback connecters for TTL connected, OK ? [return]"
inputy = raw_input()
self.logger.info("PLUGGED")
for outp, inp in channel_connect.iteritems():
self.set_output('TTLOUT', outp, '.VAL=BITS.ONE', 'OK')
......
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