You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mo DeJong <su...@bayarea.net> on 2001/12/06 00:08:24 UTC

Patch to remove chmod hack in Makefile.

Here is a patch that gets rid of the chmod have in the Makefile and fixes
a bug in the grep pattern.

cheers
Mo DeJong

2001-12-05  Mo DeJong  <su...@bayarea.net>

	* Makefile.in:
	Remove nasty chmod +x hack. Run scripts using either
	python or sh and exec programs that are executable.
	Change grep pattern to "\\.sh$$" so that it gets
	passed to grep as "\.sh$". Move printing of warning
	when tests fails to end of test run.

Index: Makefile.in
===================================================================
--- .svn/text-base/Makefile.in.svn-base	Wed Dec  5 06:57:05 2001
+++ Makefile.in	Wed Dec  5 15:29:36 2001
@@ -111,34 +111,35 @@
 
 local-install: @INSTALL_RULES@
 
-### the chmod really sucks, but some repository files don't have it like
-### they should ...
 check: $(TEST_DEPS) @FS_TEST_DEPS@
 	@logfile=`pwd`/tests.log ; \
 	echo > $$logfile ; \
 	failed=no ; \
 	list='$(TEST_PROGRAMS) @FS_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  \
+	    if echo $$progbase | grep \\.py$$ > /dev/null; then  \
 		runprog="$(PYTHON) $$progbase" ; \
-	    else  \
+	    elif echo $$progbase | grep \\.sh$$ > /dev/null; then  \
+		runprog="$(SHELL) $$progbase" ; \
+	    elif test -x $$prog ; then \
 		runprog="./$$progbase" ; \
+	    else  \
+		echo "Don't know what to do about $$progbase" ; \
+		exit 1 ; \
 	    fi ; \
 	    if ( cd $$progdir && $$runprog ) >> $$logfile ; then \
 		echo "SUCCESS" ; \
 	    else \
 		failed=yes; \
-		echo "FAILED" ; \
-		echo "--- at least one test FAILED, check tests.log." ; \
 	    fi; \
 	    echo "END: $$progbase" >> $$logfile ; \
 	    echo >> $$logfile ; \
 	done ; \
 	if test "$$failed" = "yes"; then \
+	    echo "at least one test FAILED, checking tests.log." ; \
 	    grep FAIL $$logfile || true ; \
 	fi
 

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