Re: [exim-dev] buildfarm client proposal: tests configure su…

Pàgina inicial
Delete this message
Reply to this message
Autor: Heiko Schlittermann
Data:  
A: exim-dev
Assumpte: Re: [exim-dev] buildfarm client proposal: tests configure support
Phil Pennock via Exim-dev <exim-dev@???> (Sa 15 Sep 2018 03:34:35 CEST):
> I've made the buildfarm repos visible† on git.exim.org since there's
> nothing secret in them and we point folks to them on public wiki pages,
> and all the repos can be cloned without authentication.
>
> I've pushed to buildfarm-client.git a new branch `test_configure_tuning`
> with one additional commit:
>
> https://git.exim.org/buildfarm-client.git/shortlog/refs/heads/test_configure_tuning
> https://git.exim.org/buildfarm-client.git/commitdiff/0ce98df83e53cc21a25d98f95e431803a398742c



(1)

Instead of
    my %saved_env = %ENV;
    …
    %ENV = %saved_env;


I'd do:

    { local %ENV = %ENV;
      …
    }
This should have the same result, but is more reliable in restoring the
old %ENV when leaving the scope.


(2)
And instead of adding the keys/values to the %ENV one by one, I'd
probably do

    %ENV = (%ENV, %{$EximBuild::conf{test_configure_env}});
But that's matter of taste.


(3)
And instead of the attempt to get the quoting right, I'd try
do do it in pure Perl

I'd replace
    my $conf_args = '';
    foreach (@{$EximBuild::conf{test_configure_args}}) {
      s/'/'"'"'/g;
      $conf_args .= " '${_}'";
    }
    @makeout =`(cd $exim/test && ./configure $conf_args && $make )2>&1 `;



with (untested) block like this (no shell involved anymore):

    open(my $make, '-|') or do {
    open(STDERR, '>&STDOUT');
        chdir "$exim/test" or die;
        system("./configure", @{$EximBuild::conf{test_configure_args}) == 0 or die;
    system("make") == 0 or die;
        exit 0;
    };
    @makeout = <$make>;
    close($make) or die;


Maybe I missed the point, but If you'd like, I can try implementing the above
changes.

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
--
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: F69376CE -
 ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -