Ejemplo n.º 1
0
        dealresult(basepath)

        print "Now starting to upload the result to TMS server"

        # upload_result['testnote']= str(retrycounter) + 'Case: %s upload_on_%s_Server=%s' % (runningcouter,time.strftime('%H:%M'),'runfromserver')
        upload_result["testnote"] = "Automated"
        print upload_result["testnote"]

        print upload_result["tstype"]

        upload_result["trial"] = 1 + TMS.getResultInfo_VW(check_testdate, testtime_start, upload_result)
        if upload_result["trial"] > 10:
            print "\n------The same test has been run for more than 10 times,please make sure it works!-----------"
            sys.exit(1)
        if result_TMS_supported:
            TMS.tms_upload_vw(tms_server, upload_result)
        else:
            print "The vwtest result type is not supported by TMS yet, the result is saved on the local folder as the test name\n"

        runningcouter += 1
        TMS.updateprogress(runningcouter / float(totalcases) * 100, orderid)

        running_status = TMS.getrunningstatus(orderid)
        if running_status == 0:
            print "The TMS server stop the test"
            sys.exit(1)

        os.system("echo %s --done >> testlog" % upload_result["testnote"])
        time.sleep(10)

        retrycounter = 0
Ejemplo n.º 2
0
			if csvcount == 0 or pdfcount == 0:
				print "The CSV or PDF file is not found, the testcase failed, try to run the next case."
				os.system("echo '%s Failed on %s--:%s_%s ---%s' >> ./result/failedcase.log"%(testname,testtime_start,dut_parameter['APModel'],dut_parameter['APSWVersion'],FLAG_fail))
				continue
			'''
			
			print FLAG_Fail
			if FLAG_Fail:
				print "The current testcase failed, try to run the next case."
				errorlog+=FLAG_Fail
				os.system("echo 'Case: %s Failed on %s %s_%s --> %s' >> ./result/failedcase.log"%(testname,datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'),dut_parameter['APModel'],dut_parameter['APSWVersion'],FLAG_Fail))
			else:
				print "Now starting to upload the result to TMS server"
				#print upload_result['tstype']
				print upload_result	
				upload_fail=TMS.tms_upload_vw(tms_server,upload_result)
				
				if upload_fail:
					print "The result upload failed, run the next case."
					errorlog+=FLAG_Fail
					os.system("echo 'Case: %s Failed on %s %s_%s --> %s' >> ./result/failedcase.log"%(testname,datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'),dut_parameter['APModel'],dut_parameter['APSWVersion'],"upload failed"))
					
		
		
			

		#upload_result['testnote']= str(retrycounter) + 'Case: %s upload_on_%s_Server=%s' % (runningcouter,time.strftime('%H:%M'),'runfromserver')
			
		if FLAG_Fail:
			failedcases.append(cur_case)
		else: