Fixes for eSDK and testsdkext
v2 cover Fixes for eSDK and testsdkext
* V2
1) Fix Paul's comments:
- Drop "don't reset when the test is failed"
- Update bug id for "oe-publish-sdk: add pyshtables.py to .gitignore"
- Split "install multilib targets as populate_sdk does" into 2 commits:
"break the long lines"
"install multilib SDKs"
2) Use shorter subject lines
* V1
Initial version
// Robert
The following changes since commit 4e412234c37efec42b3962c11d44903c0c58c92e:
libpcap: Disable exposed bits of WinPCAP remote capture support (2016-12-13 22:47:35 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/eSDK
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/eSDK
Robert Yang (8):
populate_sdk_ext.bbclass: break the long lines populate_sdk_ext.bbclass: install multilib SDKs oeqa/sdkext/devtool.py: remove sources before run test cases
oe-publish-sdk: make cmd easier to read
oe-publish-sdk: add pyshtables.py to .gitignore oeqa/oetest.py: add hasLockedSig() oeqa/sdkext/devtool.py: skip a testcase when no libxml2 oe/copy_buildsystem.py: add SDK_LAYERS_EXCLUDE_PATTERN
meta/classes/populate_sdk_ext.bbclass | 63 ++++++++++++++++++++++++----------- meta/lib/oe/copy_buildsystem.py | 18 ++++++++++ meta/lib/oeqa/oetest.py | 13 ++++++++ meta/lib/oeqa/sdkext/devtool.py | 8 ++++- scripts/oe-publish-sdk | 19 +++++++++-- 5 files changed, 98 insertions(+), 23 deletions(-)
Signature · 1 line
2.10.2
PATCH v2 1/8 populate_sdk_ext.bbclass: break the long lines
Make it easier to read and maintain.
[YOCTO #10647]
--- meta/classes/populate_sdk_ext.bbclass | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-)
meta/classes/populate_sdk_ext.bbclass +20 -4
@@ -567,7 +567,13 @@ sdk_ext_postinst() { printf "\nExtracting buildtools...\n" cd $target_sdk_dir env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}" - printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} > buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ; cat buildtools.log ; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; } + ./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log + if [ $? -ne 0 ]; then + printf 'ERROR: buildtools installation failed:\n' + cat buildtools.log + echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script + exit 1 + fi # Delete the buildtools tar file since it won't be used again rm -f ./${SDK_BUILDTOOLS_INSTALLER}
@@ -588,7 +594,9 @@ sdk_ext_postinst() { echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script # Warn if trying to use external bitbake and the ext SDK together - echo "(which bitbake > /dev/null 2>&1 && echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || true" >> $env_setup_script + echo "(which bitbake > /dev/null 2>&1 && \ + echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || \ + true" >> $env_setup_script if [ "$prepare_buildsystem" != "no" ]; then printf "Preparing build system...\n"
@@ -596,8 +604,16 @@ sdk_ext_postinst() { # current working directory when first ran, nor will it set $1 when # sourcing a script. That is why this has to look so ugly. LOGFILE="$target_sdk_dir/preparing_build_system.log" - sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; } - rm $target_sdk_dir/ext-sdk-prepare.py + sh -c ". buildtools/environment-setup* > $LOGFILE && \ + cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && \ + set $target_sdk_dir && \ + . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && \ + python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" + if [ $? -ne ]; then + echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script + exit 1 + rm $target_sdk_dir/ext-sdk-prepare.py + fi fi echo done }
Signature · 1 line
2.10.2
Re: [PATCH V2 1/8] populate_sdk_ext.bbclass: break the long lines
I'm not a big fan of those run-on lines either, so thanks. Some superficial comments:
Quoted 15 lines · Robert Yang
Make it easier to read and maintain.
[YOCTO #10647]
Signed-off-by Robert Yang <[email protected]>--- meta/classes/populate_sdk_ext.bbclass | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-)meta/classes/populate_sdk_ext.bbclass +0
-0@@ -567,7 +567,13 @@ sdk_ext_postinst() { printf "\nExtracting buildtools...\n"
meta/classes/populate_sdk_ext.bbclass sdk_ext_postinst() { · line 576
Quoted 10 lines
meta/classes/populate_sdk_ext.bbclass +7
-1cd $target_sdk_dir env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}" - printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} > buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ; cat buildtools.log ; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; } + ./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log + if [ $? -ne 0 ]; then + printf 'ERROR: buildtools installation failed:\n' + cat buildtools.log + echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script + exit 1 + fi
Maybe it's a deliberate style choice, but just in case you're not aware of it, the following two snippets work the same:
./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log if [ $? -ne 0 ]; then
...
if ! ./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log; then
...
Quoted 15 lines
meta/classes/populate_sdk_ext.bbclass +3
-1# Delete the buildtools tar file since it won't be used again rm -f ./${SDK_BUILDTOOLS_INSTALLER}@@ -588,7 +594,9 @@ sdk_ext_postinst() { echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script # Warn if trying to use external bitbake and the ext SDK together - echo "(which bitbake > /dev/null 2>&1 && echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || true" >> $env_setup_script + echo "(which bitbake > /dev/null 2>&1 && \ + echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || \ + true" >> $env_setup_script if [ "$prepare_buildsystem" != "no" ]; then printf "Preparing build system...\n"
meta/classes/populate_sdk_ext.bbclass sdk_ext_postinst() { · line 609
Quoted 8 lines
meta/classes/populate_sdk_ext.bbclass +3
-2@@ -596,8 +604,16 @@ sdk_ext_postinst() { # current working directory when first ran, nor will it set $1 when # sourcing a script. That is why this has to look so ugly. LOGFILE="$target_sdk_dir/preparing_build_system.log" - sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; } - rm $target_sdk_dir/ext-sdk-prepare.py + sh -c ". buildtools/environment-setup* > $LOGFILE && \ + cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && \ + set $target_sdk_dir && \
I know it was there before, but I wonder what the point of the 'set' is here. It sets $1 to $target_sdk_dir, but $target_sdk_dir is already passed explicitly to $target_sdk_dir/${oe_init_build_env_path} below.
meta/classes/populate_sdk_ext.bbclass sdk_ext_postinst() { · line 615
Quoted 6 lines
meta/classes/populate_sdk_ext.bbclass +6
-0+ . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && \ + python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" + if [ $? -ne ]; then + echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script + exit 1 + rm $target_sdk_dir/ext-sdk-prepare.py
Unreachable code.
Quoted 7 lines
meta/classes/populate_sdk_ext.bbclass +1
-1+ fi fi echo done } --2.10.2
Quoted 5 lines
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Cheers,
Ulf
Re: [PATCH V2 1/8] populate_sdk_ext.bbclass: break the long lines
Hi Ulf,
Quoted 33 lines · Ulf Magnusson
I'm not a big fan of those run-on lines either, so thanks. Some superficial comments:
Quoted 15 lines · Robert Yang
Make it easier to read and maintain.
[YOCTO #10647]
Signed-off-by Robert Yang <[email protected]>--- meta/classes/populate_sdk_ext.bbclass | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-)meta/classes/populate_sdk_ext.bbclass +0
-0@@ -567,7 +567,13 @@ sdk_ext_postinst() { printf "\nExtracting buildtools...\n"meta/classes/populate_sdk_ext.bbclass sdk_ext_postinst() { · line 576
Quoted 10 lines
meta/classes/populate_sdk_ext.bbclass +7
-1cd $target_sdk_dir env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}" - printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} > buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ; cat buildtools.log ; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; } + ./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log + if [ $? -ne 0 ]; then + printf 'ERROR: buildtools installation failed:\n' + cat buildtools.log + echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script + exit 1 + fiMaybe it's a deliberate style choice, but just in case you're not aware of it, the following two snippets work the same:
Quoted 6 lines
./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log if [ $? -ne 0 ]; then
...if ! ./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log; then
...
I'm not sure which is better. We have both of them in the real world.
Quoted 13 lines
Quoted 13 lines
meta/classes/populate_sdk_ext.bbclass +3
-1# Delete the buildtools tar file since it won't be used again rm -f ./${SDK_BUILDTOOLS_INSTALLER}@@ -588,7 +594,9 @@ sdk_ext_postinst() { echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script # Warn if trying to use external bitbake and the ext SDK together - echo "(which bitbake > /dev/null 2>&1 && echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || true" >> $env_setup_script + echo "(which bitbake > /dev/null 2>&1 && \ + echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || \ + true" >> $env_setup_script
Quoted 15 lines
meta/classes/populate_sdk_ext.bbclass sdk_ext_postinst() { · line 609
Quoted 11 lines
meta/classes/populate_sdk_ext.bbclass +3
-2if [ "$prepare_buildsystem" != "no" ]; then printf "Preparing build system...\n"@@ -596,8 +604,16 @@ sdk_ext_postinst() { # current working directory when first ran, nor will it set $1 when # sourcing a script. That is why this has to look so ugly. LOGFILE="$target_sdk_dir/preparing_build_system.log" - sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; } - rm $target_sdk_dir/ext-sdk-prepare.py + sh -c ". buildtools/environment-setup* > $LOGFILE && \ + cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && \ + set $target_sdk_dir && \I know it was there before, but I wonder what the point of the 'set' is here. It sets $1 to $target_sdk_dir, but $target_sdk_dir is already passed explicitly to $target_sdk_dir/${oe_init_build_env_path} below.
Will remove it in another thread the extra sed is useless here.
Quoted 9 lines
meta/classes/populate_sdk_ext.bbclass sdk_ext_postinst() { · line 615
Quoted 7 lines
meta/classes/populate_sdk_ext.bbclass +6
-0+ . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && \ + python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" + if [ $? -ne ]; then + echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script + exit 1 + rm $target_sdk_dir/ext-sdk-prepare.pyUnreachable code.
Good catch, thanks, updated in the repo.
// Robert
Quoted 17 lines
Quoted 8 lines
meta/classes/populate_sdk_ext.bbclass +1
-1+ fi fi echo done } --2.10.2
Quoted 5 lines
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-coreCheers,
Ulf
PATCH v2 2/8 populate_sdk_ext.bbclass: install multilib SDKs
In reply to Robert YangFixed:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"IMAGE_CLASSES += "testimage"
$ bitbake core-image-minimal -cpopulate_sdk_ext $ bitbake core-image-minimal -ctestsdkext [snip] Testing /buildarea/lyang1/test_po/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/testsdkext//tc/environment-setup-x86-pokymllib32-linux test_cvs (oeqa.sdk.buildcvs.BuildCvsTest) ... FAIL [snip]
It was failed because no lib32 toolchains.
These fixes include:
* Set SDK_TARGETS correctly
* Return multilib depends in get_ext_sdk_depends()
* Write information to all environment-setup-* scripts.
[YOCTO #10647]
--- meta/classes/populate_sdk_ext.bbclass | 49 ++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 21 deletions(-)
meta/classes/populate_sdk_ext.bbclass +28 -21
@@ -39,7 +39,7 @@ SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \ SDK_INHERIT_BLACKLIST ?= "buildhistory icecc" SDK_UPDATE_URL ?= "" -SDK_TARGETS ?= "${PN}" +SDK_TARGETS ?= "${@multilib_pkg_extend(d, d.getVar('BPN', True))}" def get_sdk_install_targets(d, images_only=False): sdk_install_targets = ''
@@ -566,12 +566,14 @@ SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_preinst}" sdk_ext_postinst() { printf "\nExtracting buildtools...\n" cd $target_sdk_dir - env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}" + env_setup_scripts="`ls $target_sdk_dir/environment-setup-*`" ./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log if [ $? -ne 0 ]; then printf 'ERROR: buildtools installation failed:\n' cat buildtools.log - echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script + for e in $env_setup_scripts; do + echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $e + done exit 1 fi
@@ -580,23 +582,25 @@ sdk_ext_postinst() { # We don't need the log either since it succeeded rm -f buildtools.log - # Make sure when the user sets up the environment, they also get - # the buildtools-tarball tools in their path. - echo ". $target_sdk_dir/buildtools/environment-setup*" >> $env_setup_script + for e in $env_setup_scripts; do + # Make sure when the user sets up the environment, they also get + # the buildtools-tarball tools in their path. + echo ". $target_sdk_dir/buildtools/environment-setup*" >> $e + # Allow bitbake environment setup to be ran as part of this sdk. + echo "export OE_SKIP_SDK_CHECK=1" >> $e - # Allow bitbake environment setup to be ran as part of this sdk. - echo "export OE_SKIP_SDK_CHECK=1" >> $env_setup_script + # A bit of another hack, but we need this in the path only for devtool + # so put it at the end of $PATH. + echo "export PATH=$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH" >> $e - # A bit of another hack, but we need this in the path only for devtool - # so put it at the end of $PATH. - echo "export PATH=$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH" >> $env_setup_script + echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $e - echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script + # Warn if trying to use external bitbake and the ext SDK together + echo "(which bitbake > /dev/null 2>&1 && \ + echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || \ + true" >> $e + done - # Warn if trying to use external bitbake and the ext SDK together - echo "(which bitbake > /dev/null 2>&1 && \ - echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || \ - true" >> $env_setup_script if [ "$prepare_buildsystem" != "no" ]; then printf "Preparing build system...\n"
@@ -610,7 +614,9 @@ sdk_ext_postinst() { . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && \ python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'" if [ $? -ne ]; then - echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script + for e in $env_setup_scripts; do + echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $e + done exit 1 rm $target_sdk_dir/ext-sdk-prepare.py fi
@@ -641,10 +647,11 @@ fakeroot python do_populate_sdk_ext() { def get_ext_sdk_depends(d): # Note: the deps varflag is a list not a string, so we need to specify expand=False deps = d.getVarFlag('do_image_complete', 'deps', False) - pn = d.getVar('PN', True) - deplist = ['%s:%s' % (pn, dep) for dep in deps] - for task in ['do_image_complete', 'do_rootfs', 'do_build']: - deplist.extend((d.getVarFlag(task, 'depends', True) or '').split()) + deplist = [] + for pn in multilib_pkg_extend(d, d.getVar('BPN', True)).split(): + deplist += ['%s:%s' % (pn, dep) for dep in deps] + for task in ['do_image_complete', 'do_rootfs', 'do_build']: + deplist.extend((d.getVarFlag(task, 'depends', True) or '').split()) return ' '.join(deplist) python do_sdk_depends() {
Signature · 1 line
2.10.2
PATCH v2 3/8 oeqa/sdkext/devtool.py: remove sources before run test cases
In reply to Robert YangFixed:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
$ bitbake core-image-minimal -cpopulate_sdk_ext [snip] ERROR: Source tree path /path/to/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/testsdkext/tc/workspace/sources/v4l2loopback-driver already exists and is not empty\n' [snip]
This is because the test case will run twice (environment-setup-core2-64-poky-linux and environment-setup-x86-pokymllib32-linux), it would fail in the second run, 'devtool reset' can not remove sources, so remove it before running test cases.
[YOCTO #10647]
--- meta/lib/oeqa/sdkext/devtool.py | 3 +++ 1 file changed, 3 insertions(+)
meta/lib/oeqa/sdkext/devtool.py +3 -0
@@ -15,6 +15,9 @@ class DevtoolTest(oeSDKExtTest): self.myapp_cmake_dst = os.path.join(self.tc.sdktestdir, "myapp_cmake") shutil.copytree(self.myapp_cmake_src, self.myapp_cmake_dst) + # Clean sources dir to make "git clone" can run again + shutil.rmtree(os.path.join(self.tc.sdktestdir, "tc/workspace/sources"), True) + def _test_devtool_build(self, directory): self._run('devtool add myapp %s' % directory) try:
Signature · 1 line
2.10.2
PATCH v2 4/8 oe-publish-sdk: make cmd easier to read
In reply to Robert YangThe command was too long to read and maintain.
--- scripts/oe-publish-sdk | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
scripts/oe-publish-sdk +17 -2
@@ -113,10 +113,25 @@ def publish(args): return ret # Setting up the git repo + cmd_common = "if [ ! -e .git ]; then" + cmd_common += " git init .;" + cmd_common += " mv .git/hooks/post-update.sample .git/hooks/post-update;" + cmd_common += " echo '*.pyc\n*.pyo' > .gitignore;" + cmd_common += "fi;" + cmd_common += "git add -A .;" + cmd_common += "git config user.email '[email protected]' && git config user.name 'OE' && git commit -q -m 'init repo' || true;" if not is_remote: - cmd = 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; echo "*.pyc\n*.pyo" > .gitignore; fi; git add -A .; git config user.email "[email protected]" && git config user.name "OE" && git commit -q -m "init repo" || true; git update-server-info' % (destination, destination) + cmd = "set -e;" + cmd += "mkdir -p %s/layers;" % destination + cmd += "cd %s/layers;" % destination + cmd += cmd_common + cmd += "git update-server-info" else: - cmd = "ssh %s 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; echo '*.pyc\n*.pyo' > .gitignore; fi; git add -A .; git config user.email '[email protected]' && git config user.name 'OE' && git commit -q -m \"init repo\" || true; git update-server-info'" % (host, destdir, destdir) + cmd = "ssh %s 'set -e;" % host + cmd += "mkdir -p %s/layers;" % destdir + cmd += "cd %s/layers;" % destdir + cmd += cmd_common + cmd += "git update-server-info'" ret = subprocess.call(cmd, shell=True) if ret == 0: logger.info('SDK published successfully')
Signature · 1 line
2.10.2
PATCH v2 5/8 oe-publish-sdk: add pyshtables.py to .gitignore
In reply to Robert YangFixed:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
$ bitbake core-image-minimal -cpopulate_sdk_ext [snip] ERROR: Failed to update metadata as there have been changes made to it. Aborting.\nERROR: Changed files:\nb' M poky/bitbake/lib/bb/pysh/pyshtables.py\\n'\n" [snip]
This is because the test case will run twice (environment-setup-core2-64-poky-linux and environment-setup-x86-pokymllib32-linux), it would fail in the second run since pyshtables.py is regenerated in the first run. This file is generated automatically, publish it doesn't make any sense, so add it to .gitignore.
[YOCTO #10796]
--- scripts/oe-publish-sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/oe-publish-sdk +1 -1
@@ -116,7 +116,7 @@ def publish(args): cmd_common = "if [ ! -e .git ]; then" cmd_common += " git init .;" cmd_common += " mv .git/hooks/post-update.sample .git/hooks/post-update;" - cmd_common += " echo '*.pyc\n*.pyo' > .gitignore;" + cmd_common += " echo '*.pyc\n*.pyo\npyshtables.py' > .gitignore;" cmd_common += "fi;" cmd_common += "git add -A .;" cmd_common += "git config user.email '[email protected]' && git config user.name 'OE' && git commit -q -m 'init repo' || true;"
Signature · 1 line
2.10.2
PATCH v2 6/8 oeqa/oetest.py: add hasLockedSig()
In reply to Robert YangIt checks whether there is a "recipe:do_populate_sysroot:" in locked-sigs.inc, which will help to determine whether the testcase will run or not.
--- meta/lib/oeqa/oetest.py | 13 +++++++++++++ 1 file changed, 13 insertions(+)
meta/lib/oeqa/oetest.py +13 -0
@@ -171,6 +171,12 @@ class oeSDKExtTest(oeSDKTest): return subprocess.check_output(". %s > /dev/null;"\ " %s;" % (self.tc.sdkenv, cmd), stderr=subprocess.STDOUT, shell=True, env=env).decode("utf-8") + @classmethod + def hasLockedSig(self, recipe): + if re.search(" " + recipe + ":do_populate_sysroot:", oeTest.tc.locked_sigs): + return True + return False + def getmodule(pos=2): # stack returns a list of tuples containg frame information # First element of the list the is current frame, caller is 1
@@ -708,6 +714,13 @@ class SDKExtTestContext(SDKTestContext): self.sdkextfilesdir = os.path.join(os.path.dirname(os.path.abspath( oeqa.sdkext.__file__)), "files") + self.locked_sig_file = os.path.join(self.sdktestdir, "tc/conf/locked-sigs.inc") + if os.path.exists(self.locked_sig_file): + with open(self.locked_sig_file) as f: + self.locked_sigs = f.read() + else: + bb.fatal("%s not found. Did you build the ext sdk image?\n%s" % e) + def _get_test_namespace(self): if self.cm: return "sdk"
Signature · 1 line
2.10.2
PATCH v2 7/8 oeqa/sdkext/devtool.py: skip a testcase when no libxml2
In reply to Robert YangSkip test_extend_autotools_recipe_creation when no libxml2
The librdfa requires libxml2 to build, otherwise, it would fail:
| configure: error: Package requirements (libxml-2.0 >= 2.6.26) were not met: | | No package 'libxml-2.0' found
--- meta/lib/oeqa/sdkext/devtool.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta/lib/oeqa/sdkext/devtool.py +4 -1
@@ -1,7 +1,7 @@ import shutil import subprocess import urllib.request -from oeqa.oetest import oeSDKExtTest +from oeqa.oetest import oeSDKExtTest, skipModule from oeqa.utils.decorators import * class DevtoolTest(oeSDKExtTest):
@@ -66,6 +66,9 @@ class DevtoolTest(oeSDKExtTest): @testcase(1482) @skipUnlessPassed('test_devtool_location') def test_extend_autotools_recipe_creation(self): + # librdfa requires libxml2 + if not oeSDKExtTest.hasLockedSig("libxml2"): + skipModule("No libxml2 package in the eSDK") req = 'https://github.com/rdfa/librdfa' recipe = "bbexample" self._run('devtool add %s %s' % (recipe, req) )
Signature · 1 line
2.10.2
PATCH v2 8/8 oe/copy_buildsystem.py: add SDK_LAYERS_EXCLUDE_PATTERN
In reply to Robert YangIt is helpful we want to exclude a lot of layers.
It uses python re, and supports multiple patterns (separated by space).
--- meta/lib/oe/copy_buildsystem.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
meta/lib/oe/copy_buildsystem.py +18 -0
@@ -1,5 +1,12 @@ # This class should provide easy access to the different aspects of the # buildsystem such as layers, bitbake location, etc. +# +# SDK_LAYERS_EXCLUDE: Layers which will be excluded from SDK layers. +# SDK_LAYERS_EXCLUDE_PATTERN: The simiar to SDK_LAYERS_EXCLUDE, this supports +# python regular expression, use space as separator, +# e.g.: ".*-downloads closed-.*" +# + import stat import shutil
@@ -23,8 +30,10 @@ class BuildSystem(object): self.context = context self.layerdirs = [os.path.abspath(pth) for pth in d.getVar('BBLAYERS', True).split()] self.layers_exclude = (d.getVar('SDK_LAYERS_EXCLUDE', True) or "").split() + self.layers_exclude_pattern = d.getVar('SDK_LAYERS_EXCLUDE_PATTERN', True) def copy_bitbake_and_layers(self, destdir, workspace_name=None): + import re # Copy in all metadata layers + bitbake (as repositories) layers_copied = [] bb.utils.mkdirhier(destdir)
@@ -36,8 +45,17 @@ class BuildSystem(object): # Exclude layers for layer_exclude in self.layers_exclude: if layer_exclude in layers: + bb.note('Excluded %s from sdk layers since it is in SDK_LAYERS_EXCLUDE' % layer_exclude) layers.remove(layer_exclude) + if self.layers_exclude_pattern: + layers_cp = layers[:] + for pattern in self.layers_exclude_pattern.split(): + for layer in layers_cp: + if re.match(pattern, layer): + bb.note('Excluded %s from sdk layers since matched SDK_LAYERS_EXCLUDE_PATTERN' % layer) + layers.remove(layer) + workspace_newname = workspace_name if workspace_newname: layernames = [os.path.basename(layer) for layer in layers]
Signature · 1 line
2.10.2
This doesn't apply to master since Josh's getVar() changes landed, can you please rebase?
Ross
Quoted 54 lines · Robert Yang
* V2
1) Fix Paul's comments:
- Drop "don't reset when the test is failed"
- Update bug id for "oe-publish-sdk: addpyshtables.pyto .gitignore"
- Split "install multilib targets aspopulate_sdkdoes" into 2
commits:
"break the long lines"
"install multilib SDKs"
2) Use shorter subject lines* V1
Initial version// Robert
The following changes since commit
4e412234c37efec42b3962c11d44903c0c58c92e:libpcap: Disable exposed bits of WinPCAP remote capture support
(2016-12-13 22:47:35 +0000)are available in the git repository at:
git://git.openembedded.org/openembedded-core-contribrbt/eSDK
http://cgit.openembedded.org/cgit.cgi/openembedded-core-
contrib/log/?h=rbt/eSDKRobert Yang (8):
populate_sdk_ext.bbclass: break the long lines populate_sdk_ext.bbclass: install multilib SDKsoeqa/sdkext/devtool.py: remove sources before run test cases
oe-publish-sdk: make cmd easier to read
oe-publish-sdk: addpyshtables.pyto .gitignoreoeqa/oetest.py: addhasLockedSig()oeqa/sdkext/devtool.py: skip a testcase when no libxml2oe/copy_buildsystem.py: addSDK_LAYERS_EXCLUDE_PATTERNmeta/classes/populate_sdk_ext.bbclass | 63 ++++++++++++++++++++++++------ ----- meta/lib/oe/copy_buildsystem.py | 18 ++++++++++ meta/lib/oeqa/oetest.py | 13 ++++++++ meta/lib/oeqa/sdkext/devtool.py | 8 ++++- scripts/oe-publish-sdk | 19 +++++++++-- 5 files changed, 98 insertions(+), 23 deletions(-)--
2.10.2--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 1 line · Ross
This doesn't apply to master since Josh's
getVar()changes landed, can you please rebase?
Would this appropriate for Morty in its current version?
- Armin
Quoted 66 lines
Ross
On 14 December 2016 at 07:24, Robert Yang <[email protected] <mailto:[email protected]>> wrote:
* V2
1) Fix Paul's comments:
- Drop "don't reset when the test is failed"
- Update bug id for "oe-publish-sdk: addpyshtables.pyto
.gitignore"
- Split "install multilib targets aspopulate_sdkdoes" into
2 commits:
"break the long lines"
"install multilib SDKs"
2) Use shorter subject lines* V1
Initial version// Robert
The following changes since commit
4e412234c37efec42b3962c11d44903c0c58c92e:libpcap: Disable exposed bits of WinPCAP remote capture support
(2016-12-13 22:47:35 +0000)are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib
<http://git.openembedded.org/openembedded-core-contrib> rbt/eSDK
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/eSDK
<http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/eSDK>Robert Yang (8):
populate_sdk_ext.bbclass: break the long lines populate_sdk_ext.bbclass: install multilib SDKsoeqa/sdkext/devtool.py: remove sources before run test cases
oe-publish-sdk: make cmd easier to read
oe-publish-sdk: addpyshtables.pyto .gitignoreoeqa/oetest.py: addhasLockedSig()oeqa/sdkext/devtool.py: skip a testcase when no libxml2oe/copy_buildsystem.py: addSDK_LAYERS_EXCLUDE_PATTERNmeta/classes/populate_sdk_ext.bbclass | 63
++++++++++++++++++++++++-----------
meta/lib/oe/copy_buildsystem.py| 18 ++++++++++
meta/lib/oeqa/oetest.py| 13 ++++++++
meta/lib/oeqa/sdkext/devtool.py| 8 ++++-
scripts/oe-publish-sdk| 19 +++++++++--
5 files changed, 98 insertions(+), 23 deletions(-)--
2.10.2--
_______________________________________________
Openembedded-core mailing list [email protected] <mailto:[email protected]>
http://lists.openembedded.org/mailman/listinfo/openembedded-core
<http://lists.openembedded.org/mailman/listinfo/openembedded-core>
Quoted 7 lines · On 12/21/2016 09:41 AM, akuster808 wrote:
Quoted 2 lines · Ross
This doesn't apply to master since Josh's
getVar()changes landed, can you please rebase?Would this appropriate for Morty in its current version?
Hi Armin,
These patches should be considered as enhancement (support multilib + eSDK), I'm leaning to not backport to morty.
// Robert
Quoted 67 lines
- Armin
Quoted 65 lines
Ross
On 14 December 2016 at 07:24, Robert Yang <[email protected] <mailto:[email protected]>> wrote:
* V2
1) Fix Paul's comments:
- Drop "don't reset when the test is failed"
- Update bug id for "oe-publish-sdk: addpyshtables.pyto .gitignore"
- Split "install multilib targets aspopulate_sdkdoes" into 2 commits:
"break the long lines"
"install multilib SDKs"
2) Use shorter subject lines* V1
Initial version// Robert
The following changes since commit
4e412234c37efec42b3962c11d44903c0c58c92e:libpcap: Disable exposed bits of WinPCAP remote capture support
(2016-12-13 22:47:35 +0000)are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib
<http://git.openembedded.org/openembedded-core-contrib> rbt/eSDKhttp://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/eSDK
<http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/eSDK>Robert Yang (8):
populate_sdk_ext.bbclass: break the long lines populate_sdk_ext.bbclass: install multilib SDKsoeqa/sdkext/devtool.py: remove sources before run test cases
oe-publish-sdk: make cmd easier to read
oe-publish-sdk: addpyshtables.pyto .gitignoreoeqa/oetest.py: addhasLockedSig()oeqa/sdkext/devtool.py: skip a testcase when no libxml2oe/copy_buildsystem.py: addSDK_LAYERS_EXCLUDE_PATTERNmeta/classes/populate_sdk_ext.bbclass | 63
++++++++++++++++++++++++-----------
meta/lib/oe/copy_buildsystem.py| 18 ++++++++++
meta/lib/oeqa/oetest.py| 13 ++++++++
meta/lib/oeqa/sdkext/devtool.py| 8 ++++-
scripts/oe-publish-sdk| 19 +++++++++--
5 files changed, 98 insertions(+), 23 deletions(-)--
2.10.2--
_______________________________________________
Openembedded-core mailing list [email protected] <mailto:[email protected]>
http://lists.openembedded.org/mailman/listinfo/openembedded-core
<http://lists.openembedded.org/mailman/listinfo/openembedded-core>
Hi Ross,
I rebased and tested again it in the repo:
git://git.openembedded.org/openembedded-core-contrib rbt/eSDK
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/eSDK
Robert Yang (8):
populate_sdk_ext.bbclass: break the long lines populate_sdk_ext.bbclass: install multilib SDKs oeqa/sdkext/devtool.py: remove sources before run test cases
oe-publish-sdk: make cmd easier to read
oe-publish-sdk: add pyshtables.py to .gitignore oeqa/oetest.py: add hasLockedSig() oeqa/sdkext/devtool.py: skip a testcase when no libxml2 oe/copy_buildsystem.py: add SDK_LAYERS_EXCLUDE_PATTERN
// Robert
Quoted 64 lines · Ross
This doesn't apply to master since Josh's
getVar()changes landed, can you please rebase?Ross
On 14 December 2016 at 07:24, Robert Yang <[email protected] <mailto:[email protected]>> wrote:
* V2
1) Fix Paul's comments:
- Drop "don't reset when the test is failed"
- Update bug id for "oe-publish-sdk: addpyshtables.pyto .gitignore"
- Split "install multilib targets aspopulate_sdkdoes" into 2 commits:
"break the long lines"
"install multilib SDKs"
2) Use shorter subject lines* V1
Initial version// Robert
The following changes since commit
4e412234c37efec42b3962c11d44903c0c58c92e:libpcap: Disable exposed bits of WinPCAP remote capture support
(2016-12-13 22:47:35 +0000)are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib
<http://git.openembedded.org/openembedded-core-contrib> rbt/eSDKhttp://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/eSDK
<http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/eSDK>Robert Yang (8):
populate_sdk_ext.bbclass: break the long lines populate_sdk_ext.bbclass: install multilib SDKsoeqa/sdkext/devtool.py: remove sources before run test cases
oe-publish-sdk: make cmd easier to read
oe-publish-sdk: addpyshtables.pyto .gitignoreoeqa/oetest.py: addhasLockedSig()oeqa/sdkext/devtool.py: skip a testcase when no libxml2oe/copy_buildsystem.py: addSDK_LAYERS_EXCLUDE_PATTERNmeta/classes/populate_sdk_ext.bbclass | 63 ++++++++++++++++++++++++-----------
meta/lib/oe/copy_buildsystem.py| 18 ++++++++++
meta/lib/oeqa/oetest.py| 13 ++++++++
meta/lib/oeqa/sdkext/devtool.py| 8 ++++-
scripts/oe-publish-sdk| 19 +++++++++--
5 files changed, 98 insertions(+), 23 deletions(-)--
2.10.2--
_______________________________________________
Openembedded-core mailing list [email protected] <mailto:[email protected]>
http://lists.openembedded.org/mailman/listinfo/openembedded-core
<http://lists.openembedded.org/mailman/listinfo/openembedded-core>