[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] breakage2tst.py tweak
From: |
Gunnar Farnebäck |
Subject: |
Re: [gnugo-devel] breakage2tst.py tweak |
Date: |
Thu, 06 Jan 2005 05:55:47 +0100 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI) |
Arend wrote:
> Instead of running a separate test file continaing the changed tests, it
> seems more convenient to me to invoke regress.pike with the relevant
> test cases as arguments (as in
> ./regress.pike nngs1.tst:27 strategy.tst:13 endgame.tst:840 ...)
If your breakage was produced by regress.pike it may be even more
convenient to just feed it back to regress.pike using the -f option...
...except that it doesn't work with an uncleaned breakage file. But
after this patch it does.
- regress.pike revised so that previous output can be used as input
with -f to rerun tests with unexpected results
/Gunnar
Index: regression/regress.pike
===================================================================
RCS file: /cvsroot/gnugo/gnugo/regression/regress.pike,v
retrieving revision 1.9
diff -u -r1.9 regress.pike
--- regression/regress.pike 27 May 2004 00:17:23 -0000 1.9
+++ regression/regress.pike 6 Jan 2005 04:47:41 -0000
@@ -351,10 +351,13 @@
string tests)
{
string suite, numbers;
- if (sscanf(tests, "%s:%s", suite, numbers) != 2) {
+ if (sscanf(tests, "%[^ :]:%s", suite, numbers) != 2) {
suite = tests;
numbers = "";
}
+
+ if (has_value(suite, " "))
+ return "";
if (!has_suffix(suite, ".tst"))
suite += ".tst";
@@ -458,6 +461,8 @@
foreach (argv, string tests)
testsuites |= ({parse_tests(partial_testsuites, tests)});
+ testsuites -= ({""});
+
if (sizeof(testsuites) == 0) {
string makefile = Stdio.read_file("Makefile.am");
foreach (makefile / "\n", string s) {