With a few minor exceptions for tests that had additional concerns and tests I don...
[exim.git] / test / patchexim
CommitLineData
151b83f8
PH
1#! /usr/bin/perl -w
2
1f5497b2 3# $Cambridge: exim/test/patchexim,v 1.2 2007/06/29 09:20:37 ph10 Exp $
151b83f8
PH
4
5###############################################################################
6# This is an auxiliary script that is part of the Exim test suite. It must be #
7# run as root, and is normally called from the main controlling script. Its #
8# job is to make a copy of Exim, suitably patched so that it can run in the #
9# test harness. See further comments in the main script. #
10# #
11# The only argument to this script is the name of the Exim binary that is to #
12# be copied. The script must be run in the correct current directory. #
13###############################################################################
14
15open(IN, "$ARGV[0]") || die "** Failed to open $ARGV[0]: $!\n";
16open(OUT, ">eximdir/exim") || die "** Failed to open eximdir/exim: $!\n";
17
18while(<IN>)
19 {
20 s/>>>running<<</<<<testing>>>/;
1f5497b2 21 s/(\d+\.\d+(?:\.\d+)?(-RC\d+|-dev)?\0<<eximversion>>)/"x.yz\0" . ("*" x (length($1) - 5))/e;
151b83f8
PH
22 print OUT;
23 }
24
25close(IN);
26close(OUT);
27
28chmod 04755, "eximdir/exim";
29
30# End of patchexim script