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

Re: Test case confusion.

From: <cmpilato_at_collab.net>
Date: 2001-12-07 22:00:35 CET

Mo DeJong <supermo@bayarea.net> writes:

> A call like:
>
> sbox = sandbox(basic_status)
>
> Will return a string like "basic_tests-0" which will be used to
> create a unique name for the repo and checkout dirs for the test
> case. Why would we want to do that instead of just assuming that
> each test function has a globally unique name and using the test
> name as the dir name?
>
> The current implementation makes it hard to map from the directory
> names in subversion/tests/clients/cmdline/repositories to the actual
> test cases. You need to manually count the number of entries in the
> test_list to find the right one.

Nah, just run './basic_tests.py list' and see which function
description matches the one that concerns you.

> The other problem I am having has to do with running a single test from the
> make check command line. The make check rule start off like so:
>
> check: $(TEST_DEPS) @FS_TEST_DEPS@
> @logfile=`pwd`/tests.log ; \
> echo > $$logfile ; \
> failed=no ; \
> list='$(TEST_PROGRAMS) @FS_TEST_PROGRAMS@'; for prog in $$list; do \
>
> So, I can run a single test case from the command line by doing this:
>
> make check TEST_PROGRAMS="" \
> FS_TEST_PROGRAMS="subversion/tests/clients/cmdline/basic_tests.py"
>
> As you can see, that is quite a bother. What if we made a small change
> to the Makefile so that is easier?
>
> % make check TESTS="subversion/tests/clients/cmdline/basic_tests.py"
>
> It could be implemented something like this (not a real patch)
>
> Index: Makefile.in
> -----------------------
> +# Users can run 'make check TESTS=...' from the command line to run
> +# a single test or set of tests
> +TESTS = $(TEST_PROGRAMS) @FS_TEST_PROGRAMS@
> +
> check: $(TEST_DEPS) @FS_TEST_DEPS@
> @logfile=`pwd`/tests.log ; \
> echo > $$logfile ; \
> failed=no ; \
> - list='$(TEST_PROGRAMS) @FS_TEST_PROGRAMS@'; for prog in $$list; do \
> + list='$(TESTS)'; for prog in $$list; do \

This all seems reasonably. Makes sense to have single variable
containing all the tests so long as we don't do anything different in
TEST_DEPS vs. FS_TEST_DEPS.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:51 2006

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.