<div dir="ltr"><div class="gmail_quote"><div class="gmail_attr">imagefeatures.py does set:</div><div class="gmail_attr"><br></div><div class="gmail_attr">PREFERRED_PROVIDER_virtual/base-utils = &quot;packagegroup-core-base-utils&quot;<br>VIRTUAL-RUNTIME_base-utils = &quot;packagegroup-core-base-utils&quot;</div><div class="gmail_attr"><br></div><div class="gmail_attr">which I believe does actually replace replace busybox with that packagegroup in any image, as packagegroup-core-boot RDEPENDS on VIRTUAL-RUNTIME_base-utils.</div><div class="gmail_attr"><br></div><div class="gmail_attr">I&#39;m not sure why imagefeatures.py only does &#39;bitbake(&quot;--graphviz core-image-sato&quot;)&#39; instead of building and booting that image properly, but this is exactly the place where it should happen.</div><div class="gmail_attr"><br></div><div class="gmail_attr">Alex<br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">On Tue, 4 Feb 2020 at 10:25, Kang Kai &lt;<a href="mailto:Kai.Kang@windriver.com">Kai.Kang@windriver.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In imagefeatures.py, it just run &#39;bitbake -g core-image-sato&#39; and <br>
doesn&#39;t really build and test RDEPENDS packages of <br>
packagegroup-core-base-utils.<br>
<br>
So for the packages in the RDEPENDS packages of <br>
packagegroup-core-base-utils but not in any image, they all are not be <br>
tested.<br>
<br>
I didn&#39;t find a proper recipe to place these recipes. Maybe a new image <br>
recipe need to be created.<br>
<br>
Regards,<br>
Kai<br>
<br>
<br>
<br>
&gt;<br>
&gt; Alex<br>
&gt;<br>
&gt;&gt; On 3 Feb 2020, at 10.14, &lt;<a href="mailto:kai.kang@windriver.com" target="_blank">kai.kang@windriver.com</a>&gt; &lt;<a href="mailto:kai.kang@windriver.com" target="_blank">kai.kang@windriver.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; From: Kai Kang &lt;<a href="mailto:kai.kang@windriver.com" target="_blank">kai.kang@windriver.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; Add ptest for ifupdown with its own test cases.<br>
&gt;&gt;<br>
&gt;&gt; [Yocto #13736]<br>
&gt;&gt;<br>
&gt;&gt; Signed-off-by: Kai Kang &lt;<a href="mailto:kai.kang@windriver.com" target="_blank">kai.kang@windriver.com</a>&gt;<br>
&gt;&gt; ---<br>
&gt;&gt; meta/recipes-core/ifupdown/files/run-ptest    |  4 ++<br>
&gt;&gt; .../ifupdown/files/tweak-ptest-script.patch   | 49 +++++++++++++++++++<br>
&gt;&gt; meta/recipes-core/ifupdown/<a href="http://ifupdown_0.8.35.bb" rel="noreferrer" target="_blank">ifupdown_0.8.35.bb</a> | 10 +++-<br>
&gt;&gt; 3 files changed, 62 insertions(+), 1 deletion(-)<br>
&gt;&gt; create mode 100644 meta/recipes-core/ifupdown/files/run-ptest<br>
&gt;&gt; create mode 100644 meta/recipes-core/ifupdown/files/tweak-ptest-script.patch<br>
&gt;&gt;<br>
&gt;&gt; diff --git a/meta/recipes-core/ifupdown/files/run-ptest b/meta/recipes-core/ifupdown/files/run-ptest<br>
&gt;&gt; new file mode 100644<br>
&gt;&gt; index 0000000000..8694042392<br>
&gt;&gt; --- /dev/null<br>
&gt;&gt; +++ b/meta/recipes-core/ifupdown/files/run-ptest<br>
&gt;&gt; @@ -0,0 +1,4 @@<br>
&gt;&gt; +#!/bin/sh<br>
&gt;&gt; +<br>
&gt;&gt; +CURDIR=$(dirname `readlink -f $0`)<br>
&gt;&gt; +cd $CURDIR/tests &amp;&amp; ./testbuild-linux<br>
&gt;&gt; diff --git a/meta/recipes-core/ifupdown/files/tweak-ptest-script.patch b/meta/recipes-core/ifupdown/files/tweak-ptest-script.patch<br>
&gt;&gt; new file mode 100644<br>
&gt;&gt; index 0000000000..d7600cf243<br>
&gt;&gt; --- /dev/null<br>
&gt;&gt; +++ b/meta/recipes-core/ifupdown/files/tweak-ptest-script.patch<br>
&gt;&gt; @@ -0,0 +1,49 @@<br>
&gt;&gt; +Tweak tests of ifupdown to make it work with oe-core ptest framework.<br>
&gt;&gt; +<br>
&gt;&gt; +Upstream-Status: Inappropriate [oe-core specific]<br>
&gt;&gt; +<br>
&gt;&gt; +Signed-off-by: Kai Kang &lt;<a href="mailto:kai.kang@windriver.com" target="_blank">kai.kang@windriver.com</a>&gt;<br>
&gt;&gt; +<br>
&gt;&gt; +diff --git a/tests/testbuild-linux b/tests/testbuild-linux<br>
&gt;&gt; +index 1181ea0..d5c1814 100755<br>
&gt;&gt; +--- a/tests/testbuild-linux<br>
&gt;&gt; ++++ b/tests/testbuild-linux<br>
&gt;&gt; +@@ -1,6 +1,7 @@<br>
&gt;&gt; + #!/bin/sh -e<br>
&gt;&gt; +<br>
&gt;&gt; +-dir=tests/linux<br>
&gt;&gt; ++curdir=$(dirname `readlink -f $0`)<br>
&gt;&gt; ++dir=$curdir/linux<br>
&gt;&gt; +<br>
&gt;&gt; + result=true<br>
&gt;&gt; + for test in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; do<br>
&gt;&gt; +@@ -12,7 +13,7 @@ for test in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; do<br>
&gt;&gt; +         echo &quot;Testcase $test: $args&quot;<br>
&gt;&gt; +<br>
&gt;&gt; +    exitcode=0<br>
&gt;&gt; +-        ./ifup -v --no-act-commands --force -i $dir/testcase.$test --state-dir=$dir/state.$test $args \<br>
&gt;&gt; ++        ifup -v --no-act-commands --force -i $dir/testcase.$test --state-dir=$dir/state.$test $args \<br>
&gt;&gt; +                 &gt;$dir/up-res-out.$test 2&gt;$dir/up-res-err.$test || exitcode=$?<br>
&gt;&gt; +<br>
&gt;&gt; +         (echo &quot;exit code: $exitcode&quot;;<br>
&gt;&gt; +@@ -20,7 +21,7 @@ for test in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; do<br>
&gt;&gt; +          echo &quot;====stderr====&quot;; cat $dir/up-res-err.$test) &gt; $dir/up-res.$test<br>
&gt;&gt; +<br>
&gt;&gt; +    exitcode=0<br>
&gt;&gt; +-        ./ifdown -v --no-act-commands --force -i $dir/testcase.$test --state-dir=$dir/state.$test $args \<br>
&gt;&gt; ++        ifdown -v --no-act-commands --force -i $dir/testcase.$test --state-dir=$dir/state.$test $args \<br>
&gt;&gt; +                &gt;$dir/down-res-out.$test 2&gt;$dir/down-res-err.$test || exitcode=$?<br>
&gt;&gt; +<br>
&gt;&gt; +         (echo &quot;exit code: $exitcode&quot;;<br>
&gt;&gt; +@@ -28,9 +29,9 @@ for test in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; do<br>
&gt;&gt; +          echo &quot;====stderr====&quot;; cat $dir/down-res-err.$test) &gt; $dir/down-res.$test<br>
&gt;&gt; +<br>
&gt;&gt; +         if diff -ub $dir/up.$test $dir/up-res.$test &amp;&amp; diff -ub $dir/down.$test $dir/down-res.$test; then<br>
&gt;&gt; +-                echo &quot;(okay)&quot;<br>
&gt;&gt; ++                echo &quot;PASS: $test&quot;<br>
&gt;&gt; +         else<br>
&gt;&gt; +-                echo &quot;(failed)&quot;<br>
&gt;&gt; ++                echo &quot;FAIL: $test&quot;<br>
&gt;&gt; +                 result=false<br>
&gt;&gt; +         fi<br>
&gt;&gt; +         echo &quot;==========&quot;<br>
&gt;&gt; diff --git a/meta/recipes-core/ifupdown/<a href="http://ifupdown_0.8.35.bb" rel="noreferrer" target="_blank">ifupdown_0.8.35.bb</a> b/meta/recipes-core/ifupdown/<a href="http://ifupdown_0.8.35.bb" rel="noreferrer" target="_blank">ifupdown_0.8.35.bb</a><br>
&gt;&gt; index 0de97fe372..53cb971d33 100644<br>
&gt;&gt; --- a/meta/recipes-core/ifupdown/<a href="http://ifupdown_0.8.35.bb" rel="noreferrer" target="_blank">ifupdown_0.8.35.bb</a><br>
&gt;&gt; +++ b/meta/recipes-core/ifupdown/<a href="http://ifupdown_0.8.35.bb" rel="noreferrer" target="_blank">ifupdown_0.8.35.bb</a><br>
&gt;&gt; @@ -11,13 +11,15 @@ SRC_URI = &quot;git://<a href="http://salsa.debian.org/debian/ifupdown.git;protocol=https" rel="noreferrer" target="_blank">salsa.debian.org/debian/ifupdown.git;protocol=https</a> \<br>
&gt;&gt;             file://99_network \<br>
&gt;&gt;             file://0001-Define-FNM_EXTMATCH-for-musl.patch \<br>
&gt;&gt;             file://0001-Makefile-do-not-use-dpkg-for-determining-OS-type.patch \<br>
&gt;&gt; +           file://run-ptest \<br>
&gt;&gt; +           ${@bb.utils.contains(&#39;DISTRO_FEATURES&#39;, &#39;ptest&#39;, &#39;file://tweak-ptest-script.patch&#39;, &#39;&#39;, d)} \<br>
&gt;&gt;             &quot;<br>
&gt;&gt; SRCREV = &quot;4af76318cfc57f8e4a44d357104188666213bd4b&quot;<br>
&gt;&gt;<br>
&gt;&gt; S = &quot;${WORKDIR}/git&quot;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; -inherit update-alternatives<br>
&gt;&gt; +inherit ptest update-alternatives<br>
&gt;&gt;<br>
&gt;&gt; do_compile () {<br>
&gt;&gt;     chmod a+rx *.pl *.sh<br>
&gt;&gt; @@ -40,6 +42,12 @@ do_install () {<br>
&gt;&gt;     cd ${D}${mandir}/man8 &amp;&amp; ln -s ifup.8 ifdown.8<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; +do_install_ptest () {<br>
&gt;&gt; +    install -d ${D}${PTEST_PATH}/tests<br>
&gt;&gt; +    cp -r ${S}/tests/testbuild-linux ${D}${PTEST_PATH}/tests/<br>
&gt;&gt; +    cp -r ${S}/tests/linux ${D}${PTEST_PATH}/tests/<br>
&gt;&gt; +}<br>
&gt;&gt; +<br>
&gt;&gt; ALTERNATIVE_PRIORITY = &quot;100&quot;<br>
&gt;&gt; ALTERNATIVE_${PN} = &quot;ifup ifdown&quot;<br>
&gt;&gt;<br>
&gt;&gt; -- <br>
&gt;&gt; 2.17.1<br>
&gt;&gt;<br>
&gt;&gt; -- <br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Openembedded-core mailing list<br>
&gt;&gt; <a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
&gt;&gt; <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
<br>
<br>
-- <br>
Kai Kang<br>
<br>
</blockquote></div></div>