From c039ce6150634eb51a120406b5b7784823430eb5 Mon Sep 17 00:00:00 2001 From: "Heiko Schlittermann (HS12-RIPE)" Date: Mon, 17 Oct 2016 00:14:55 +0200 Subject: [PATCH] Testsuite: Check version of binary against current git revision --- test/runtest | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/runtest b/test/runtest index ca3124729..7fe0e5dae 100755 --- a/test/runtest +++ b/test/runtest @@ -2566,6 +2566,17 @@ open(EXIMINFO, "$parm_exim -d -C $parm_cwd/test-config -DDIR=$parm_cwd " . die "** Cannot run $parm_exim: $!\n"; while() { + if (my ($version) = /^Exim version (\S+)/) { + my $git = `git describe --dirty=-XX --match 'exim-4*'`; + if (defined $git and $? == 0) { + chomp $git; + $version =~ s/^\d+\K\./_/; + $git =~ s/^exim-//i; + $git =~ s/.*-\Kg([[:xdigit:]]+(?:-XX)?)/$1/; + print "\n*** Version mismatch (Exim: $version vs. GIT: $git). ***\n\n" + if not $version eq $git; + } + } $parm_eximuser = $1 if /^exim_user = (.*)$/; $parm_eximgroup = $1 if /^exim_group = (.*)$/; $parm_trusted_config_list = $1 if /^TRUSTED_CONFIG_LIST:.*?"(.*?)"$/; -- 2.25.1