aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Bushmelev <jay4mail@gmail.com>2011-03-16 03:55:43 +0300
committerYuri Bushmelev <jay4mail@gmail.com>2011-03-16 03:55:43 +0300
commitce869976ecc8e87cf8f12ce96649a24512a891a1 (patch)
treef7efbbbca75220bd508cb5f81d90738ef78c41a6
parentb12825f7621692c65868cc9955a8f494bb95fb93 (diff)
downloadopenembedded-ce869976ecc8e87cf8f12ce96649a24512a891a1.tar.gz
contrib/testing/testbuilder: Update to 0.6
-rw-r--r--contrib/testing/testbuilder/README6
-rwxr-xr-xcontrib/testing/testbuilder/setup-testbuilder7
-rwxr-xr-xcontrib/testing/testbuilder/testbuilder53
-rw-r--r--contrib/testing/testbuilder/testbuilder.conf.sample14
-rw-r--r--contrib/testing/testbuilder/testbuilder.d/master.conf.sample27
-rw-r--r--contrib/testing/testbuilder/testbuilder.d/testing.conf.sample14
6 files changed, 80 insertions, 41 deletions
diff --git a/contrib/testing/testbuilder/README b/contrib/testing/testbuilder/README
index af4aa313dc..3c39bb6c5e 100644
--- a/contrib/testing/testbuilder/README
+++ b/contrib/testing/testbuilder/README
@@ -28,14 +28,14 @@ You can run a single configured build (e.g. "testing").
./testbuilder -B ./testbuilder.d/testing.conf
Or you can use TestBuilder to build a specific distro/machine/image just like
-bitbake (e.g. angstrom-2008.1/qemuarm/console-image).
+bitbake (e.g. minimal/qemuarm/console-image).
- ./testbuilder -D angstrom-2008.1 -M qemuarm console-image
+ ./testbuilder -D minimal -M qemuarm console-image
If you wish to only setup an environment and run BitBake by hand you can
use the option `-S`.
- ./testbuilder -D angstrom-2008.1 -M qemuarm -S
+ ./testbuilder -D minimal -M qemuarm -S
Look ./testbuilder -h for full list of possible options.
diff --git a/contrib/testing/testbuilder/setup-testbuilder b/contrib/testing/testbuilder/setup-testbuilder
index a403c9b385..8934b8c008 100755
--- a/contrib/testing/testbuilder/setup-testbuilder
+++ b/contrib/testing/testbuilder/setup-testbuilder
@@ -75,15 +75,12 @@ BBFILES ?= "${OE_DIR}/recipes/*/*.bb"
# GLIBC_GENERATE_LOCALES = "en_US.UTF-8 en_GB.UTF-8 de_DE.UTF-8"
# IMAGE_LINGUAS="en-us en-gb"
-# jffs2, tar(.gz|bz2), cpio(.gz), cramfs, ext2(.gz), ext3(.gz)
-# squashfs, squashfs-lzma
-IMAGE_FSTYPES ?= "tar.gz"
-
# CCACHE = "${@bb.which(bb.data.getVar('PATH', d, 1), 'ccache') and 'ccache '}"
PARALLEL_MAKE = "-j ${MAKE_NUMBER_THREADS}"
BB_NUMBER_THREADS ?= "${@bb.fatal('Set BB_NUMBER_THREADS in your config')}"
-INHERIT += "rm_work"
+INHERIT += "${@['', 'rm_work'][bb.data.getVar('RM_WORK', d, 1) == 'yes']}"
+
#INHERIT += "devshell"
#TERMCMD = ${SCREEN_TERMCMD}
diff --git a/contrib/testing/testbuilder/testbuilder b/contrib/testing/testbuilder/testbuilder
index 6b577e8547..5d9e023ed5 100755
--- a/contrib/testing/testbuilder/testbuilder
+++ b/contrib/testing/testbuilder/testbuilder
@@ -12,7 +12,7 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-VERSION="0.5"
+VERSION="0.6"
PACKAGE="TestBuilder"
TB_DIR=`dirname $0`
@@ -59,18 +59,24 @@ TB_LOG="${LOG_DIR}/tb.log"
TB_MWR_FILE="${LOG_DIR}/MW.release.txt"
TB_MWT_FILE="${LOG_DIR}/MW.testing.txt"
+MW_USER=${MW_USER:-${TB_BUILDER}}
+
#export LD_LIBRARY_PATH LANG PATH
export LD_LIBRARY_PATH LANG
-BB_ENV_EXTRAWHITE="MACHINE DISTRO TB_BUILDER OE_DIR TMP_DIR DL_DIR MAKE_NUMBER_THREADS BB_NUMBER_THREADS IMAGE_FSTYPES"
-export BB_ENV_EXTRAWHITE BBPATH TB_BUILDER OE_DIR TMP_DIR DL_DIR MAKE_NUMBER_THREADS BB_NUMBER_THREADS
+BB_ENV_EXTRAWHITE="http_proxy HTTP_PROXY MACHINE DISTRO TB_BUILDER OE_DIR TMP_DIR DL_DIR MAKE_NUMBER_THREADS BB_NUMBER_THREADS IMAGE_FSTYPES_local DEPLOY_DIR_IMAGE_local ANGSTROMLIBC RM_WORK"
+export BB_ENV_EXTRAWHITE BBPATH TB_BUILDER OE_DIR TMP_DIR DL_DIR MAKE_NUMBER_THREADS BB_NUMBER_THREADS RM_WORK
BB_CMD=bitbake
+# Try to guess user's distro and machine
+HOST_DISTRO=${HOST_DISTRO:-"$([ -x "`which lsb_release`" ] && lsb_release -ds) /$(readelf -h `which readelf` | awk -F': *' '/^ Machine:/ {print $2;}')"}
+HOST_MACHINE=${HOST_MACHINE:-"$(cat /proc/cpuinfo | awk -F': ' '/^model name/ {model=$2;} /^cpu MHz/ {freq=$2;} /^cpu cores/ {cores=$2;} END {OFS=""; OFMT="%.2g"; print model, ", ", cores, " cores @", freq/1000, "GHz"}') /$(cat /proc/meminfo | awk '/^MemTotal:/{OFMT="%.1gGb"; print $2/1024/1024;}')"}
+
mkdir -p ${LOG_DIR}
-tb_rotate_log "${TB_MWR_FILE}"
-tb_rotate_log "${TB_MWT_FILE}"
+#tb_rotate_log "${TB_MWR_FILE}"
+#tb_rotate_log "${TB_MWT_FILE}"
tb_rotate_log "${TB_LOG}"
### Functions
@@ -184,10 +190,10 @@ tb_add_mw_row() {
[ "${_line}" != "${_line#ERROR}" ] && _bl=$_line
echo "|-" >>"${TB_MWT_FILE}"
- echo "|${MACHINE} ||${DISTRO} ||${_images} ||${HOST_DISTRO} ||${BB_REV} ||${TB_BUILDER} ||${OE_REV} ||${_bs} ||${_bl}" >>"${TB_MWT_FILE}"
+ echo "|${MACHINE} ||${DISTRO} ||${_images} ||${HOST_DISTRO} ||${BB_REV} ||[[User:${MW_USER}|${MW_USER}]] ||${OE_REV} ||${_bs} ||${_bl}" >>"${TB_MWT_FILE}"
echo "|-" >>"${TB_MWR_FILE}"
- echo "|${MACHINE} ||${DISTRO} ||${_images} ||${HOST_DISTRO} ||${BB_REV} ||${TB_BUILDER} ||${_bs} ||${_bl} ||${OE_REV} ||${HOST_MACHINE} ||${_time}" >>"${TB_MWR_FILE}"
+ echo "|${MACHINE} ||${DISTRO} ||${_images} ||${HOST_DISTRO} ||${BB_REV} ||[[User:${MW_USER}|${MW_USER}]] ||${_bs} ||${_bl} ||${OE_REV} ||${HOST_MACHINE} ||${_time}" >>"${TB_MWR_FILE}"
}
tb_build_images() {
@@ -240,7 +246,7 @@ tb_build_machines() {
if [ -n "${DO_RUN_SHELL}" ]; then
tb_interactive_shell
else
- tb_log " ++ ${_machine} build started"
+ tb_log " + ${_machine} build started"
case "${SEPARATE_BUILD}" in
[Yy][Ee][Ss])
@@ -254,7 +260,7 @@ tb_build_machines() {
;;
*)
# Build all images with one bitbake invocation
- _log="${LOG_DIR}/B.${build}.${DISTRO}.${_machine}.${btype}.log"
+ _log="${LOG_DIR}/B.${build}.${DISTRO}.${_machine}.${_btype}.log"
tb_build_images "${_btype}" "${_bbimages}" "${_log}"
;;
esac
@@ -351,19 +357,23 @@ else
fi
# Auto-building mode
+tb_log "${HOST_DISTRO}"
+tb_log "${HOST_MACHINE}"
tb_log "${PACKAGE} v${VERSION}"
-for buildconf in ${BUILDS}; do
- # Cleanup env
- unset DISABLED SETS DISTROS DISTRO TASKS OE_BRANCH BB_BRANCH BUILD IMAGE_FSTYPES
- for bset in $SETS; do
- unset MACHINES_${bset}
- done
+for buildconf in ${BUILDS}; do (
. ${buildconf}
[ "$DISABLED" == "yes" ] && continue
+ # Export local overrides
+ [ -n "$IMAGE_FSTYPES" ] && export IMAGE_FSTYPES_local="$IMAGE_FSTYPES"
+ [ -n "$DEPLOY_DIR_IMAGE" ] && export DEPLOY_DIR_IMAGE_local="$DEPLOY_DIR_IMAGE"
+
+ # Export angstrom libc (only way to build angstrom with different libc flavors)
+ [ -n "$ANGSTROMLIBC" ] && export ANGSTROMLIBC
+
b=$(basename ${buildconf})
build=${b%.conf}
@@ -384,6 +394,9 @@ for buildconf in ${BUILDS}; do
OE_REV=$(tb_git_rev "$OE_DIR")
BB_REV=$(tb_git_rev "$BB_DIR")
+ tb_log "=== OE rev: ${OE_REV}"
+ tb_log "=== BB rev: ${BB_REV}"
+
# parse tasks
unset DO_BUILD_CLEAN DO_BUILD_INCREMENTAL DO_CREATE_MW_TABLE
for task in $TASKS; do
@@ -458,13 +471,13 @@ for buildconf in ${BUILDS}; do
tb_log " + Cleaning ${TMP_DIR}"
#rm -rf ${TMP_DIR}/*
- find ${TMP_DIR}/* -delete
+ find ${TMP_DIR}/* -delete 2>/dev/null
tb_log " + Starting clean builds for machines {$MLIST}"
tb_build_machines c "$MLIST" $bbimages
tb_log " + Cleaning ${TMP_DIR} again"
- find ${TMP_DIR}/* -delete
+ find ${TMP_DIR}/* -delete 2>/dev/null
;;
'skip-once')
# Re-enable skipped clean build
@@ -483,9 +496,9 @@ for buildconf in ${BUILDS}; do
tb_build_machines i "$MLIST" $bbimages
;;
esac
- done
- done
-done
+ done #SETS
+ done #DISTROS
+) done #BUILDS
tb_log "All done."
diff --git a/contrib/testing/testbuilder/testbuilder.conf.sample b/contrib/testing/testbuilder/testbuilder.conf.sample
index 46db036020..17dc08cf6f 100644
--- a/contrib/testing/testbuilder/testbuilder.conf.sample
+++ b/contrib/testing/testbuilder/testbuilder.conf.sample
@@ -35,6 +35,9 @@ MAKE_NUMBER_THREADS=2
# Bitbake cmdline options
#BB_OPTS='-k'
+# Enable rm_work
+RM_WORK=yes
+
# Direct build invocation shell variables (-S option)
# PS1 for shell mode
TB_PS1="[TB] "
@@ -43,13 +46,16 @@ TB_SHELL='/bin/bash --norc'
# Use $SHELL variable or fallback to /bin/sh
#TB_SHELL=${SHELL:-'/bin/sh'}
-# Name for oestats-client and wiki tables
+# Name for oestats-client and wiki tables (empty to disable)
TB_BUILDER=""
+# Name for wiki report table (TB_BUILDER is used if empty)
+MW_USER=""
+# Data for wiki tables (will be autodetected if empty)
# Build host distro
-HOST_DISTRO=""
-# Build host machine (CPU/RAM)
-HOST_MACHINE=""
+# HOST_DISTRO="<distro name + version> /<userspace arch>"
+# Build host machine
+# HOST_MACHINE="<cpu model, cores @freq> /<RAM amount>"
# Misc dirs
TB_BASE=`pwd`
diff --git a/contrib/testing/testbuilder/testbuilder.d/master.conf.sample b/contrib/testing/testbuilder/testbuilder.d/master.conf.sample
index 2e48d4b07e..4391844668 100644
--- a/contrib/testing/testbuilder/testbuilder.d/master.conf.sample
+++ b/contrib/testing/testbuilder/testbuilder.d/master.conf.sample
@@ -1,13 +1,34 @@
-# Other sample build profile
-DISABLED=yes # This build is disabled
+### NOTES
+# 1. All names in SETS variables should consists only of alphanumeric
+# characters and underscores, and beginning with an alphabetic character or an
+# underscore.
+# i.e. [a-zA-Z_][a-zA-Z0-9_]*
+# My recommendation is not to use underscore as well
+# 2. You can prefix any word in following 'list' variables
+# with '!' do disable it.
+# 3. All lists items will be processed in order they appears in list
+
+## DISABLED: Is this build disabled?
+DISABLED=yes
+## BUILD: Just some text comment to show in build log
BUILD="Build from master branch"
+## OE_BRANCH: OE branch to use for this build
OE_BRANCH="master"
+## BB_BRANCH: bitbake branch to use for this build
BB_BRANCH="master"
+## DISTROS: OE distros
# Note that angstrom-2010.x is disabled below ('!' before)
DISTROS="!angstrom-2010.x minimal"
+## IMAGES: OE images
IMAGES="console-image"
+## SETS: build all machines in set within same TMPDIR
SETS="zauruses qemux86"
+## MACHINES: OE machines per build set
MACHINES_zauruses="collie tosa akita"
MACHINES_qemu="qemux86"
-TASKS="build_clean !build_incremental"
+## TASKS: What to do exactly
+# build_clean - do clean builds
+# build_incremental - do incremental builds
+# create_mw_table - create mediawiki table for Testing page
+TASKS="build_clean !build_incremental !create_mw_table"
diff --git a/contrib/testing/testbuilder/testbuilder.d/testing.conf.sample b/contrib/testing/testbuilder/testbuilder.d/testing.conf.sample
index a1a6fd8d2e..6bf78df5df 100644
--- a/contrib/testing/testbuilder/testbuilder.d/testing.conf.sample
+++ b/contrib/testing/testbuilder/testbuilder.d/testing.conf.sample
@@ -8,16 +8,16 @@
# with '!' do disable it.
# 3. All lists items will be processed in order they appears in list
+## DISABLED: Is this build disabled?
+DISABLED=yes
## BUILD: Just some text comment to show in build log
BUILD="Regular build of testing branch"
-## DISABLED: is this build disabled ('yes' to disable)?
-DISABLED=no
## OE_BRANCH: OE branch to use for this build
OE_BRANCH="testing-next"
## BB_BRANCH: bitbake branch to use for this build
BB_BRANCH="1.10"
## DISTROS: OE distros
-DISTROS="angstrom-2008.1 angstrom-2010.x"
+DISTROS="angstrom-2010.x minimal"
## IMAGES: OE images
IMAGES="console-image x11-image opie-image"
## SETS: build all machines in set within same TMPDIR
@@ -29,10 +29,12 @@ MACHINES_mips64="qemumips64"
MACHINES_ppc="qemuppc"
MACHINES_sh4="qemush4"
MACHINES_i686="qemux86"
-# IMAGE_FSTYPE: What image types to build
-IMAGE_FSTYPE="tar.gz"
+# IMAGE_FSTYPES: What image types to build
+IMAGE_FSTYPES="tar.gz"
+# DEPLOY_DIR_IMAGE: Where to place images
+DEPLOY_DIR_IMAGE="${BLD_DIR}/images/testing"
## TASKS: What to do exactly
# build_clean - do clean builds
# build_incremental - do incremental builds
-# create_mw_table - write build results in MediaWiki table format
+# create_mw_table - create mediawiki table for Testing page
TASKS="build_clean build_incremental create_mw_table"