All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] oeqa/selftest/recipetool: Fix appendfile_binary test on opensuse131
@ 2015-06-25 15:47 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2015-06-25 15:47 UTC (permalink / raw)
  To: openembedded-core

On OpenSUSE 13.1, /bin/ls is a symlink to /usr/bin/ls. This means the
test doesn't use a binary file an fails on that system.

Ensure we resolve any symlink using readlink to avoid this failure.

======================================================================
FAIL: test_recipetool_appendfile_binary (oeqa.selftest.recipetool.RecipetoolTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/recipetool.py", line 115, in test_recipetool_appendfile_binary
    self.assertIn('WARNING: ', result.output)
AssertionError: 'WARNING: ' not found in 'Parsing recipes..done.\nNOTE: Writing append file /tmp/recipetoolqai0NY8l/recipes-core/coreutils/coreutils_8.23.bbappend\nNOTE: Copying /bin/ls to /tmp/recipetoolqai0NY8l/recipes-core/coreutils/coreutils/ls'

[YOCTO #7920]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/lib/oeqa/selftest/recipetool.py b/meta/lib/oeqa/selftest/recipetool.py
index f3ad493..c08b2e4 100644
--- a/meta/lib/oeqa/selftest/recipetool.py
+++ b/meta/lib/oeqa/selftest/recipetool.py
@@ -111,7 +111,9 @@ class RecipetoolTests(DevtoolBase):
 
     def test_recipetool_appendfile_binary(self):
         # Try appending a binary file
-        result = runCmd('recipetool appendfile %s /bin/ls /bin/ls -r coreutils' % templayerdir)
+        # /bin/ls can be a symlink to /usr/bin/ls
+        ls = os.readlink("/bin/ls")
+        result = runCmd('recipetool appendfile %s /bin/ls %s -r coreutils' % (templayerdir, ls))
         self.assertIn('WARNING: ', result.output)
         self.assertIn('is a binary', result.output)
 




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-25 15:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25 15:47 [PATCH] oeqa/selftest/recipetool: Fix appendfile_binary test on opensuse131 Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.