blob: 1d3aee46b6f0718d4941bf7fd58c56a34c0bff34 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
import os
from dogtail import tree
from dogtail.utils import run
import time
from dogtail.tree import predicate
from finishBuild import TestFinish
from packageSizeShown import PackageSize
from base import Base
print "===========Entering buildImage==============="
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 BuildImage(Base):
def build(self):
self.selectMachine()
self.selectImage()
try:
hob.child('Build image').click()
except:
self.writeInFile("image_build: can not find build image button")
return 10
self.writeInFile('\n' + "image build: ")
t=TestFinish()
finish = t.analyse()
if finish == 20:
self.writeInFile("failed")
else:
self.writeInFile("passed")
instance = PackageSize()
instance.showPackageSize()
time.sleep(30)
try:
bnw = hob.child('Build new image')
bnw.click()
except:
self.writeInFile("image_build: can not find build new image button")
return 10
|