[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] make make check work with VPATH build

From: Yoshiki Hayashi <yoshiki_at_xemacs.org>
Date: 2001-08-15 15:22:06 CEST

Current Makefile cannot run some tests when build directory differs
from source directory. There are some problems.

  When no C tests exist for the given directory, make does not create
  tests directory. (e.g. subversion/tests/clients/)

  Not all test programs are in build tree. Shell script and python
  test cases only exist in source tree.

The patch below fixes above problems. This fixes all problems except
below.

Running all tests in svn-test.sh...
apr_error: #2, src_err 0 : <No such file or directory>
  unable to open ../../../xml/co1-inline.xml
FAILED
--- at least one test FAILED, check tests.log.

This can be fixed by changing ../../../xml/co1-inline.xml to the file
in source tree. Perhaps I'll fix it tomorrow if no one fixes it
today.

ChangeLog:
Fix path to test cases so that VPATH build can run tests.

* Makefile.in (check): Escape . to grep argument correctly.

  Fix references to python and shell scripts. They should always
  point to source tree.

  Create base directory for testcases so that VPATH build can run
  test cases in correct directory.

  chmod is only required for shell scripts. Python scripts are not
  run directly and object files should be executable by default.

Index: Makefile.in
===================================================================
RCS file: /home/penny/cvsroot/subversion/Makefile.in,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.4.1
diff -u -r1.1.1.1 -r1.1.1.1.4.1
--- Makefile.in 14 Aug 2001 13:55:34 -0000 1.1.1.1
+++ Makefile.in 15 Aug 2001 08:27:49 -0000 1.1.1.1.4.1
@@ -108,15 +108,22 @@
         echo > $$logfile ; \
         failed=no ; \
         list='$(TEST_PROGRAMS)'; for prog in $$list; do \
- chmod a+x $$prog ; \
             progbase=`echo $$prog | sed 's?.*/??'` ; \
             progdir=`echo $$prog | sed 's?/[^/]*$$??'` ; \
             echo -n "Running all tests in $$progbase..." ; \
             echo "START: $$progbase" >> $$logfile ; \
- if echo $$prog | grep \.py > /dev/null; then \
- runprog="$(PYTHON) $$progbase" ; \
+ if echo $$prog | grep \\.py > /dev/null; then \
+ runprog="$(PYTHON) $(abs_srcdir)/$$prog" ; \
             else \
- runprog="./$$progbase" ; \
+ if echo $$prog | grep \\.sh$ > /dev/null; then \
+ runprog="$(abs_srcdir)/$$prog" ; \
+ chmod a+x $$runprog ; \
+ else \
+ runprog="./$$progbase" ; \
+ fi ; \
+ fi ; \
+ if ! test -d "$$progdir" ; then \
+ $(MKDIR) $$progdir ; \
             fi ; \
             if ( cd $$progdir && $$runprog ) >> $$logfile ; then \
                 echo "SUCCESS" ; \

-- 
Yoshiki Hayashi
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:36 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.