blob: d68ce103fa37fe1a973b90c40129cf2c8765d195 (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
from dogtail import tree
from dogtail.utils import run
from time import sleep
from os import environ, path, remove
import sys, string, os
import subprocess
from subprocess import call
import time
from dogtail.tree import predicate
from base import Base
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 BaseImageChange(Base):
def imageChange(self):
self.selectMachine('qemux86')
self.selectImage("core-image-sato")
try:
hob.child('Edit image recipe').click()
except:
self.writeInFile("Recipe list re-load for base image change: can not find recipe reload button")
return 10
x = hob.child('Included recipes')
listaImensa = x.findChildren(predicate.GenericPredicate(roleName="table cell"))
try:
hob.child('Cancel').click()
except:
self.writeInFile("Recipe list re-load for base image change: can not find cancel button")
return 10
time.sleep(18)
sato = len(listaImensa)
self.selectImage('core-image-minimal')
time.sleep(20)
try:
hob.child('Edit image recipe').click()
except:
self.writeInFile("Recipe list re-load for base image change: can not find recipe reload button")
return 10
x = hob.child('Included recipes')
minim = x.findChildren(predicate.GenericPredicate(roleName="table cell"))
try:
hob.child('Cancel').click()
except:
self.writeInFile("Recipe list re-load for base image change: can not find cancel button")
return 10
time.sleep(5)
minimal = len(minim)
if(sato == minimal):
self.writeInFile("Recipe list re-load for base image change: failed")
else:
self.writeInFile("Recipe list re-load for base image change: passed")
scriptname=os.path.basename(__file__)
print "Ending "+scriptname
return 10
|