[PATCH] Fixes to qmtest_gcc
Nathaniel Smith
njs at pobox.com
Tue Feb 24 06:55:53 UTC 2004
Attached patch collects a number of fixes to the qmtest_gcc module,
updating it to work with modern QMTest and modern gcc, fixing some
typoes, fixing some inconsistencies with DejaGNU output, etc.
-- Nathaniel
--
- Don't let your informants burn anything.
- Don't grow old.
- Be good grad students.
-- advice of Murray B. Emeneau on the occasion of his 100th birthday
-------------- next part --------------
? MT
Index: compat_test.py
===================================================================
RCS file: /home/qm/Repository/qmtest_gcc/compat_test.py,v
retrieving revision 1.4
diff -u -r1.4 compat_test.py
--- compat_test.py 12 Jun 2003 23:43:00 -0000 1.4
+++ compat_test.py 24 Feb 2004 06:29:31 -0000
@@ -36,6 +36,9 @@
the first match group gives special options that should be used to
run the test-case."""
+ dejagnu_file_prefix = None
+ """The prefix a real DejaGNU test uses for its filenames."""
+
def Run(self, context, result):
self._SetUp(context)
@@ -59,6 +62,8 @@
src3 = src1.replace("_main", "_y")
temp_dir = context.GetTemporaryDirectory()
+ result["compat_test_dejagnu_prefix"] = self.dejagnu_file_prefix
+ result["compat_test_qmtest_prefix"] = temp_dir + os.path.sep
obj1 = os.path.join(temp_dir, "main_tst.o")
obj2_tst = os.path.join(temp_dir, "x_tst.o")
obj2_alt = os.path.join(temp_dir, "x_alt.o")
@@ -211,12 +216,14 @@
class GCCCompatTest(CompatTest, GCCTestBase):
"""A 'GPPCompatTest' emulates a GCC 'compat.exp' test."""
- pass
+ dejagnu_file_prefix = "c_compat_"
class GPPCompatTest(CompatTest, GPPTestBase):
"""A 'GPPCompatTest' emulates a G++ 'compat.exp' test."""
+
+ dejagnu_file_prefix = "cp_compat_"
def _GetTargetEnvironment(self, context):
Index: debug_test.py
===================================================================
RCS file: /home/qm/Repository/qmtest_gcc/debug_test.py,v
retrieving revision 1.1
diff -u -r1.1 debug_test.py
--- debug_test.py 2 Jun 2003 21:08:50 -0000 1.1
+++ debug_test.py 24 Feb 2004 06:29:31 -0000
@@ -29,9 +29,7 @@
########################################################################
class DebugInit(Resource, DejaGNUBase, GCCTestBase):
- """A 'DebugInit' stores information for debugging tests.
-
- Every G++ debugging test depends on a 'GPPDebugInit' resource."""
+ """A 'DebugInit' stores information for debugging tests."""
OPTIONS_TAG = None
"""This context property indicates what debugging options are available.
Index: dg_pch_test.py
===================================================================
RCS file: /home/qm/Repository/qmtest_gcc/dg_pch_test.py,v
retrieving revision 1.2
diff -u -r1.2 dg_pch_test.py
--- dg_pch_test.py 6 Jun 2003 21:31:36 -0000 1.2
+++ dg_pch_test.py 24 Feb 2004 06:29:31 -0000
@@ -94,7 +94,7 @@
self._RecordDejaGNUOutcome(result,
self.UNTESTED,
self._name + " " + o)
- message = self._name + " " + o + " assembly comparision"
+ message = self._name + " " + o + " assembly comparison"
self._RecordDejaGNUOutcome(result, assembly_outcome, message)
Index: dg_tls_test.py
===================================================================
RCS file: /home/qm/Repository/qmtest_gcc/dg_tls_test.py,v
retrieving revision 1.1
diff -u -r1.1 dg_tls_test.py
--- dg_tls_test.py 6 Jun 2003 21:31:36 -0000 1.1
+++ dg_tls_test.py 24 Feb 2004 06:29:31 -0000
@@ -21,7 +21,6 @@
from gcc_dg_test import GCCDGTest
from gpp_dg_test import GPPDGTest
from gpp_test_base import GPPTestBase
-from gpp_tls_init import GPPTLSInit
from qm.test.result import Result
from qm.test.resource import Resource
import os
Index: gcc_database.py
===================================================================
RCS file: /home/qm/Repository/qmtest_gcc/gcc_database.py,v
retrieving revision 1.12
diff -u -r1.12 gcc_database.py
--- gcc_database.py 23 Jun 2003 06:34:04 -0000 1.12
+++ gcc_database.py 24 Feb 2004 06:29:31 -0000
@@ -18,12 +18,12 @@
import fnmatch
import os
import qm
+import qm.test.base
from qm.attachment import Attachment, FileAttachmentStore
from qm.test.database import ResourceDescriptor, TestDescriptor
from qm.test.file_database import FileDatabase
from qm.test.directory_suite import DirectorySuite
from qm.test.runnable import Runnable
-from qm.test.suite import Suite
########################################################################
# Classes
@@ -163,12 +163,19 @@
def GetSuite(self, suite_id):
+ suite_class = qm.test.base.get_extension_class(
+ "explicit_suite.ExplicitSuite", "suite", self)
+ extras = { suite_class.EXTRA_DATABASE: self,
+ suite_class.EXTRA_ID: suite_id }
+ arguments = { "is_implicit": 1,
+ "test_ids": [] }
+
if suite_id == "g++":
- return Suite(self, suite_id, implicit = 1,
- suite_ids = ["g++.dg", "g++.old-deja"])
+ arguments["suite_ids"] = ["g++.dg", "g++.old-deja"]
+ return suite_class(arguments, **extras)
elif suite_id == "gcc":
- return Suite(self, suite_id, implicit = 1,
- suite_ids = ["gcc.dg"])
+ arguments["suite_ids"] = ["gcc.dg"]
+ return suite_class(arguments, **extras)
return super(GCCDatabase, self).GetSuite(suite_id)
Index: gpp_init.py
===================================================================
RCS file: /home/qm/Repository/qmtest_gcc/gpp_init.py,v
retrieving revision 1.5
diff -u -r1.5 gpp_init.py
--- gpp_init.py 6 Jun 2003 21:31:36 -0000 1.5
+++ gpp_init.py 24 Feb 2004 06:29:31 -0000
@@ -76,7 +76,9 @@
# Run "testsuite_flags" to figure out which -I options to use
# when running tests.
- command = [os.path.join(v3_directory, "testsuite_flags"),
+ command = [os.path.join(v3_directory,
+ "scripts",
+ "testsuite_flags"),
"--build-includes"]
result["GPPInit.testsuite_flags_command"] \
= "<pre>" + " ".join(command) + "</pre>"
Index: gpp_test_base.py
===================================================================
RCS file: /home/qm/Repository/qmtest_gcc/gpp_test_base.py,v
retrieving revision 1.1
diff -u -r1.1 gpp_test_base.py
--- gpp_test_base.py 2 Jun 2003 21:08:50 -0000 1.1
+++ gpp_test_base.py 24 Feb 2004 06:29:31 -0000
@@ -25,7 +25,7 @@
class GPPTestBase(GCCTestBase):
"""A 'GPPTestBase' is a base for all G++ tests.
- This class emulates functional in 'g++.exp' in the GCC
+ This class emulates functionality in 'g++.exp' in the GCC
testsuite."""
_language = "cplusplus"
More information about the qmtest
mailing list