コード例 #1
0
 def test_request_qa(self):
     tagCollectorAPI.createQARequest(self.release_name, self.architecture_name)
     qaData = tagCollectorAPI.getQAPendingRequests()
     self.assertTrue(qaData)
     self.assertEquals(self.release_name, qaData["release_name"])
     self.assertEquals(self.architecture_name, qaData["architecture_name"])
     self.assertEquals("QA", qaData["type"])
コード例 #2
0
 def test_request_qa(self):
     tagCollectorAPI.createQARequest(self.release_name,
                                     self.architecture_name)
     qaData = tagCollectorAPI.getQAPendingRequests()
     self.assertTrue(qaData)
     self.assertEquals(self.release_name, qaData['release_name'])
     self.assertEquals(self.architecture_name, qaData['architecture_name'])
     self.assertEquals('QA', qaData['type'])
コード例 #3
0
 def test_build_and_finish_qa(self):
     qaData = tagCollectorAPI.getQAPendingRequests()
     self.assertTrue(qaData)
     tagCollectorAPI.setRequestBuilding(
         qaData["id"], qaData["release_name"], machine=socket.gethostname(), pid=os.getpid()
     )
     qaBuildingRequests = tagCollectorAPI.getBuildingQARequests()
     self.assertTrue(qaBuildingRequests)
     self.assertEquals(self.release_name, qaBuildingRequests[0]["release_name"])
     self.assertEquals(self.architecture_name, qaBuildingRequests[0]["architecture_name"])
     self.assertEquals("QA", qaBuildingRequests[0]["type"])
     isFinished = tagCollectorAPI.finishRequest(qaBuildingRequests[0]["id"])
     self.assertTrue(isFinished)
コード例 #4
0
 def test_build_and_finish_qa(self):
     qaData = tagCollectorAPI.getQAPendingRequests()
     self.assertTrue(qaData)
     tagCollectorAPI.setRequestBuilding(qaData['id'],
                                        qaData['release_name'],
                                        machine=socket.gethostname(),
                                        pid=os.getpid())
     qaBuildingRequests = tagCollectorAPI.getBuildingQARequests()
     self.assertTrue(qaBuildingRequests)
     self.assertEquals(self.release_name,
                       qaBuildingRequests[0]['release_name'])
     self.assertEquals(self.architecture_name,
                       qaBuildingRequests[0]['architecture_name'])
     self.assertEquals('QA', qaBuildingRequests[0]['type'])
     isFinished = tagCollectorAPI.finishRequest(qaBuildingRequests[0]['id'])
     self.assertTrue(isFinished)
コード例 #5
0
ファイル: runQA.py プロジェクト: cms-sw/ib-scheduler
  tagCollectorAPI.finishRequest(requestId)
  
def getLock(buildpath):
  return Lock(os.path.join(buildpath,'lock'),True,60*60*20)

if __name__ == "__main__" :
  parser = OptionParser(usage="%(prog)s [--test <tests>][--buildpath <buildpath>] [--cmspath <cmspath>]")
  parser.add_option("-t", "--test", dest="tests", help="Tests to run", default=DEFAULT_TESTS)
  parser.add_option("-b", "--buildpath", dest="buildpath", help="Path to build directory", default=DEFAULT_BUILDPATH)
  parser.add_option("-c", "--cmspath", dest="cmspath", help="Path to shared cms directory", default=DEFAULT_CMSPATH)
  
  opts, args = parser.parse_args()
  if args:
    parser.error("%(prog)s does not take any argument")

  lock = getLock(opts.buildpath)
  if not lock:
    sys.exit(0)

  qaData = tagCollectorAPI.getQAPendingRequests()
  if not qaData:
    print "Pending QA requests are not found, exiting."
    sys.exit(0)
  processScheduledQARequest(qaData['id'],
                            qaData['release_name'], 
                            qaData['architecture_name'], 
                            buildpath=opts.buildpath, 
                            cmspath=opts.cmspath, 
                            tests=opts.tests)
  lock = None
コード例 #6
0
 def test_qa_pending_queue_empty(self):
     qaData = tagCollectorAPI.getQAPendingRequests()
     self.assertFalse(qaData)
コード例 #7
0
ファイル: runQA.py プロジェクト: davidlt/int-build
    parser.add_option("-b",
                      "--buildpath",
                      dest="buildpath",
                      help="Path to build directory",
                      default=DEFAULT_BUILDPATH)
    parser.add_option("-c",
                      "--cmspath",
                      dest="cmspath",
                      help="Path to shared cms directory",
                      default=DEFAULT_CMSPATH)

    opts, args = parser.parse_args()
    if args:
        parser.error("%(prog)s does not take any argument")

    lock = getLock(opts.buildpath)
    if not lock:
        sys.exit(0)

    qaData = tagCollectorAPI.getQAPendingRequests()
    if not qaData:
        print "Pending QA requests are not found, exiting."
        sys.exit(0)
    processScheduledQARequest(qaData['id'],
                              qaData['release_name'],
                              qaData['architecture_name'],
                              buildpath=opts.buildpath,
                              cmspath=opts.cmspath,
                              tests=opts.tests)
    lock = None
コード例 #8
0
 def test_qa_pending_queue_empty(self):
     qaData = tagCollectorAPI.getQAPendingRequests()
     self.assertFalse(qaData)