Doug MacEachern wrote:
return $preamble . <<'EOF'; +ifdef TEST_VERBOSE + override TEST_VERBOSE = -verbose +endif
pretty sure ifdef/endif/override/ifeq are not portable (gmake-isms)
ah, right.
better to have the Makefile run 't/TEST -verbose=$(TEST_VERBOSE)'
of course, would still want 't/TEST -v' to work as it does now (turning verbose on). -verbose=0 should be off and -verbose=1 on if possible.
I think the attached patch behaves as suggested.
--Geoff
Index: lib/Apache/TestMM.pm
===================================================================
RCS file:
/home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm,v
retrieving revision 1.16
diff -u -r1.16 TestMM.pm
--- lib/Apache/TestMM.pm 9 Apr 2002 07:38:57 -0000 1.16
+++ lib/Apache/TestMM.pm 18 Sep 2002 18:33:04 -0000
@@ -44,6 +44,8 @@
EOF
return $preamble . <<'EOF';
+TEST_VERBOSE = 0
+
test_clean :
$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
t/TEST -clean
@@ -51,7 +53,7 @@
run_tests : test_clean
$(PASSENV) \
$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
- t/TEST
+ t/TEST -verbose=$(TEST_VERBOSE)
test :: pure_all run_tests test_clean
Index: lib/Apache/TestRun.pm
===================================================================
RCS file:
/home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
retrieving revision 1.93
diff -u -r1.93 TestRun.pm
--- lib/Apache/TestRun.pm 21 Jun 2002 03:17:51 -0000 1.93
+++ lib/Apache/TestRun.pm 18 Sep 2002 18:33:05 -0000
@@ -22,9 +22,10 @@
my %core_files = ();
my @std_run = qw(start-httpd run-tests stop-httpd);
-my @others = qw(verbose configure clean help ssl http11);
+my @others = qw(configure clean help ssl http11);
my @flag_opts = (@std_run, @others);
my @string_opts = qw(order trace);
+my @vary_opts = qw(verbose);
my @ostring_opts = qw(proxy ping);
my @debug_opts = qw(debug);
my @num_opts = qw(times);
@@ -166,6 +167,7 @@
GetOptions(\%opts, @flag_opts, @help_opts,
(map "$_:s", @debug_opts, @request_opts, @ostring_opts),
(map "$_=s", @string_opts),
+ (map "$_:1", @vary_opts),
(map "$_=i", @num_opts),
(map { ("$_=s", $vopts{$_} ||= []) } @list_opts),
(map { ("$_=s", $vopts{$_} ||= {}) } @hash_opts));
