Subject: [bug#66793] [PATCH 1/3] tests: Make ‘guix time-machine’ test effective.

From: Ludovic Courtès <[email-masked]>
Date: Sun, 05 Nov 2023 21:49:06 +0100

Hi,

Maxim Cournoyer <[email-masked]> skribis:

>> +if [ -d "$abs_top_srcdir/.git" ] \
>> +   || guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null
>> +then
>> +    guix time-machine --version
>> +else
>> +    echo "This test requires networking or a local Git checkout; skipping." >&2
>> +    exit 77
>> +fi
>>  
>> -# Visiting a commit older than v1.0.0 fails.
>> -! guix time-machine --commit=v0.15.0
>> +if [ -d "$abs_top_srcdir/.git" ]
>> +then
>> +    EXTRA_OPTIONS="--url=$abs_top_srcdir"
>
> Should the --url valE here be prefixed with "file://", just to make it
> extra clear we are cloning from a local file?

To my surprise, the test (which does little more than cloning the repo)
runs in 5s without file:// and in 30mn otherwise!  So I left the file://
prefix out and added a comment.

Ludo’.