You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by "Philippe M. Chiasson" <go...@ectoplasm.org> on 2004/06/28 22:16:03 UTC

[Patch] add TEST_EXTRA_ARGS to allow passing arguments to t/TEST thru make invocation

I am working on an Apache::Test based test framework, and being able to pass extra conditionnal
arguments to t/TEST thru make test would be very much usefull. Since right now, you can only
turn verbose on or off.

$> make test TEST_EXTRA_ARGS="-port 8899 -debug=gdb"

For instance. Otherwise, I end up creating other make targets that look like

some_special_test:
	$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
	t/TEST -port 8899 -bugreport -verbose=$(TEST_VERBOSE) $(TEST_FILES)

Forcing me to duplicate too much code for my taste.

Thoughts?

Index: Apache-Test/lib/Apache/TestMM.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm,v
retrieving revision 1.34
diff -u -I$Id -r1.34 TestMM.pm
--- Apache-Test/lib/Apache/TestMM.pm	16 Apr 2004 19:47:42 -0000	1.34
+++ Apache-Test/lib/Apache/TestMM.pm	28 Jun 2004 20:11:47 -0000
@@ -63,12 +63,12 @@

  test_clean :
  	$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
-	t/TEST -clean
+	t/TEST $(TEST_EXTRA_ARGS) -clean

  run_tests : test_clean
  	$(PASSENV) \
  	$(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
-	t/TEST -bugreport -verbose=$(TEST_VERBOSE) $(TEST_FILES)
+	t/TEST $(TEST_EXTRA_ARGS) -bugreport -verbose=$(TEST_VERBOSE) $(TEST_FILES)

  test :: pure_all run_tests test_clean


-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Re: [Patch] add TEST_EXTRA_ARGS to allow passing arguments to t/TEST thru make invocation

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Philippe M. Chiasson wrote:
> Geoffrey Young wrote:
> 
>> ping
>>
>> :)
>>  
>>
> Must have fell off my radar. How is the following patch ?

+1

--Geoff

Re: [Patch] add TEST_EXTRA_ARGS to allow passing arguments to t/TEST thru make invocation

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Geoffrey Young wrote:

>ping
>
>:)
>  
>
Must have fell off my radar. How is the following patch ?

>--Geoff
>
>Stas Bekman wrote:
>  
>
>>Geoffrey Young wrote:
>>
>>    
>>
>>>>I'm not sure about the name choice. $(TEST_VERBOSE) and $(TEST_FILES)
>>>>are the same as other Test packages use. Do they have $TEST_EXTRA_ARGS
>>>>too? Otherwise we may better use some name specific to Apache-Test?
>>>>        
>>>>
>>>
>>>MakeMaker looks to support only three: TEST_VERBOSE, TEST_FILE(S), and
>>>TESTDB_SW.
>>>
>>>so how about APACHE_TEST_EXTRA_ARGS?  it's verbose but it shouldn't be
>>>too
>>>bad and it beats making tons of extra targets.
>>>      
>>>
>>+1
>>
>>    
>>
>
>  
>


Re: [Patch] add TEST_EXTRA_ARGS to allow passing arguments to t/TEST thru make invocation

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
ping

:)

--Geoff

Stas Bekman wrote:
> Geoffrey Young wrote:
> 
>>> I'm not sure about the name choice. $(TEST_VERBOSE) and $(TEST_FILES)
>>> are the same as other Test packages use. Do they have $TEST_EXTRA_ARGS
>>> too? Otherwise we may better use some name specific to Apache-Test?
>>
>>
>>
>> MakeMaker looks to support only three: TEST_VERBOSE, TEST_FILE(S), and
>> TESTDB_SW.
>>
>> so how about APACHE_TEST_EXTRA_ARGS?  it's verbose but it shouldn't be
>> too
>> bad and it beats making tons of extra targets.
> 
> 
> +1
> 

Re: [Patch] add TEST_EXTRA_ARGS to allow passing arguments to t/TEST thru make invocation

Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:

>>I'm not sure about the name choice. $(TEST_VERBOSE) and $(TEST_FILES)
>>are the same as other Test packages use. Do they have $TEST_EXTRA_ARGS
>>too? Otherwise we may better use some name specific to Apache-Test?
> 
> 
> MakeMaker looks to support only three: TEST_VERBOSE, TEST_FILE(S), and
> TESTDB_SW.
> 
> so how about APACHE_TEST_EXTRA_ARGS?  it's verbose but it shouldn't be too
> bad and it beats making tons of extra targets.

+1

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: [Patch] add TEST_EXTRA_ARGS to allow passing arguments to t/TEST thru make invocation

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> +1 on the concept

same here

> I'm not sure about the name choice. $(TEST_VERBOSE) and $(TEST_FILES)
> are the same as other Test packages use. Do they have $TEST_EXTRA_ARGS
> too? Otherwise we may better use some name specific to Apache-Test?

MakeMaker looks to support only three: TEST_VERBOSE, TEST_FILE(S), and
TESTDB_SW.

so how about APACHE_TEST_EXTRA_ARGS?  it's verbose but it shouldn't be too
bad and it beats making tons of extra targets.

--Geoff

Re: [Patch] add TEST_EXTRA_ARGS to allow passing arguments to t/TEST thru make invocation

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> I am working on an Apache::Test based test framework, and being able to 
> pass extra conditionnal
> arguments to t/TEST thru make test would be very much usefull. Since 
> right now, you can only
> turn verbose on or off.
> 
> $> make test TEST_EXTRA_ARGS="-port 8899 -debug=gdb"
> 
> For instance. Otherwise, I end up creating other make targets that look 
> like
> 
> some_special_test:
>     $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
>     t/TEST -port 8899 -bugreport -verbose=$(TEST_VERBOSE) $(TEST_FILES)
> 
> Forcing me to duplicate too much code for my taste.
> 
> Thoughts?

+1 on the concept

I'm not sure about the name choice. $(TEST_VERBOSE) and $(TEST_FILES) are the 
same as other Test packages use. Do they have $TEST_EXTRA_ARGS too? Otherwise 
we may better use some name specific to Apache-Test?


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com