You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Yoshiki Hayashi <yo...@xemacs.org> on 2001/02/24 07:14:22 UTC

[PATCH] Trivial Makefile patch

If srcdir happens to be an absolute path, you'll get an
error like this:

Running all sub-tests in stringtest...SUCCESS

Running all sub-tests in hashdump-test...SUCCESS

Running all sub-tests in
/work/yoshiki/subversion/subversion/tests/libsvn_subr/target-test.sh.../bin/sh:
.//work/yoshiki/subversion/subversion/tests/libsvn_subr/target-test.sh:
No such file or directory

* Makefile.am (SVN_TESTS): Use only relative path.

Index: subversion/tests/libsvn_subr/Makefile.am
===================================================================
RCS file: /cvs/subversion/subversion/tests/libsvn_subr/Makefile.am,v
retrieving revision 1.17
diff -u -r1.17 Makefile.am
--- subversion/tests/libsvn_subr/Makefile.am	2001/02/12 18:00:28	1.17
+++ subversion/tests/libsvn_subr/Makefile.am	2001/02/24 06:57:07
@@ -29,7 +29,7 @@
 ## Automatic tests run by `make check` -----------------------------
 
 ## A list of test-programs to run.  (Each program contains sub-tests.)
-SVN_TESTS = stringtest hashdump-test $(srcdir)/target-test.sh
+SVN_TESTS = stringtest hashdump-test target-test.sh
 
 ## Give the shell script along with the distribution
 EXTRA_DIST = target-test.sh

-- 
Yoshiki Hayashi

Re: [PATCH] Trivial Makefile patch

Posted by Yoshiki Hayashi <yo...@xemacs.org>.
Greg Stein <gs...@lyra.org> writes:

> It looks like the "./$$prog" in the "make check" portion needs to change.
> Personally, I'd suggest moving the contents of the "make check" rule into
> subversion/tests/do-check.sh and just call it from "make check" with the
> values of SVN_TESTS for its args.

I took the shortcut and didn't create new shell script.  It
prints `./stringtest' instead of `stringtest' so it's a
little bit ugly.

Index: subversion/tests/libsvn_subr/Makefile.am
===================================================================
RCS file: /cvs/subversion/subversion/tests/libsvn_subr/Makefile.am,v
retrieving revision 1.17
diff -u -r1.17 Makefile.am
--- subversion/tests/libsvn_subr/Makefile.am	2001/02/12 18:00:28	1.17
+++ subversion/tests/libsvn_subr/Makefile.am	2001/02/26 08:58:33
@@ -29,7 +29,7 @@
 ## Automatic tests run by `make check` -----------------------------
 
 ## A list of test-programs to run.  (Each program contains sub-tests.)
-SVN_TESTS = stringtest hashdump-test $(srcdir)/target-test.sh
+SVN_TESTS = ./stringtest ./hashdump-test $(srcdir)/target-test.sh
 
 ## Give the shell script along with the distribution
 EXTRA_DIST = target-test.sh
@@ -41,7 +41,7 @@
 	@for prog in $(SVN_TESTS); do \
 	  echo; \
 	  echo -n "Running all sub-tests in $$prog..."; \
-	  ./$$prog >> tests.log; \
+	  $$prog >> tests.log; \
 	  if [ $$? -eq 0 ]; \
 	  then \
 	     echo "SUCCESS"; \


-- 
Yoshiki Hayashi

Re: [PATCH] Trivial Makefile patch

Posted by Greg Stein <gs...@lyra.org>.
srcdir must be used here.

When you're building outside of the source tree, then srcdir points back to
the source tree for the .sh file. The current directory points to the built
files (such as stringtest and hashdump-test).

It looks like the "./$$prog" in the "make check" portion needs to change.
Personally, I'd suggest moving the contents of the "make check" rule into
subversion/tests/do-check.sh and just call it from "make check" with the
values of SVN_TESTS for its args.

Cheers,
-g

On Sat, Feb 24, 2001 at 04:14:22PM +0900, Yoshiki Hayashi wrote:
> If srcdir happens to be an absolute path, you'll get an
> error like this:
> 
> Running all sub-tests in stringtest...SUCCESS
> 
> Running all sub-tests in hashdump-test...SUCCESS
> 
> Running all sub-tests in
> /work/yoshiki/subversion/subversion/tests/libsvn_subr/target-test.sh.../bin/sh:
> .//work/yoshiki/subversion/subversion/tests/libsvn_subr/target-test.sh:
> No such file or directory
> 
> * Makefile.am (SVN_TESTS): Use only relative path.
> 
> Index: subversion/tests/libsvn_subr/Makefile.am
> ===================================================================
> RCS file: /cvs/subversion/subversion/tests/libsvn_subr/Makefile.am,v
> retrieving revision 1.17
> diff -u -r1.17 Makefile.am
> --- subversion/tests/libsvn_subr/Makefile.am	2001/02/12 18:00:28	1.17
> +++ subversion/tests/libsvn_subr/Makefile.am	2001/02/24 06:57:07
> @@ -29,7 +29,7 @@
>  ## Automatic tests run by `make check` -----------------------------
>  
>  ## A list of test-programs to run.  (Each program contains sub-tests.)
> -SVN_TESTS = stringtest hashdump-test $(srcdir)/target-test.sh
> +SVN_TESTS = stringtest hashdump-test target-test.sh
>  
>  ## Give the shell script along with the distribution
>  EXTRA_DIST = target-test.sh
> 
> -- 
> Yoshiki Hayashi

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