[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50504] [PATCH] home-services: Add Mcron.
From: |
Andrew Tropin |
Subject: |
[bug#50504] [PATCH] home-services: Add Mcron. |
Date: |
Tue, 14 Sep 2021 09:34:45 +0300 |
On 2021-09-13 18:16, Xinglu Chen wrote:
> On Mon, Sep 13 2021, Andrew Tropin wrote:
>
>> On 2021-09-10 20:22, Xinglu Chen wrote:
>>
>>> On Fri, Sep 10 2021, Andrew Tropin wrote:
>>>
>>>> * gnu/home-services/mcron.scm: New file.
>>>> * gnu/local.mk: Add this.
>>>> * doc/guix.texi: Add documentation about Mcron Home Service.
>>>> ---
>>>>
>>>> This is the last of home services I consider "must-have" for wip-guix-home.
>>>>
>>>> It reuses two functions from (gnu services mcron) via @@, which can be
>>>> considered as a hack, the alternative solution is to expose those functions
>>>> via #:export, I can do it if it's a preffered way or suggest other ideas,
>>>> please. The discussion on this topic: https://issues.guix.gnu.org/47238
>>>> Included Ludovic and Xinglu in CC.
>>>
>>> An alternative would be put it the (gnu service mcron) to share more
>>> code between system service and home service. This was discussed
>>> briefly on rde-devel[1]. It might be worth discussing this issue on
>>> guix-devel before we add too many home service.
>>>
>>
>> I'll make a thread on possible modules naming for home services later
>> this week and will discuss this thing too.
>
> Cool!
>
>>>> I took a brief look at the testing approach, seems the most relevant is
>>>> guix-system.sh and it is just a shell script, which runs a few guix system
>>>> subcommand and check if they fail or succeed. Please let me know, what is
>>>> a
>>>> preferred way for writing tests and I'll try to provide some tests for Guix
>>>> Home in the separate patch.
>>>
>>> The ‘guix-system.sh’ script seems to only test the ‘guix system’
>>> command, which doesn’t seem that related to the home services. I guess
>>> we could check the contents of the generated config files. There is
>>> (gnu build marionette) which creates a VM; we could then check that the
>>> relevant process is running. Maybe there is a better approach, though.
>>>
>>
>> It was a general question about tests for Guix Home, not Mcron home
>> service, sorry for the confusion.
>
> No worries! To clarify, you were referring to the ‘guix home’ command
> line utilities when you wrote “Guix Home”, right? If so, they could
> probably be based on the ‘guix-system.sh’ test.
To the whole Guix Home and found `guix-system.sh` to be most relevant,
but later I saw that there are some tests for services too, both in
tests/services and gnu/tests. Probably I need to look at them more
carefully and write some in the same way.
signature.asc
Description: PGP signature