You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bob Miller <kb...@jogger-egg.com> on 2000/09/27 06:09:15 UTC

"make check" in the svn tree

Currently, I can "make check" in subversion/subversion, but not in
subversion.  I want to "make check" in subversion/tools/svn2cvs, and
it seems like it should be invoked from the top level.

Anybody know what has to be done to Makefile.am or whatever to get
"make check" to work?

I read the comments in tests-common/README, and am unenlightened.

Thanks.
-- 
                                        K<bob>
kbob@jogger-egg.com, http://www.jogger-egg.com/

Re: "make check" in the svn tree

Posted by Jim Blandy <ji...@savonarola.red-bean.com>.
Ben Collins-Sussman <su...@newton.collab.net> writes:

> `check' is a target automatically supplied by automake.  However, we
> don't like it, so our Makefile.am's that live in "test" subdirectories
> redefine this target with our own script:
> 
> ## We're overriding automake's own `check' rule, because it's extremely
> ## inflexible;  we want better control over automated-test output. 
> check:
> 	@echo > tests.log
> 	@for prog in $(SVN_TESTS); do \
> 	  echo; \
> 	  echo -n "Running all sub-tests in $$prog..."; \
> 	  ./$$prog >> tests.log; \
> 	  if [ $$? -eq 0 ]; \
> 	  then \
> 	     echo "SUCCESS"; \
> 	  else \
> 	     echo; \
> 	     echo "at least one sub-test FAILED, check tests.log:"; echo; \
> 	     cat tests.log | grep FAIL; \
> 	  fi; \
> 	done

If we really want to use this, could we put it in a script somewhere,
and have the `check' rules invoke the script with $(SVN_TESTS) as an
argument?  That would be a bit nicer than having a zillion copies of
it.

Re: "make check" in the svn tree

Posted by Ben Collins-Sussman <su...@newton.collab.net>.
Bob Miller <kb...@jogger-egg.com> writes:

> Currently, I can "make check" in subversion/subversion, but not in
> subversion.  I want to "make check" in subversion/tools/svn2cvs, and
> it seems like it should be invoked from the top level.

`check' is a target automatically supplied by automake.  However, we
don't like it, so our Makefile.am's that live in "test" subdirectories
redefine this target with our own script:

## We're overriding automake's own `check' rule, because it's extremely
## inflexible;  we want better control over automated-test output. 
check:
	@echo > tests.log
	@for prog in $(SVN_TESTS); do \
	  echo; \
	  echo -n "Running all sub-tests in $$prog..."; \
	  ./$$prog >> tests.log; \
	  if [ $$? -eq 0 ]; \
	  then \
	     echo "SUCCESS"; \
	  else \
	     echo; \
	     echo "at least one sub-test FAILED, check tests.log:"; echo; \
	     cat tests.log | grep FAIL; \
	  fi; \
	done


If you want to be able to `make check' in tools/cvs2svn/, just create
a Makefile by hand.  You can copy this script if you want, although it
assumes that each test program in SVN_TESTS takes args and produces
output in a certain way (as you already read in
subversion/tests-common/README).

For now, I don't see any reason to extend automake's paws into this
directory.