git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t/t5800-remote-testpy: skip all tests if not built

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 18, 2013, 20:06 UTC
Message-ID
<1371586006-16289-1-git-send-email-artagnon@gmail.com>

416fda6 (build: do not install git-remote-testpy, 2013-05-24) added git-remote-testpy to NO_INSTALL, with the intent of excluding it from the default install. This is typically meant for scripts in contrib/ with their own testsuite and Makefile (e.g. git remote-bzr, git remote-hg). Unfortunately, git-remote-testpy.py is a toplevel script without its own Makefile; its testsuite is located in t/t5800-remote-testpy.sh.

What this means is that git-remote-testpy is not built by default (when 'make' is invoked), but t5800 runs by default (like every other test in t/). As a result, a new contributor cloning git.git and running 'make test' for the first time will notice test failures. Fix this unpleasantness by patching t5800 to check for git-remote-testpy as a prerequisite.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 Candidate for maint?
 t/t5800-remote-testpy.sh | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/t/t5800-remote-testpy.sh b/t/t5800-remote-testpy.sh
index 1e683d4..9df35b5 100755
--- a/t/t5800-remote-testpy.sh
+++ b/t/t5800-remote-testpy.sh
@@ -12,6 +12,11 @@ if ! test_have_prereq PYTHON ; then
 	test_done
 fi
 
+if ! test -e "$GIT_BUILD_DIR/git-remote-testpy"; then
+	skip_all='skipping python remote-helper tests, git-remote-testpy not built'
+	test_done
+fi
+
 "$PYTHON_PATH" -c '
 import sys
 if sys.hexversion < 0x02040000:
-- 
1.8.3.1.379.g1f0e7d7
Next: Junio C Hamano
Message 1 of 6 in “t/t5800-remote-testpy: skip all tests if not built”
  1. t/t5800-remote-testpy: skip all tests if not builtRamkumar Ramachandra, Jun 18, 2013
  2. Junio C HamanoJun 18, 2013
  3. Ramkumar RamachandraJun 18, 2013
  4. Jeff KingJun 21, 2013
  5. Ramkumar RamachandraJun 21, 2013
  6. Jeff KingJun 21, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.