# Git's tests have depended on Perl since at least 2006

6 messages from 2010-08-13 to 2010-08-13. Participants: Ævar Arnfjörð Bjarmason, Jonathan Nieder, Junio C Hamano.
Thread: https://gitlist.dev/t/24733

## Ævar Arnfjörð Bjarmason, 2010-08-13 21:25

Subject: Git's tests have depended on Perl since at least 2006
Message-ID: <AANLkTim9aNtFdwM5m-FB_LWX96es2DR_9mU3rGcV4dME@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTim9aNtFdwM5m-FB_LWX96es2DR_9mU3rGcV4dME%40mail.gmail.com

```
This is just an interesting datapoint, but Git's test suite currently
crashes and burns if you don't have a perl in your $PATH, no matter if
you've compiled with NO_PERL=YesPlease or not. This has been the case
since at least 2006, or v1.3.0-rc1~13^2~34.

The affected tests are:

    ./t0000-basic.sh ./t0025-crlf-auto.sh ./t0080-vcs-svn.sh
    ./t0020-crlf.sh ./t1010-mktree.sh ./t1300-repo-config.sh
    ./t3300-funny-names.sh ./t4012-diff-binary.sh
    ./t4020-diff-external.sh ./t4014-format-patch.sh
    ./t4029-diff-trailing-space.sh ./t4031-diff-rewrite-binary.sh
    ./t4030-diff-textconv.sh ./t4043-diff-rename-binary.sh
    ./t4103-apply-binary.sh ./t4116-apply-reverse.sh ./t4200-rerere.sh
    ./t5303-pack-corruption-resilience.sh ./t5300-pack-object.sh
    ./t6011-rev-list-with-bad-commit.sh
    ./t6013-rev-list-reverse-parents.sh ./t6003-rev-list-topo-order.sh

I have a WIP patch series to tackle this issue:

    http://github.com/avar/git/compare/git:pu...in-progress-dont-depend-on-perl

It adds a PERL dependency to things and changes perl to
"$PERL_PATH". Many things were implicitly depending on perl due to
this bit in test-lib.sh:

    q_to_nul () {
        perl -pe 'y/Q/\000/'
    }

And many other bits do other things with perl but aren't declaring a
PERL dependency.

Anyway, I just thought I'd mention it, that this hasn't been fixed yet
would suggest that nearly everyone has perl anyway, and that maybe we
shouldn't think twice about introducing a perl dependency to things
when it's convenient.

```

## Jonathan Nieder, 2010-08-13 22:37

Subject: Re: Git's tests have depended on Perl since at least 2006
Message-ID: <20100813223725.GA2153@burratino>
URL: https://gitlist.dev/e/20100813223725.GA2153%40burratino
In-Reply-To: <AANLkTim9aNtFdwM5m-FB_LWX96es2DR_9mU3rGcV4dME@mail.gmail.com>

```
Ævar Arnfjörð Bjarmason wrote:

> This is just an interesting datapoint, but Git's test suite currently
> crashes and burns if you don't have a perl in your $PATH, no matter if
> you've compiled with NO_PERL=YesPlease or not.

Yes, I think this was known.  Development machines (which is where
people tend to run tests most) tend to have perl but some weird
production machines did not.

> I have a WIP patch series to tackle this issue:
> 
>     http://github.com/avar/git/compare/git:pu...in-progress-dont-depend-on-perl
> 
> It adds a PERL dependency to things

Reasonable.

> and changes perl to
> "$PERL_PATH".

Is that necessary?  As you mentioned before, a lot of uses of perl are
for run-of-the-mill one-liners and do not care much which version they
get.

On the other hand, even if it is not necessary, it might still be a
good idea to just stick to one perl version for simplicity.

```

## Junio C Hamano, 2010-08-13 22:45

Subject: Re: Git's tests have depended on Perl since at least 2006
Message-ID: <7v4oeyjfnw.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v4oeyjfnw.fsf%40alter.siamese.dyndns.org
In-Reply-To: <AANLkTim9aNtFdwM5m-FB_LWX96es2DR_9mU3rGcV4dME@mail.gmail.com>

