]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/recipetool: Fix symlink resolution
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 27 Jun 2015 07:10:29 +0000 (08:10 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 27 Jun 2015 21:42:00 +0000 (22:42 +0100)
Instead of readlink we need to use realpath to resolve any possible
symlink in the file name. I'd got the two confused in the previous
patch. This should really fix selftest failures on the autobuilder.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/recipetool.py

index c08b2e467403212d11e7fdb6c61a501de9960ea8..b3ca1716980cd50b4cd881ea18ca41d12af93aa3 100644 (file)
@@ -112,7 +112,7 @@ class RecipetoolTests(DevtoolBase):
     def test_recipetool_appendfile_binary(self):
         # Try appending a binary file
         # /bin/ls can be a symlink to /usr/bin/ls
-        ls = os.readlink("/bin/ls")
+        ls = os.path.realpath("/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)