[PATCH] Several fixes to dg_test.py
Nathaniel Smith
njs at pobox.com
Wed Mar 3 05:39:50 UTC 2004
This is a docstring fix, plus some tweaks to improve DejaGNU
compatibility in output.
-- Nathaniel
--
"Lull'd in the countless chambers of the brain,
Our thoughts are link'd by many a hidden chain:
Awake but one, and lo! what myriads rise!
Each stamps its image as the other flies"
-- Ann Ward Radcliffe, The Mysteries of Udolpho
-------------- next part --------------
? results.qmr
? qm/external/__init__.pyc
? tests/regress/QMTest/regression_database.pyc
? tests/regress/QMTest/selftest.pyc
? tests/regress/tuple1/QMTest/tuple_test.pyc
? tests/results_files/QMTest/results_file_database.pyc
? tests/results_files/QMTest/results_file_test.pyc
Index: ChangeLog
===================================================================
RCS file: /home/qm/Repository/qm/ChangeLog,v
retrieving revision 1.611
diff -u -r1.611 ChangeLog
--- ChangeLog 3 Mar 2004 05:12:58 -0000 1.611
+++ ChangeLog 3 Mar 2004 05:39:41 -0000
@@ -1,3 +1,11 @@
+2004-01-14 Nathaniel Smith <njs at codesourcery.com>
+
+ * qm/test/classes/dg_test.py (DGTest._RunDGTest): Fix formatting
+ of paths to match DejaGNU.
+ (DGTest._DGBogus): Fix copy/paste error in docstring.
+ (DGTest.__ExpectDiagnostic): Use "" rather than 'None' to denote
+ empty comment, to match DejaGNU.
+
2004-03-02 Nathaniel Smith <njs at codesourcery.com>
* qm/test/classes/explicit_suite.py (arguments): Fix formatting
Index: qm/test/classes/dg_test.py
===================================================================
RCS file: /home/qm/Repository/qm/qm/test/classes/dg_test.py,v
retrieving revision 1.3
diff -u -r1.3 dg_test.py
--- qm/test/classes/dg_test.py 23 Jun 2003 06:46:47 -0000 1.3
+++ qm/test/classes/dg_test.py 3 Mar 2004 05:39:41 -0000
@@ -127,7 +127,8 @@
if path.startswith(root):
self._name = path[len(root) + 1:]
else:
- self._name = os.path.basename(path)
+ # We prepend "./" for compatibility with DejaGNU.
+ self._name = os.path.join(".", os.path.basename(path))
for l in open(path).xreadlines():
line_num += 1
m = self.__dg_command_regexp.search(l)
@@ -345,7 +346,7 @@
def _DGbogus(self, line_num, args, context):
- """Emulate the 'dg-warning' command.
+ """Emulate the 'dg-bogus' command.
'line_num' -- The number at which the command was found.
@@ -417,7 +418,7 @@
if len(args) >= 2:
comment = args[1]
else:
- comment = None
+ comment = ""
self._diagnostics.append((line_num, kind, expectation,
args[0], comment))
More information about the qmtest
mailing list