You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@datasketches.apache.org by Dave Fisher <wa...@apache.org> on 2020/04/03 15:52:17 UTC
Re: Catch2 for unit tests
Hi -
Someone could ask on builds@apache.org if there is an ASF hosted option that will support what DataSketches needs.
Jenkins and builedbot are available.
Regards,
Dave
> On Mar 30, 2020, at 4:04 PM, Jon Malkin <jo...@gmail.com> wrote:
>
> Which? Catch2 or cppunit? The former can be included as a single header file in our own project.
>
> And I don't know what equivalent package manager exists for non-cygwin Windows, but that's ideally a supported platform, too.
>
> jon
>
> On Mon, Mar 30, 2020 at 3:08 PM Alexander Saydakov <sa...@verizonmedia.com.invalid> wrote:
> Can it be installed using brew and yum (redhat)?
>
> On Mon, Mar 30, 2020 at 1:38 PM Jon Malkin <jmalkin@apache.org <ma...@apache.org>> wrote:
> Hi all,
>
> I was trying to get CI going for the C++ repo using github actions a few days ago, but ran into an issue where cppunit isn't available in the provided images.
>
> The options I could think of are:
> 1) Download and compile cppunit each time the tests are triggered
> 2) Create precompiled binary libraries for the various platforms we test on
> 3) Find another unit testing framework
>
> The first option seemed excessively expensive and slow. The second is...maybe tolerable but seems ugly and has higher ongoing maintenance costs. After seeing comments online that cppunit isn't really being maintained these days, I went looking for other testing packages.
>
> Google Test seems fairly popular these days, but seems to require more configuration. When I looked at Apache Traffic Server, I discovered Catch (now Catch2). That's a header-only library that uses a Boost license, so it's very permissive, and appears to it'd be ok to include in our own package. The original author has a blog post encouraging exactly that: https://levelofindirection.com/blog/unit-testing-in-cpp-and-objective-c-just-got-ridiculously-easier-still.html <https://levelofindirection.com/blog/unit-testing-in-cpp-and-objective-c-just-got-ridiculously-easier-still.html>
>
> I think it'll improve portability if we can move to that and make it work. But before I start testing with an intent to ultimatley rewrite all our tests with that framework, I wanted to see if there's any specific objection to that move? Or if anyone has ideas for a better solution? (If someone wants to volunteer to get CI working with another package, that'd also be ok :)
>
> jon
Re: Catch2 for unit tests
Posted by Jon Malkin <jm...@apache.org>.
Ah-ha -- good news. Github Actions are free for public repositories!
https://help.github.com/en/github/setting-up-and-managing-billing-and-payments-on-github/managing-your-spending-limit-for-github-actions
On Mon, Apr 13, 2020 at 11:32 PM Jon Malkin <jm...@apache.org> wrote:
> Well, I successfully ported the unit tests to catch2, which also seems to
> have made it way too compile on cygwin (after fixing a few more compiler
> complaints, since they all seem to care about slightly different things).
> So that's a win, and the sort of thing I was hoping would happen by
> removing a dependency on a compiled library.
>
> We can also use GitHub actions for unit tests on commits now -- but I
> found out why must trans don't. Namely that there's a CPU usage limit
> before your have to pay. That's probably a problem for an organization like
> Apache given our revenue model :)
>
> On the positive side, I think the config file is very similar to what
> Jenkins uses. So how do we go about getting that set up? It that some PMC
> Chair needs to give jenkins admin access to one or more of our committers:
> https://cwiki.apache.org/confluence/display/INFRA/Jenkins I'll even
> volunteer figure out how to get things set up.
>
> jon
>
> On Fri, Apr 3, 2020, 8:52 AM Dave Fisher <wa...@apache.org> wrote:
>
>> Hi -
>>
>> Someone could ask on builds@apache.org if there is an ASF hosted option
>> that will support what DataSketches needs.
>>
>> Jenkins and builedbot are available.
>>
>> Regards,
>> Dave
>>
>> On Mar 30, 2020, at 4:04 PM, Jon Malkin <jo...@gmail.com> wrote:
>>
>> Which? Catch2 or cppunit? The former can be included as a single header
>> file in our own project.
>>
>> And I don't know what equivalent package manager exists for non-cygwin
>> Windows, but that's ideally a supported platform, too.
>>
>> jon
>>
>> On Mon, Mar 30, 2020 at 3:08 PM Alexander Saydakov <
>> saydakov@verizonmedia.com.invalid> wrote:
>>
>>> Can it be installed using brew and yum (redhat)?
>>>
>>> On Mon, Mar 30, 2020 at 1:38 PM Jon Malkin <jm...@apache.org> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I was trying to get CI going for the C++ repo using github actions a
>>>> few days ago, but ran into an issue where cppunit isn't available in the
>>>> provided images.
>>>>
>>>> The options I could think of are:
>>>> 1) Download and compile cppunit each time the tests are triggered
>>>> 2) Create precompiled binary libraries for the various platforms we
>>>> test on
>>>> 3) Find another unit testing framework
>>>>
>>>> The first option seemed excessively expensive and slow. The second
>>>> is...maybe tolerable but seems ugly and has higher ongoing maintenance
>>>> costs. After seeing comments online that cppunit isn't really being
>>>> maintained these days, I went looking for other testing packages.
>>>>
>>>> Google Test seems fairly popular these days, but seems to require more
>>>> configuration. When I looked at Apache Traffic Server, I discovered Catch
>>>> (now Catch2). That's a header-only library that uses a Boost license, so
>>>> it's very permissive, and appears to it'd be ok to include in our own
>>>> package. The original author has a blog post encouraging exactly that:
>>>> https://levelofindirection.com/blog/unit-testing-in-cpp-and-objective-c-just-got-ridiculously-easier-still.html
>>>>
>>>> I think it'll improve portability if we can move to that and make it
>>>> work. But before I start testing with an intent to ultimatley rewrite all
>>>> our tests with that framework, I wanted to see if there's any specific
>>>> objection to that move? Or if anyone has ideas for a better solution? (If
>>>> someone wants to volunteer to get CI working with another package, that'd
>>>> also be ok :)
>>>>
>>>> jon
>>>>
>>>
>>
Re: Catch2 for unit tests
Posted by Jon Malkin <jm...@apache.org>.
Well, I successfully ported the unit tests to catch2, which also seems to
have made it way too compile on cygwin (after fixing a few more compiler
complaints, since they all seem to care about slightly different things).
So that's a win, and the sort of thing I was hoping would happen by
removing a dependency on a compiled library.
We can also use GitHub actions for unit tests on commits now -- but I found
out why must trans don't. Namely that there's a CPU usage limit before your
have to pay. That's probably a problem for an organization like Apache
given our revenue model :)
On the positive side, I think the config file is very similar to what
Jenkins uses. So how do we go about getting that set up? It that some PMC
Chair needs to give jenkins admin access to one or more of our committers:
https://cwiki.apache.org/confluence/display/INFRA/Jenkins I'll even
volunteer figure out how to get things set up.
jon
On Fri, Apr 3, 2020, 8:52 AM Dave Fisher <wa...@apache.org> wrote:
> Hi -
>
> Someone could ask on builds@apache.org if there is an ASF hosted option
> that will support what DataSketches needs.
>
> Jenkins and builedbot are available.
>
> Regards,
> Dave
>
> On Mar 30, 2020, at 4:04 PM, Jon Malkin <jo...@gmail.com> wrote:
>
> Which? Catch2 or cppunit? The former can be included as a single header
> file in our own project.
>
> And I don't know what equivalent package manager exists for non-cygwin
> Windows, but that's ideally a supported platform, too.
>
> jon
>
> On Mon, Mar 30, 2020 at 3:08 PM Alexander Saydakov <
> saydakov@verizonmedia.com.invalid> wrote:
>
>> Can it be installed using brew and yum (redhat)?
>>
>> On Mon, Mar 30, 2020 at 1:38 PM Jon Malkin <jm...@apache.org> wrote:
>>
>>> Hi all,
>>>
>>> I was trying to get CI going for the C++ repo using github actions a few
>>> days ago, but ran into an issue where cppunit isn't available in the
>>> provided images.
>>>
>>> The options I could think of are:
>>> 1) Download and compile cppunit each time the tests are triggered
>>> 2) Create precompiled binary libraries for the various platforms we test
>>> on
>>> 3) Find another unit testing framework
>>>
>>> The first option seemed excessively expensive and slow. The second
>>> is...maybe tolerable but seems ugly and has higher ongoing maintenance
>>> costs. After seeing comments online that cppunit isn't really being
>>> maintained these days, I went looking for other testing packages.
>>>
>>> Google Test seems fairly popular these days, but seems to require more
>>> configuration. When I looked at Apache Traffic Server, I discovered Catch
>>> (now Catch2). That's a header-only library that uses a Boost license, so
>>> it's very permissive, and appears to it'd be ok to include in our own
>>> package. The original author has a blog post encouraging exactly that:
>>> https://levelofindirection.com/blog/unit-testing-in-cpp-and-objective-c-just-got-ridiculously-easier-still.html
>>>
>>> I think it'll improve portability if we can move to that and make it
>>> work. But before I start testing with an intent to ultimatley rewrite all
>>> our tests with that framework, I wanted to see if there's any specific
>>> objection to that move? Or if anyone has ideas for a better solution? (If
>>> someone wants to volunteer to get CI working with another package, that'd
>>> also be ok :)
>>>
>>> jon
>>>
>>
>