Esempio n. 1
0
def run_tests(tests, verbose, continue_failure, control):
    for test in test_generator(tests, util.get_arches(), verbose):
        try:
            test.config()
            test.build(force_build=False)
            test.run(control=control)
        except Exception as e:
            handle_failure(test, e)
            if not continue_failure:
                break
Esempio n. 2
0
def run_tests(tests,
              verbose,
              continue_failure,
              control):
  for test in test_generator(tests, util.get_arches(), verbose):
    try:
      test.config()
      test.build(force_build=False)
      test.run(control=control)
    except Exception as e:
      handle_failure(test, e)
      if not continue_failure:
        break
Esempio n. 3
0
def main():

    # opts
    try:
        opts, args = getopt.getopt(
            sys.argv[1:], "hlt:d:p:",
            ["help", "logList", "type=", "duration=", "logPath="])
    except getopt.GetoptError as err:
        print(str(err))
        help()
        sys.exit(2)

    # analyze
    for key, val in opts:
        if key in ('-h', "--help"):
            help()
            sys.exit()
        elif key in ('-l', "--logList"):
            conf.logList = True
        elif key in ('-t', "--type"):
            conf.type = ReqType(int(val))
        elif key in ('-d', "--duration"):
            conf.duration = val
        elif key in ('-p', "--logPath"):
            conf.logPath = val
        elif key in ('-c', "--configPath"):
            conf.configPath = val
        else:
            help()

    # switch
    if conf.type is ReqType.LIST:
        windows.lst()
    elif conf.type is ReqType.MONITOR:
        windows.handle()
    elif conf.type is ReqType.TEST_CONFIG:
        test.config()
    elif conf.type is ReqType.TEST_LOG:
        test.log()
Esempio n. 4
0
 def setUp(self):
     self.config = test.config()
Esempio n. 5
0
 def setUp(self):
     self.config = test.config()
     self.db = DB(self.config)
Esempio n. 6
0
 def setUp(self):
     self.config = test.config()
     self.config['datastream'] = ["sgpmfrsrC1.00", "nsairtC1.00"]