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

Re: [PATCH] Ensure test-genrandom availability for t5301/t5302

From
Junio C Hamano <junkio@cox.net>
Date
Apr 28, 2007, 22:32 UTC
Message-ID
<7v3b2kjfji.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<4633A47A.4020508@cswitch.com>
Dana How <how@cswitch.com> writes:
Show 33 quoted lines
> Check for this as well as test-chmtime in test-lib.sh
>
> Signed-off-by: Dana L. How <danahow@gmail.com>
> ---
>  t/test-lib.sh |   13 ++++++++-----
>  1 files changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index f2c6bd3..d7838fc 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -268,11 +268,14 @@ test -d ../templates/blt || {
>  	error "You haven't built things yet, have you?"
>  }
>  
> -if ! test -x ../test-chmtime; then
> -	echo >&2 'You need to build test-chmtime:'
> -	echo >&2 'Run "make test-chmtime" in the source (toplevel) directory'
> -	exit 1
> -fi
> +for prog in test-chmtime test-genrandom
> +do
> +	if ! test -x ../$prog; then
> +		echo >&2 "You need to build $prog:"
> +		echo >&2 "Run \"make $prog\" in the source (toplevel) directory"
> +		exit 1
> +	fi
> +done
>  
>  # Test repository
>  test=trash
> -- 
> 1.5.2.rc0.71.g4342-dirty

As these two are very small programs, why not always build them upon "make all", like this?

---
 Makefile |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 60c41fd..817f8ef 100644
--- a/Makefile
+++ b/Makefile
@@ -933,13 +933,17 @@ endif
 
 ### Testing rules
 
+TEST_PROGRAMS = test-chmtime$X test-genrandom$X
+
+all:: $(TEST_PROGRAMS)
+
 # GNU make supports exporting all variables by "export" without parameters.
 # However, the environment gets quite big, and some programs have problems
 # with that.
 
 export NO_SVN_TESTS
 
-test: all test-chmtime$X test-genrandom$X
+test: all
 	$(MAKE) -C t/ all
 
 test-date$X: test-date.c date.o ctype.o
Previous: Dana HowNext: Dana How
Message 2 of 4 in “Ensure test-genrandom availability for t5301/t5302”
  1. Ensure test-genrandom availability for t5301/t5302Dana How, Apr 28, 2007
  2. Junio C HamanoApr 28, 2007
  3. Dana HowApr 28, 2007
  4. Junio C HamanoApr 28, 2007

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.