mirror of
git://git.yoctoproject.org/yocto-autobuilder-helper.git
synced 2025-07-19 20:59:02 +02:00
Add bitbake-extra-tests to cover taskexp ncurses UI.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
932ae33773
commit
094714e502
|
@ -276,6 +276,10 @@
|
|||
"step4" : {
|
||||
"shortname" : "OEQA core tests",
|
||||
"EXTRACMDS" : ["oe-test core"]
|
||||
},
|
||||
"step5" : {
|
||||
"shortname" : "Bitbake extra tests",
|
||||
"EXTRACMDS" : ["DISPLAY=:1 xterm -geometry 90x30 -e ${SCRIPTSDIR}/bitbake-extra-tests; exit $(cat bbextratests-exitcode)"]
|
||||
}
|
||||
},
|
||||
"reproducible" : {
|
||||
|
|
20
scripts/bitbake-extra-tests
Executable file
20
scripts/bitbake-extra-tests
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
. ./oe-init-build-env
|
||||
TERM=xterm-256color
|
||||
TASK_EXP_UNIT_TEST=1 bitbake -g -u taskexp_ncurses zlib acl
|
||||
if [ $? -ne 0 ]; then
|
||||
echo 1 > bbextratests-exitcode
|
||||
exit 1
|
||||
fi
|
||||
TASK_EXP_UNIT_TEST=1 bitbake -g -u taskexp_ncurses zlib acl foo
|
||||
if [ $? -ne 1 ]; then
|
||||
echo 1 > bbextratests-exitcode
|
||||
exit 1
|
||||
fi
|
||||
TASK_EXP_UNIT_TEST_NOTERM=1 bitbake -g -u taskexp_ncurses quilt
|
||||
if [ $? -ne 0 ]; then
|
||||
echo 1 > bbextratests-exitcode
|
||||
exit 1
|
||||
fi
|
||||
echo $? > bbextratests-exitcode
|
||||
exit 0
|
|
@ -125,7 +125,7 @@ if args.json_outputfile:
|
|||
def addentry(name, description, phase):
|
||||
jsonconfig.append({"name" : name, "bbname" : description[:46], "phase" : phase, "description" : description})
|
||||
|
||||
def addstepentry(name, taskdesc, shortname, description, detail, phase):
|
||||
def addstepentry(name, taskdesc, shortname, description, detail, phase, usepty=False):
|
||||
bbname = taskdesc
|
||||
if shortname:
|
||||
bbname = shortname + ": " + taskdesc
|
||||
|
@ -134,7 +134,7 @@ def addstepentry(name, taskdesc, shortname, description, detail, phase):
|
|||
bbdesc = description
|
||||
if detail:
|
||||
bbdesc = bbdesc + ": " + detail
|
||||
jsonconfig.append({"name" : name, "bbname" : bbname[:46], "phase" : phase, "description" : bbdesc})
|
||||
jsonconfig.append({"name" : name, "bbname" : bbname[:46], "phase" : phase, "description" : bbdesc, "usepty" : usepty})
|
||||
|
||||
if jcfg:
|
||||
buildtools = utils.setup_buildtools_tarball(ourconfig, args.workername, None, checkonly=True)
|
||||
|
@ -287,7 +287,10 @@ def handle_stepnum(stepnum):
|
|||
cmds = utils.getconfiglist("EXTRACMDS", ourconfig, args.target, stepnum)
|
||||
if jcfg:
|
||||
if cmds:
|
||||
addstepentry("cmds", "Run cmds", shortdesc, desc, str(cmds), str(stepnum))
|
||||
usepty = False
|
||||
if utils.getconfigvar("USEPTY", ourconfig, args.target, stepnum):
|
||||
usepty = True
|
||||
addstepentry("cmds", "Run cmds", shortdesc, desc, str(cmds), str(stepnum), usepty=usepty)
|
||||
elif args.stepname == "cmds":
|
||||
for cmd in cmds:
|
||||
hp.printheader("Step %s/%s: Running command %s" % (stepnum, maxsteps, cmd))
|
||||
|
|
Loading…
Reference in New Issue
Block a user