From: Joel Rosdahl Date: Tue, 23 Feb 2010 21:23:36 +0000 (+0100) Subject: Remove test.sh's dependency on Perl X-Git-Tag: v3.0pre0~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecd8e731ae227a357d8d72e2b81b0f35f79d39f8;p=thirdparty%2Fccache.git Remove test.sh's dependency on Perl --- diff --git a/INSTALL b/INSTALL index ec295e299..646a245ba 100644 --- a/INSTALL +++ b/INSTALL @@ -53,9 +53,8 @@ BUILDING CODE FROM THE SOURCE CODE REPOSITORY In addition to the prerequisites mentioned above, you also need: - * asciidoc (http://www.methods.co.nz/asciidoc/) to build the documentation. - * autoconf (http://www.gnu.org/software/autoconf/) - * perl (http://www.perl.com/) to run the testsuite + - asciidoc (http://www.methods.co.nz/asciidoc/) to build the documentation. + - autoconf (http://www.gnu.org/software/autoconf/) Run "./autogen.sh" to generate "configure" and "config.h.in" and then follow -the steps mentioned in INSTALLATION. +the steps mentioned under INSTALLATION above. diff --git a/test.sh b/test.sh index fd779242c..689454856 100755 --- a/test.sh +++ b/test.sh @@ -82,6 +82,14 @@ checkfile() { fi } +sed_in_place() { + expr=$1 + shift + for file in $*; do + (rm $file; sed "$expr" >$file) <$file + done +} + run_suite() { echo "starting testsuite $1" testsuite=$1 @@ -683,7 +691,7 @@ EOF checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - perl -pi -e 's/foo/ignored/' comments.h comments.c + sed_in_place 's/foo/ignored/' comments.h comments.c sleep 1 # Sleep to make the include file trusted. $CCACHE $COMPILER -c comments.c @@ -692,7 +700,7 @@ EOF checkstat 'cache miss' 1 # Check that comment-like string contents are hashed. - perl -pi -e 's/apple/orange/' comments.c + sed_in_place 's/apple/orange/' comments.c sleep 1 # Sleep to make the include file trusted. $CCACHE $COMPILER -c comments.c