From 97c0184000ab7859c68d62f27f8912414c55f208 Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Thu, 5 Jun 2014 12:56:36 +0200
Subject: [PATCH 2/4] runtests.pl: Add -R to require additional perl libraries

This is useful to change the behaviour of the script without
having to modify the file itself, for example to use a custom
compareparts() function that ignores header differences that
are expected to occur when an external proxy is being used.

Such differences are proxy-specific and thus the modifications
should be maintained together with the proxy.
---
 tests/runtests.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/runtests.pl b/tests/runtests.pl
index b75831e..af21140 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -4657,6 +4657,11 @@ while(@ARGV) {
         # short output
         $short=1;
     }
+    elsif($ARGV[0] eq "-R") {
+        # require additional library file
+        shift @ARGV;
+        require $ARGV[0];
+    }
     elsif($ARGV[0] eq "-am") {
         # automake-style output
         $short=1;
@@ -4747,6 +4752,7 @@ Usage: runtests.pl [options] [test selection(s)]
   -P proxy use the specified proxy
   -r       run time statistics
   -rf      full run time statistics
+  -R path  require an additional perl library file to replace certain functions
   -s       short output
   -am      automake style output PASS/FAIL: [number] [name]
   -t[N]    torture (simulate memory alloc failures); N means fail Nth alloc
-- 
1.9.0


