You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Max Bowsher <ma...@ukf.net> on 2004/03/31 10:19:20 UTC

[PATCH] Don't build tests as part of plain "make"

Building tests as part of "make" wastes time if you do not intend to run the
tests. They will be built on "make check" if not already built anyway.

Max.


[[[
Do not build tests as part of plain "make".

* configure.in: Remove "test" and "fs-test" from BUILD_RULES.
]]]

Index: configure.in
===================================================================
--- configure.in (revision 9243)
+++ configure.in (working copy)
@@ -297,9 +297,9 @@
 # Only add *_APACHE_RULE if we also have db, since mod_dav_svn depends on
it.
 INSTALL_STATIC_RULES="install-bin install-docs"
 INSTALL_RULES="install-base-lib install-lib install-include install-static"
-BUILD_RULES="base-lib lib bin test"
+BUILD_RULES="base-lib lib bin"
 if test "$svn_lib_berkeley_db" = "yes"; then
-  BUILD_RULES="base-lib fs-lib lib bin fs-bin $BUILD_APACHE_RULE test
fs-test"
+  BUILD_RULES="base-lib fs-lib lib bin fs-bin $BUILD_APACHE_RULE"
   INSTALL_STATIC_RULES="install-bin install-fs-bin install-docs"
   INSTALL_RULES="install-base-lib install-fs-lib install-lib
install-include install-static $INSTALL_APACHE_RULE"
   FS_TEST_DEPS="\$(FS_TEST_DEPS)"


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by "C. Michael Pilato" <cm...@collab.net>.
"Max Bowsher" <ma...@ukf.net> writes:

> >> Building tests as part of "make" wastes time if you do not intend
> >> to run the tests. They will be built on "make check" if not already 
> >> built anyway.
> >
> > Oh, I'm so +1 on the concept of this change.
> 
> Only the concept? Or can I commit?

I didn't review the change (plate is really full right now).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by Max Bowsher <ma...@ukf.net>.
C. Michael Pilato wrote:
> "Max Bowsher" <ma...@ukf.net> writes:
>
>> Building tests as part of "make" wastes time if you do not intend to run
the
>> tests. They will be built on "make check" if not already built
>> anyway.
>
> Oh, I'm so +1 on the concept of this change.

Only the concept? Or can I commit?

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by "C. Michael Pilato" <cm...@collab.net>.
"Max Bowsher" <ma...@ukf.net> writes:

> Building tests as part of "make" wastes time if you do not intend to run the
> tests. They will be built on "make check" if not already built
> anyway.

Oh, I'm so +1 on the concept of this change.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2004-04-02 at 18:38, Max Bowsher wrote:
> Greg Stein wrote:
> > I'm with ghudson on this one. The test programs are very minor in the
> > scheme of things, so they ought to be part of "all". If time is an issue,
> > then we have a bunch of convenience targets to use instead (e.g. 'svn' was
> > mentioned).
> 
> Do you mean "all" as in literally "make all", or as in the default make
> target?

I think it would be highly unorthodox for the default make target not to
be "all".


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by Max Bowsher <ma...@ukf.net>.
Greg Stein wrote:
> I'm with ghudson on this one. The test programs are very minor in the
> scheme of things, so they ought to be part of "all". If time is an issue,
> then we have a bunch of convenience targets to use instead (e.g. 'svn' was
> mentioned).

Do you mean "all" as in literally "make all", or as in the default make
target?

I.e. Would you be satisfied with making the default make target "default",
and not making the tests in that, but providing an "all" target which builds
"default" + the tests?

If not, could you explain why?

Thanks,

Max.

