aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/hob-dogtail/testFinish.py
blob: 763d5573e94e27d187ca8258bf71df543b139ec7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os
from dogtail import tree
import time
from stopHob import StopHob
from startHob import StartHob

#test class. to be deleted

try:
    bitbake = tree.root.application('bitbake')
except:
    print "can not connect to the application"
else:
    try:
        hob = bitbake.child( roleName='frame' )
    except:
        print "can not connect to the application"

class TestFinish:

    def writeInFile(self, error_name):
        f = open('hobResults', 'a')
        f.write('\n' + error_name)
        f.close()

    def analyse(self):
    	try:
    		finish = hob.child("Build new image")
		print "Image is ready"
		return 10
    	except:
		print "Image ready not detected"
		return 20