From 4f44e0d9623cf9fbbf1f9f99d2723841720e5526 Mon Sep 17 00:00:00 2001 From: Jonathan Watt Date: Tue, 14 Jun 2011 13:56:13 +0100 Subject: [PATCH] Bug 663371 - Make runreftests.py default to appending reftest.list to the test path when only a test directory is specified. r=ted. --- layout/tools/reftest/runreftest.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/layout/tools/reftest/runreftest.py b/layout/tools/reftest/runreftest.py index 63e5122e1701..ee2d522ecd11 100644 --- a/layout/tools/reftest/runreftest.py +++ b/layout/tools/reftest/runreftest.py @@ -63,7 +63,12 @@ class RefTest(object): def getManifestPath(self, path): "Get the path of the manifest, and for remote testing this function is subclassed to point to remote manifest" - return self.getFullPath(path) + path = self.getFullPath(path) + if os.path.isdir(path): + defaultManifestPath = os.path.join(path, 'reftest.list') + if os.path.exists(defaultManifestPath): + path = defaultManifestPath + return path def createReftestProfile(self, options, profileDir, server='localhost'): "Sets up a profile for reftest." @@ -130,7 +135,7 @@ class RefTest(object): if profileDir: shutil.rmtree(profileDir) - def runTests(self, manifest, options): + def runTests(self, testPath, options): debuggerInfo = getDebuggerInfo(self.oldcwd, options.debugger, options.debuggerArgs, options.debuggerInteractive); @@ -148,7 +153,7 @@ class RefTest(object): # then again to actually run reftest self.automation.log.info("REFTEST INFO | runreftest.py | Running tests: start.\n") - reftestlist = self.getManifestPath(manifest) + reftestlist = self.getManifestPath(testPath) status = self.automation.runApp(None, browserEnv, options.app, profileDir, ["-reftest", reftestlist], utilityPath = options.utilityPath,