]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Remove test.sh's dependency on Perl
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 23 Feb 2010 21:23:36 +0000 (22:23 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 23 Feb 2010 21:23:36 +0000 (22:23 +0100)
INSTALL
test.sh

diff --git a/INSTALL b/INSTALL
index ec295e299f37cb0d7ac9757662ea8419b2257c77..646a245bae64bfba37c7730628e767be125b9f93 100644 (file)
--- 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 fd779242ccf61c9eb245d07739957587981a0b4e..6894548565752372e9de522c9531250930a35b42 100755 (executable)
--- 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