]> code.ossystems Code Review - openembedded-core.git/commitdiff
ptest: fix file ownerships in ${PTEST_PATH}
authorRoss Burton <ross.burton@intel.com>
Tue, 8 Sep 2015 23:15:32 +0000 (00:15 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 12 Sep 2015 21:47:10 +0000 (22:47 +0100)
As most upstreams don't have installable test suites it's fairly common to copy
files directly out of a source tree for ptests, but this results in files in the
recipe being owned by the user running bitbake:

  WARNING: QA Issue: .../sed/4.2.2-r0/packages-split/sed-ptest/usr/lib64/
  sed/ptest/testsuite/bug-regex21 is owned by uid 1000, which is the same
  as the user running bitbake. This may be due to host contamination
  [host-user-contaminated]

Instead of needing to fix this in every recipe that has this problem simply
chown the files to root:root in do_install_ptest_base.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/ptest.bbclass

index f30f26afabb64f4a8c75c06967dcd2a16102a654..66e364af5314d8725be3ba9fe7676d02ee017837 100644 (file)
@@ -43,6 +43,7 @@ fakeroot do_install_ptest_base() {
             oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
         fi
         do_install_ptest
+        chown -R root:root ${D}${PTEST_PATH}
     fi
 }