Skip to contentSkip to conversation

scripts/bitbake: fix sanity check not functional issue

GIT PULL In review Dongxiao Xu 2 participants 3 messages Apr 17, 2012

lore
Share & tools
lore
#0 lore raw

Hi Richard,

This pull request is to fix certain sanity check not functional issue (e.x, network check).

Please help to review and pull.

Thanks,
Dongxiao

The following changes since commit c936fca6e163bc19bc08cbd0036b31ca6f6c3ed6:

bitbake.conf: Add PARALLEL_MAKE to BB_HASHBASE_WHITELIST (2012-04-16 23:37:45 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib dxu4/hob-bugfix-yocto
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-bugfix-yocto

Dongxiao Xu (1):
scripts/bitbake: Remove sanity_info after run "bitbake -e"

 scripts/bitbake |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 scripts/bitbake: Remove sanity_info after run "bitbake -e"

With latest master, we found certain sanity check doesn't work (e.x., the network check). This is because it created the sanity_info file at the first time when running "bitbake -e" command in scripts/bitbake, therefore while running the real bitbake command, it finds that the sanity_check file does exist so it skip the network check.

The fix is to remove the sanity_info file after running "bitbake -e" command.

---
 scripts/bitbake |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
scripts/bitbake +1 -0
index 3772d82..a6fb2e5 100755
@@ -73,6 +73,7 @@ if [ $needpseudo = "1" ]; then
         PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
     else
         PSEUDOBINDIR=`bitbake -e | grep STAGING_BINDIR_NATIVE=\" | cut -d '=' -f2 | cut -d '"' -f2`
+        rm -rf conf/sanity_info
     fi
     if [ -e "$PSEUDOBINDIR/pseudo" ]; then
         buildpseudo="0"
Signature · 1 line
1.7.4.1
#2 lore raw

Re: [PATCH 1/1] scripts/bitbake: Remove sanity_info after run "bitbake -e"

Quoted 20 lines · Dongxiao Xu

With latest master, we found certain sanity check doesn't work (e.x., the network check). This is because it created the sanity_info file at the first time when running "bitbake -e" command in scripts/bitbake, therefore while running the real bitbake command, it finds that the sanity_check file does exist so it skip the network check.

The fix is to remove the sanity_info file after running "bitbake -e" command.

---
 scripts/bitbake |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
scripts/bitbake +0 -0
index 3772d82..a6fb2e5 100755

scripts/bitbake if [ $needpseudo = "1" ]; then · line 79

Quoted 7 lines
scripts/bitbake +1 -0
@@ -73,6 +73,7 @@ if [ $needpseudo = "1" ]; then
         PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
     else
         PSEUDOBINDIR=`bitbake -e | grep STAGING_BINDIR_NATIVE=\" | cut -d '=' -f2 | cut -d '"' -f2`
+        rm -rf conf/sanity_info
     fi
     if [ -e "$PSEUDOBINDIR/pseudo" ]; then
         buildpseudo="0"

This forces the sanity tests to run on every bitbake run which is not acceptable. We need to find a better solution.

This also sets off alarm bells in my mind. If the sanity tests are failing, shouldn't they fail equally on a subsquent run of bitbake?

See my follow up patch which should fix this problem in a better way.

Cheers,

Richard