예제 #1
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
예제 #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
#!/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)