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

Patch to remove chmod hack in Makefile.

From: Mo DeJong <supermo_at_bayarea.net>
Date: 2001-12-06 01:08:24 CET

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 <supermo@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
Received on Sat Oct 21 14:36:51 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.