<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 = "packagegroup-core-base-utils"<br>VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils"</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'm not sure why imagefeatures.py only does 'bitbake("--graphviz core-image-sato")' 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 <<a href="mailto:Kai.Kang@windriver.com">Kai.Kang@windriver.com</a>> 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 'bitbake -g core-image-sato' and <br>
doesn'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'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>
><br>
> Alex<br>
><br>
>> On 3 Feb 2020, at 10.14, <<a href="mailto:kai.kang@windriver.com" target="_blank">kai.kang@windriver.com</a>> <<a href="mailto:kai.kang@windriver.com" target="_blank">kai.kang@windriver.com</a>> wrote:<br>
>><br>
>> From: Kai Kang <<a href="mailto:kai.kang@windriver.com" target="_blank">kai.kang@windriver.com</a>><br>
>><br>
>> Add ptest for ifupdown with its own test cases.<br>
>><br>
>> [Yocto #13736]<br>
>><br>
>> Signed-off-by: Kai Kang <<a href="mailto:kai.kang@windriver.com" target="_blank">kai.kang@windriver.com</a>><br>
>> ---<br>
>> meta/recipes-core/ifupdown/files/run-ptest | 4 ++<br>
>> .../ifupdown/files/tweak-ptest-script.patch | 49 +++++++++++++++++++<br>
>> meta/recipes-core/ifupdown/<a href="http://ifupdown_0.8.35.bb" rel="noreferrer" target="_blank">ifupdown_0.8.35.bb</a> | 10 +++-<br>
>> 3 files changed, 62 insertions(+), 1 deletion(-)<br>
>> create mode 100644 meta/recipes-core/ifupdown/files/run-ptest<br>
>> create mode 100644 meta/recipes-core/ifupdown/files/tweak-ptest-script.patch<br>
>><br>
>> diff --git a/meta/recipes-core/ifupdown/files/run-ptest b/meta/recipes-core/ifupdown/files/run-ptest<br>
>> new file mode 100644<br>
>> index 0000000000..8694042392<br>
>> --- /dev/null<br>
>> +++ b/meta/recipes-core/ifupdown/files/run-ptest<br>
>> @@ -0,0 +1,4 @@<br>
>> +#!/bin/sh<br>
>> +<br>
>> +CURDIR=$(dirname `readlink -f $0`)<br>
>> +cd $CURDIR/tests && ./testbuild-linux<br>
>> diff --git a/meta/recipes-core/ifupdown/files/tweak-ptest-script.patch b/meta/recipes-core/ifupdown/files/tweak-ptest-script.patch<br>
>> new file mode 100644<br>
>> index 0000000000..d7600cf243<br>
>> --- /dev/null<br>
>> +++ b/meta/recipes-core/ifupdown/files/tweak-ptest-script.patch<br>
>> @@ -0,0 +1,49 @@<br>
>> +Tweak tests of ifupdown to make it work with oe-core ptest framework.<br>
>> +<br>
>> +Upstream-Status: Inappropriate [oe-core specific]<br>
>> +<br>
>> +Signed-off-by: Kai Kang <<a href="mailto:kai.kang@windriver.com" target="_blank">kai.kang@windriver.com</a>><br>
>> +<br>
>> +diff --git a/tests/testbuild-linux b/tests/testbuild-linux<br>
>> +index 1181ea0..d5c1814 100755<br>
>> +--- a/tests/testbuild-linux<br>
>> ++++ b/tests/testbuild-linux<br>
>> +@@ -1,6 +1,7 @@<br>
>> + #!/bin/sh -e<br>
>> +<br>
>> +-dir=tests/linux<br>
>> ++curdir=$(dirname `readlink -f $0`)<br>
>> ++dir=$curdir/linux<br>
>> +<br>
>> + result=true<br>
>> + for test in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; do<br>
>> +@@ -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>
>> + echo "Testcase $test: $args"<br>
>> +<br>
>> + exitcode=0<br>
>> +- ./ifup -v --no-act-commands --force -i $dir/testcase.$test --state-dir=$dir/state.$test $args \<br>
>> ++ ifup -v --no-act-commands --force -i $dir/testcase.$test --state-dir=$dir/state.$test $args \<br>
>> + >$dir/up-res-out.$test 2>$dir/up-res-err.$test || exitcode=$?<br>
>> +<br>
>> + (echo "exit code: $exitcode";<br>
>> +@@ -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>
>> + echo "====stderr===="; cat $dir/up-res-err.$test) > $dir/up-res.$test<br>
>> +<br>
>> + exitcode=0<br>
>> +- ./ifdown -v --no-act-commands --force -i $dir/testcase.$test --state-dir=$dir/state.$test $args \<br>
>> ++ ifdown -v --no-act-commands --force -i $dir/testcase.$test --state-dir=$dir/state.$test $args \<br>
>> + >$dir/down-res-out.$test 2>$dir/down-res-err.$test || exitcode=$?<br>
>> +<br>
>> + (echo "exit code: $exitcode";<br>
>> +@@ -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>
>> + echo "====stderr===="; cat $dir/down-res-err.$test) > $dir/down-res.$test<br>
>> +<br>
>> + if diff -ub $dir/up.$test $dir/up-res.$test && diff -ub $dir/down.$test $dir/down-res.$test; then<br>
>> +- echo "(okay)"<br>
>> ++ echo "PASS: $test"<br>
>> + else<br>
>> +- echo "(failed)"<br>
>> ++ echo "FAIL: $test"<br>
>> + result=false<br>
>> + fi<br>
>> + echo "=========="<br>
>> 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>
>> index 0de97fe372..53cb971d33 100644<br>
>> --- a/meta/recipes-core/ifupdown/<a href="http://ifupdown_0.8.35.bb" rel="noreferrer" target="_blank">ifupdown_0.8.35.bb</a><br>
>> +++ b/meta/recipes-core/ifupdown/<a href="http://ifupdown_0.8.35.bb" rel="noreferrer" target="_blank">ifupdown_0.8.35.bb</a><br>
>> @@ -11,13 +11,15 @@ SRC_URI = "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>
>> file://99_network \<br>
>> file://0001-Define-FNM_EXTMATCH-for-musl.patch \<br>
>> file://0001-Makefile-do-not-use-dpkg-for-determining-OS-type.patch \<br>
>> + file://run-ptest \<br>
>> + ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://tweak-ptest-script.patch', '', d)} \<br>
>> "<br>
>> SRCREV = "4af76318cfc57f8e4a44d357104188666213bd4b"<br>
>><br>
>> S = "${WORKDIR}/git"<br>
>><br>
>><br>
>> -inherit update-alternatives<br>
>> +inherit ptest update-alternatives<br>
>><br>
>> do_compile () {<br>
>> chmod a+rx *.pl *.sh<br>
>> @@ -40,6 +42,12 @@ do_install () {<br>
>> cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8<br>
>> }<br>
>><br>
>> +do_install_ptest () {<br>
>> + install -d ${D}${PTEST_PATH}/tests<br>
>> + cp -r ${S}/tests/testbuild-linux ${D}${PTEST_PATH}/tests/<br>
>> + cp -r ${S}/tests/linux ${D}${PTEST_PATH}/tests/<br>
>> +}<br>
>> +<br>
>> ALTERNATIVE_PRIORITY = "100"<br>
>> ALTERNATIVE_${PN} = "ifup ifdown"<br>
>><br>
>> -- <br>
>> 2.17.1<br>
>><br>
>> -- <br>
>> _______________________________________________<br>
>> Openembedded-core mailing list<br>
>> <a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
>> <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>