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

[PATCH] t9600-cvsimport.sh: set HOME before checking for cvsps availability

From
Gerrit Pape <pape@smarden.org>
Date
Mar 26, 2008, 17:34 UTC
Message-ID
<20080326173420.16383.qmail@4b0e1e5c705f62.315fe32.mid.smarden.org>
From: Frank Lichtenheld <djpig@debian.org>

This actually sounds like a bug in cvsps, which requires an existing home directory when asked for the usage through -h

 $ HOME=/nonexistent cvsps -h
 Cannot create the cvsps directory '.cvsps': No such file or directory

This made t9600 think that cvsps is not available if HOME did not exist, causing the tests to be skipped

 $ HOME=/nonexistent sh t9600-cvsimport.sh
 * skipping cvsimport tests, cvsps not found
 * passed all 0 test(s)

Now t9600 sets HOME to the current working directory before checking for the availability of the cvsps program.

This issue has been discovered by Marco Rodrigues, and fixed by Frank
Lichtenheld through
 http://bugs.debian.org/471969
Signed-off-by: Gerrit Pape <pape@smarden.org>
---
 t/t9600-cvsimport.sh |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index 7706430..00a74ee 100755
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
@@ -3,6 +3,12 @@
 test_description='git-cvsimport basic tests'
 . ./test-lib.sh
 
+CVSROOT=$(pwd)/cvsroot
+export CVSROOT
+# for clean cvsps cache
+HOME=$(pwd)
+export HOME
+
 if ! type cvs >/dev/null 2>&1
 then
 	say 'skipping cvsimport tests, cvs not found'
@@ -26,12 +32,6 @@ case "$cvsps_version" in
 	;;
 esac
 
-CVSROOT=$(pwd)/cvsroot
-export CVSROOT
-# for clean cvsps cache
-HOME=$(pwd)
-export HOME
-
 test_expect_success 'setup cvsroot' 'cvs init'
 
 test_expect_success 'setup a cvs module' '
-- 
1.5.4.4
Next: Junio C Hamano
Message 1 of 4 in “t9600-cvsimport.sh: set HOME before checking for cvsps availability”
  1. t9600-cvsimport.sh: set HOME before checking for cvsps availabilityGerrit Pape, Mar 26, 2008
  2. Junio C HamanoMar 26, 2008
  3. Jeff KingMar 27, 2008
  4. Johannes SchindelinMar 27, 2008

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.