```
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> This is just an interesting datapoint, but Git's test suite currently
> crashes and burns if you don't have a perl in your $PATH, no matter if
> you've compiled with NO_PERL=YesPlease or not. This has been the case
> since at least 2006, or v1.3.0-rc1~13^2~34.

I'd suggest you not to go overboard on this.  NO_PERL=YesPlease is
primarily about the deployment environment.  The person who is building
and packaging git may have perl on her development box.

```

## Ævar Arnfjörð Bjarmason, 2010-08-13 22:56

Subject: Re: Git's tests have depended on Perl since at least 2006
Message-ID: <AANLkTi=FvAZZsxctJ-sXuQxsMgn15BhKooXjO13CVy6U@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3DFvAZZsxctJ-sXuQxsMgn15BhKooXjO13CVy6U%40mail.gmail.com
In-Reply-To: <7v4oeyjfnw.fsf@alter.siamese.dyndns.org>

```
On Fri, Aug 13, 2010 at 22:45, Junio C Hamano <gitster@pobox.com> wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> This is just an interesting datapoint, but Git's test suite currently
>> crashes and burns if you don't have a perl in your $PATH, no matter if
>> you've compiled with NO_PERL=YesPlease or not. This has been the case
>> since at least 2006, or v1.3.0-rc1~13^2~34.
>
> I'd suggest you not to go overboard on this.  NO_PERL=YesPlease is
> primarily about the deployment environment.  The person who is building
> and packaging git may have perl on her development box.

I promise not to go overboard :)

The aim of this and some recent patch serieses has been to improve our
smoker support. I'd like people to be able to run a smoker without a
perl without sending false positives in their smoke reports, that's
all.

```

## Junio C Hamano, 2010-08-13 23:30

Subject: Re: Git's tests have depended on Perl since at least 2006
Message-ID: <7vvd7ehyzy.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vvd7ehyzy.fsf%40alter.siamese.dyndns.org
In-Reply-To: <AANLkTi=FvAZZsxctJ-sXuQxsMgn15BhKooXjO13CVy6U@mail.gmail.com>

```
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> On Fri, Aug 13, 2010 at 22:45, Junio C Hamano <gitster@pobox.com> wrote:
>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>>
>>> This is just an interesting datapoint, but Git's test suite currently
>>> crashes and burns if you don't have a perl in your $PATH, no matter if
>>> you've compiled with NO_PERL=YesPlease or not. This has been the case
>>> since at least 2006, or v1.3.0-rc1~13^2~34.
>>
>> I'd suggest you not to go overboard on this.  NO_PERL=YesPlease is
>> primarily about the deployment environment.  The person who is building
>> and packaging git may have perl on her development box.
>
> I promise not to go overboard :)
>
> The aim of this and some recent patch serieses has been to improve our
> smoker support. I'd like people to be able to run a smoker without a
> perl without sending false positives in their smoke reports, that's
> all.

I had an impression that your smoker report supports builds on tap harness
that in turn builds on perl.

```

## Ævar Arnfjörð Bjarmason, 2010-08-13 23:44

Subject: Re: Git's tests have depended on Perl since at least 2006
Message-ID: <AANLkTin9k3FerH1exQXMVS7LrJbLraptd5cJzLEh2Mgj@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTin9k3FerH1exQXMVS7LrJbLraptd5cJzLEh2Mgj%40mail.gmail.com
In-Reply-To: <7vvd7ehyzy.fsf@alter.siamese.dyndns.org>

```
On Fri, Aug 13, 2010 at 23:30, Junio C Hamano <gitster@pobox.com> wrote:
> I had an impression that your smoker report supports builds on tap harness
> that in turn builds on perl.

It does, but I was considering cases like:

    PATH=/a/limited/test/environment /usr/bin/prove ...

But actually getting rid of the smoker Perl dependency would be easy,
it's just running each test, saving the output to a file and tar-ing
it all up. It'd be very easy to provide a shellscript that did that.

```
