[OE-core] [PATCH 1/3] systemd: upgrade to 237

ChenQi Qi.Chen at windriver.com
Thu Mar 22 06:06:14 UTC 2018


On 03/19/2018 05:04 PM, Alexander Kanavin wrote:
> On 03/19/2018 06:53 AM, ChenQi wrote:
>
>> For autotools,
>> 1) if the test framework of some package is a standalone set of 
>> scripts or it could be easily decoupled from Makefile, adding ptest 
>> support for such package is easy.
>> 2) if the test framework of some package is coupled with Makefile, we 
>> need to adjust or replace vars in Makefile, install make on target 
>> and rely on the Makefile to run tests. In such case, adding ptest is 
>> not easy.
>>
>> For meson, the test framework is coupled with meson/ninja. We need to 
>> at least install ninja and meson on target as a first step. Maybe we 
>> need to adjust other things in do_install_ptest. That's why I said 
>> "there's no easy way to add ptest support."
>>
>> Why didn't I look further into this problem? Because I view ptest 
>> support as optional, not necessary.
>> What I thought was: "let's upgrade the package first. If ptest 
>> support is required from community, deal with that in a separate patch."
>>
>> Now that I've got feedback from you, I think I'll look further into 
>> this issue and try to add ptest support via a separate patch.
>
> But is it tightly coupled with meson/ninja? From what I see here:
>
> https://github.com/systemd/systemd/blob/master/test/meson.build
>
> there is no testing logic as such in the meson.build file, it simply 
> runs a few test scripts, and checks the outcome. Which we can easily 
> replicate in a script.
>
> Alex
>

Hi Alex,

The test framework meson uses is like:

|e = executable('prog', 'testprog.c') test('name of test', e)|


http://mesonbuild.com/Unit-tests.html

So they could be defined in any valid meson.build file. In systemd's 
case, most of them are in top-level meson.build.

I agree with you that it's possible to extract all these test cases and 
hold them in a custom script we write. I think this could serve as a 
fall-back approach to adding ptest support for systemd.
But I'd like to spend some time to try to find a more general approach, 
avoiding headaches when upgrading.

Best Regards,
Chen Qi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180322/f9a00a82/attachment-0002.html>


More information about the Openembedded-core mailing list