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

Re: [PATCH] test-lib: save test counts across invocations

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 1, 2011, 16:14 UTC
Message-ID
<7v62lcxmsd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<8fe5381a6b69079b8c20452fd4d99a128764dd52.1314882443.git.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
> Save the number of tests run ($test_count) in a file under
> test-counts/.  Then when sourcing test-lib.sh the next time, compare
> the timestamps.
... which is this logic ...
Show 10 quoted lines
> +test_count_file="$TEST_DIRECTORY"/test-counts/$(basename "$0" .sh)
> +test_count_saved=$(
> +	if [ -n "$test_disable_saved_count" ]; then
> +		:
> +	# the saved count is only valid if the file is newer than the test
> +	elif [ -f "$test_count_file" -a "$test_count_file" -nt "$0" ]; then
> +		cat "$test_count_file" 2>/dev/null
> +	fi
> +	# otherwise we leave the variable empty
> +)

I think the patch is cute, but I however do not think this is sufficient to catch prerequisite changes, unfortunately. I'd rather leave the total unknown than giving incorrect numbers.

Previous: Thomas RastNext: Jeff King
Message 2 of 6 in “test-lib: save test counts across invocations”
  1. test-lib: save test counts across invocationsThomas Rast, Sep 1, 2011
  2. Junio C HamanoSep 1, 2011
  3. Jeff KingSep 1, 2011
  4. Alex VandiverSep 1, 2011
  5. Jeff KingSep 1, 2011
  6. Thomas RastSep 2, 2011

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.