>
> Cheers,
> -g
>
> On Fri, Apr 02, 2004 at 05:08:17PM -0500, Greg Hudson wrote:
>> On Fri, 2004-04-02 at 14:11, Max Bowsher wrote:
>>> Are there any use cases when the user really care what CFLAGS are used
to
>>> build temporary testing programs that are not installed?
>>
>> Yes, and they should be as obvious to you as they are to me.  ("I expect
>> the test program to crash, so I want to rebuild Subversion, including
>> the test programs, with debugging symbols, so that I can debug it.")
>>
>>> If there are, I'd rather find a "best-of-both-worlds" solution, as the
>>> wasted time was sufficiently annoying to motivate me to make and test
this
>>> change.
>>
>> If we're talking about the incremental time of rebuilding after a small
>> change, I usually type "make local-all" to do that.  "make bin fs-bin"
>> might do what you want; you could make a target which is an alias for
>> those two.
>>
>> If we're talking about the time for a total build, I can't see how the
>> extra time is significant, given how much other stuff gets built.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>> For additional commands, e-mail: dev-help@subversion.tigris.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by Greg Stein <gs...@lyra.org>.
I'm with ghudson on this one. The test programs are very minor in the
scheme of things, so they ought to be part of "all". If time is an issue,
then we have a bunch of convenience targets to use instead (e.g. 'svn' was
mentioned).

Cheers,
-g

On Fri, Apr 02, 2004 at 05:08:17PM -0500, Greg Hudson wrote:
> On Fri, 2004-04-02 at 14:11, Max Bowsher wrote:
> > Are there any use cases when the user really care what CFLAGS are used to
> > build temporary testing programs that are not installed?
> 
> Yes, and they should be as obvious to you as they are to me.  ("I expect
> the test program to crash, so I want to rebuild Subversion, including
> the test programs, with debugging symbols, so that I can debug it.")
> 
> > If there are, I'd rather find a "best-of-both-worlds" solution, as the
> > wasted time was sufficiently annoying to motivate me to make and test this
> > change.
> 
> If we're talking about the incremental time of rebuilding after a small
> change, I usually type "make local-all" to do that.  "make bin fs-bin"
> might do what you want; you could make a target which is an alias for
> those two.
> 
> If we're talking about the time for a total build, I can't see how the
> extra time is significant, given how much other stuff gets built.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2004-04-02 at 14:11, Max Bowsher wrote:
> Are there any use cases when the user really care what CFLAGS are used to
> build temporary testing programs that are not installed?

Yes, and they should be as obvious to you as they are to me.  ("I expect
the test program to crash, so I want to rebuild Subversion, including
the test programs, with debugging symbols, so that I can debug it.")

> If there are, I'd rather find a "best-of-both-worlds" solution, as the
> wasted time was sufficiently annoying to motivate me to make and test this
> change.

If we're talking about the incremental time of rebuilding after a small
change, I usually type "make local-all" to do that.  "make bin fs-bin"
might do what you want; you could make a target which is an alias for
those two.

If we're talking about the time for a total build, I can't see how the
extra time is significant, given how much other stuff gets built.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by Max Bowsher <ma...@ukf.net>.
Greg Hudson wrote:
> On Wed, 31 Mar 2004, Max Bowsher wrote:
>> Building tests as part of "make" wastes time if you do not intend to run
the
>> tests. They will be built on "make check" if not already built anyway.
>
> -1.  This comes up every so often; the problem is that "make CFLAGS=-g"
> (or whatever) followed by "make check" will compile the test programs with
> different flags than the user intended.
>
> That may not be the most compelling reason in the world, but it also
> doesn't take very long to build the tests compared to the rest of the
> code, so the reason doesn't have to be all that compelling.

Are there any use cases when the user really care what CFLAGS are used to
build temporary testing programs that are not installed?

If there are, I'd rather find a "best-of-both-worlds" solution, as the
wasted time was sufficiently annoying to motivate me to make and test this
change.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by Mark Benedetto King <mb...@lowlatency.com>.
On Fri, Apr 02, 2004 at 01:37:49PM -0500, Greg Hudson wrote:
> 
> On Wed, 31 Mar 2004, Max Bowsher wrote:
> > Building tests as part of "make" wastes time if you do not intend to run the
> > tests. They will be built on "make check" if not already built anyway.
> 
> -1.  This comes up every so often; the problem is that "make CFLAGS=-g"
> (or whatever) followed by "make check" will compile the test programs with
> different flags than the user intended.
> 
> That may not be the most compelling reason in the world, but it also
> doesn't take very long to build the tests compared to the rest of the
> code, so the reason doesn't have to be all that compelling.
> 

Also, "make svn" already exists.  Except I can't make it work on 
OS X right now due to, I think, gettext issues.

--ben


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by Max Bowsher <ma...@ukf.net>.
Greg Hudson wrote:
> On Fri, 2004-04-02 at 14:59, C. Michael Pilato wrote:
>> Greg Hudson <gh...@MIT.EDU> writes:
>>
>>> -1.  This comes up every so often; the problem is that "make
>>> CFLAGS=-g" (or whatever) followed by "make check" will compile the
>>> test programs with different flags than the user intended.
>>
>> Is it so much to ask of a user that if they intend to tweak their
>> build of Subversion corestuffs, they tweak their build of the tests
>> similarly?
>
> It's not the end of the world, no.  But "make check" isn't supposed to
> build the tests; it's supposed to run them.  "make all" (or just "make"
> for short) is supposed to build the tests, since, you know, they're part
> of "all".
>
> If it took a long time to build the tests, I'd be willing to bend, but I
> just don't see the point.  Unnecessary optimization is the root of all
> evil.  (Okay, 65% of all evil.)

I see things a bit differently to you. I consider this optimization
worthwhile, not unnecessary, because watching make compile stuff you have no
intention of using is annoying.

Also, I interpret "make check" as "run the tests, including doing any
necessary preparatory work".

"all" has become the traditional name for the default make target, even when
it doesn't actually do everything. I understand it as "all of the subversion
software", not "all of the subversion software, plus more stuff to verify
that all of the subversion software works correctly".

If someone does want to build the tests at the same time as "all", they can
do "make all test fs-test". If wanted, I will make a target "tests" that is
defined to "test" or "fs-test" as appropriate.

Max.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by Mark Benedetto King <mb...@lowlatency.com>.
On Fri, Apr 02, 2004 at 03:05:03PM -0500, Greg Hudson wrote:
> If it took a long time to build the tests, I'd be willing to bend, but I
> just don't see the point.  Unnecessary optimization is the root of all
> evil.  (Okay, 65% of all evil.)
> 

Right, but since we'd want to optimize for the general case of evil,
65% of all evil should be treated as all evil (for purposes of
optimization) (at least as an initial heuristic until the statistical
evil detection/optimization engine is complete).

--ben


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2004-04-02 at 14:59, C. Michael Pilato wrote:
> Greg Hudson <gh...@MIT.EDU> writes:
> 
> > -1.  This comes up every so often; the problem is that "make
> > CFLAGS=-g" (or whatever) followed by "make check" will compile the
> > test programs with different flags than the user intended.
> 
> Is it so much to ask of a user that if they intend to tweak their
> build of Subversion corestuffs, they tweak their build of the tests
> similarly?

It's not the end of the world, no.  But "make check" isn't supposed to
build the tests; it's supposed to run them.  "make all" (or just "make"
for short) is supposed to build the tests, since, you know, they're part
of "all".

If it took a long time to build the tests, I'd be willing to bend, but I
just don't see the point.  Unnecessary optimization is the root of all
evil.  (Okay, 65% of all evil.)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by "C. Michael Pilato" <cm...@collab.net>.
Greg Hudson <gh...@MIT.EDU> writes:

> -1.  This comes up every so often; the problem is that "make
> CFLAGS=-g" (or whatever) followed by "make check" will compile the
> test programs with different flags than the user intended.

Is it so much to ask of a user that if they intend to tweak their
build of Subversion corestuffs, they tweak their build of the tests
similarly?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Don't build tests as part of plain "make"

Posted by Greg Hudson <gh...@MIT.EDU>.
On Wed, 31 Mar 2004, Max Bowsher wrote:
> Building tests as part of "make" wastes time if you do not intend to run the
> tests. They will be built on "make check" if not already built anyway.

-1.  This comes up every so often; the problem is that "make CFLAGS=-g"
(or whatever) followed by "make check" will compile the test programs with
different flags than the user intended.

That may not be the most compelling reason in the world, but it also
doesn't take very long to build the tests compared to the rest of the
code, so the reason doesn't have to be all that compelling.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org