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

[PATCH] Descriptive error msg if Python not found on 'make check'

From: Blake Nicholson <svn_at_seraphinandblake.com>
Date: 2004-08-17 04:41:58 CEST

What would people think of generating a descriptive error message if a
user attempts to execute 'make check' when they don't have Python
installed? I realize the INSTALL file states that Python is required
to run make check, but with the patch below 'make check' will exit more
gracefully and remind the end user that Python is required.

Any takers?

Blake

Log:
Added descriptive error message to output of 'make check' if Python is
not found.

* Makefile.in
   (check): If $(PYTHON) does not equal "none", run test suite as before.
   Otherwise print message indicating Python could not be found.

Index: Makefile.in
===================================================================
--- Makefile.in (revision 10665)
+++ Makefile.in (working copy)
@@ -335,20 +335,25 @@
  # "make check TESTS=subversion/tests/clients/cmdline/basic_tests.py"
  # will perform only basic tests (likewise for other tests).
  check: $(TEST_DEPS) @BDB_TEST_DEPS@
- @$(PYTHON) $(top_srcdir)/build/pycheck.py; \
- flags="--verbose"; \
- if test "$(CLEANUP)" != ""; then \
- flags="--cleanup $$flags"; \
- fi; \
- if test "$(BASE_URL)" != ""; then \
- flags="--url $(BASE_URL) $$flags"; \
- fi; \
- if test "$(FS_TYPE)" != ""; then \
- flags="--fs-type $(FS_TYPE) $$flags"; \
- fi; \
- $(PYTHON) $(top_srcdir)/build/run_tests.py $$flags \
- '$(abs_srcdir)' '$(abs_builddir)' '$(PYTHON)' '$(SHELL)' \
- $(TESTS)
+ @if test "$(PYTHON)" != "none"; then \
+ $(PYTHON) $(top_srcdir)/build/pycheck.py; \
+ flags="--verbose"; \
+ if test "$(CLEANUP)" != ""; then \
+ flags="--cleanup $$flags"; \
+ fi; \
+ if test "$(BASE_URL)" != ""; then \
+ flags="--url $(BASE_URL) $$flags"; \
+ fi; \
+ if test "$(FS_TYPE)" != ""; then \
+ flags="--fs-type $(FS_TYPE) $$flags"; \
+ fi; \
+ $(PYTHON) $(top_srcdir)/build/run_tests.py $$flags \
+ '$(abs_srcdir)' '$(abs_builddir)' '$(PYTHON)' '$(SHELL)' \
+ $(TESTS); \
+ else \
+ echo "make check: Python not found"; \
+ echo "Please install Python 2.0 or greater"; \
+ fi;

  # First, set up Apache as documented in
  # subversion/tests/clients/cmdline/README.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 17 04:37:34 2004

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.