def main():
    pf = PassFail()
    tests = [resourceBasicTests,resourceSearchTests,execTests,attrValTests, \
                 focusTests]
    for test in tests:
        test(pf)
        
    pf.test_info()
    return pf.failed_count > 0
示例#2
0
def main():
    pf = PassFail()
    tests = [resourceBasicTests,resourceSearchTests,execTests,attrValTests, \
                 focusTests]
    for test in tests:
        test(pf)

    pf.test_info()
    return pf.failed_count > 0
示例#3
0
def main():

    ptds = PTdataStore()
    connected = ptds.connectToDB(False)
    if not connected:
       print "could not connect to DB"
       sys.exit(0)

    tests = [test1,test2,test3,test4,test5,test6,test7,test8]

    pf = PassFail()
    for test in tests: 
        test(ptds, pf)

    pf.test_info()
    return pf.failed_count > 0
示例#4
0
def main():

    ptds = PTdataStore()
    connected = ptds.connectToDB(False)
    if not connected:
        print "could not connect to DB"
        sys.exit(0)

    tests = [test1, test2, test3, test4, test5, test6, test7, test8]

    pf = PassFail()
    for test in tests:
        test(ptds, pf)

    pf.test_info()
    return pf.failed_count > 0
示例#5
0
 def __init__(self, dataDir, username, password, dbname, hostname):
     self.tests = PassFail()
     self.args = {
         "--data_dir": dataDir,
         "--dbname": dbname,
         "--password": password,
         "--username": username,
         "--host": hostname,
         "--testMode": ''
     }
示例#6
0
#!/usr/bin/env python

# PerfTrack Version 1.0     September 1, 2005
# See PTLICENSE for distribution information. 

import Hardware,os,sys
from PassFail import PassFail 
from PTexception import PTexception

dataDir = "badMachineFiles"
files = os.listdir(dataDir)
files.sort()
pf = PassFail()
for f in files:
   print "processing:" + f
   try: 
      if Hardware.main(["", "--in_file", dataDir + "/" + f, "--out_file", "/dev/null"]) == 0:
         pf.failed("Bad Machine Data for %s did not fail" % f)
      else:
         pf.passed("Bad Machine Data Caught")
   except PTexception, a:
      pf.passed("Intentional FAIL: %s" % a.value)

pf.test_info()

sys.exit(pf.failed_count > 0)
示例#7
0
import sys
from PTdS_test1 import PTdS_t1
from PTdS_test2 import PTdS_t2
from PTdS_test3 import PTdS_t3
from PTdS_test4 import PTdS_t4
from PTdS_test5 import PTdS_t5
from PTdS_test6 import PTdS_t6
from PTdS_test7 import PTdS_t7
from PTdS_test8 import *
from PTds import PTdataStore
from mx.DateTime import *
from PassFail import PassFail
#from getpass import getpass

pf = PassFail()
testStore = PTdataStore()

test1 = PTdS_t1(pf)
test2 = PTdS_t2(pf)
test3 = PTdS_t3(pf)
test4 = PTdS_t4(pf)
test5 = PTdS_t5(pf)
test6 = PTdS_t6(pf)
test7 = PTdS_t7(pf)
test8 = PTdS_t8(pf)

##TEST 1 -- connection test
print "test1.2 - connect, no optional parameters"
#test1.test1_2(testStore)