From 0490bf52534ea2a7ba3d6eecf2fd0d9379cd0c85 Mon Sep 17 00:00:00 2001 From: "Callek%gmail.com" Date: Fri, 1 Aug 2008 16:04:17 +0000 Subject: [PATCH] Bug 448416, Buildbotcustom should have leakThreshold option for Mochitests r=bhearsum, r=lsblakk git-svn-id: svn://10.0.0.236/trunk@253355 18797224-902f-48f8-a5cc-f745e15eee43 --- .../tools/buildbotcustom/unittest/steps.py | 42 ++++++++++++++++--- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/mozilla/tools/buildbotcustom/unittest/steps.py b/mozilla/tools/buildbotcustom/unittest/steps.py index 0e0bf95512f..4cf0dfff57c 100644 --- a/mozilla/tools/buildbotcustom/unittest/steps.py +++ b/mozilla/tools/buildbotcustom/unittest/steps.py @@ -301,7 +301,12 @@ class MozillaMochitest(ShellCommandReportTimeout): "--autorun", "--console-level=INFO", "--close-when-done"] - + + def __init__(self, leakThreshold=None, **kwargs): + if leakThreshold: + self.command.append("--leak-threshold=" + leakThreshold) + ShellCommandReportTimeout.__init__(self, **kwargs) + def createSummary(self, log): passCount = 0 failCount = 0 @@ -333,7 +338,12 @@ class MozillaMochitest(ShellCommandReportTimeout): return SUCCESS class MozillaWin32Mochitest(MozillaMochitest): - command = ['python runtests.py --appname=..\\..\\..\\dist\\bin\\firefox.exe --autorun --console-level=INFO --close-when-done'] + command = ["python", + "runtests.py", + "--appname=..\\..\\..\\dist\\bin\\firefox.exe", + "--autorun", + "--console-level=INFO", + "--close-when-done"] class MozillaOSXMochitest(MozillaMochitest): command = ["python", @@ -356,6 +366,11 @@ class MozillaMochichrome(ShellCommandReportTimeout): "--console-level=INFO", "--close-when-done"] + def __init__(self, leakThreshold=None, **kwargs): + if leakThreshold: + self.command.append("--leak-threshold=" + leakThreshold) + ShellCommandReportTimeout.__init__(self, **kwargs) + def createSummary(self, log): passCount = 0 failCount = 0 @@ -388,7 +403,13 @@ class MozillaMochichrome(ShellCommandReportTimeout): class MozillaWin32Mochichrome(MozillaMochichrome): - command = ['python runtests.py --appname=..\\..\\..\\dist\\bin\\firefox.exe --chrome --autorun --console-level=INFO --close-when-done'] + command = ["python", + "runtests.py", + "--appname=..\\..\\..\\dist\\bin\\firefox.exe", + "--chrome", + "--autorun", + "--console-level=INFO", + "--close-when-done"] class MozillaOSXMochichrome(MozillaMochichrome): command = ["python", @@ -397,8 +418,7 @@ class MozillaOSXMochichrome(MozillaMochichrome): "--chrome", "--autorun", "--console-level=INFO", - "--close-when-done", - "--leak-threshold=8"] + "--close-when-done"] class MozillaBrowserChromeTest(ShellCommandReportTimeout): name = "browser chrome test" @@ -412,6 +432,11 @@ class MozillaBrowserChromeTest(ShellCommandReportTimeout): "--browser-chrome", "--close-when-done"] + def __init__(self, leakThreshold=None, **kwargs): + if leakThreshold: + self.command.append("--leak-threshold=" + leakThreshold) + ShellCommandReportTimeout.__init__(self, **kwargs) + def createSummary(self, log): passCount = 0 failCount = 0 @@ -441,7 +466,12 @@ class MozillaBrowserChromeTest(ShellCommandReportTimeout): return SUCCESS class MozillaWin32BrowserChromeTest(MozillaBrowserChromeTest): - command = ['python runtests.py --appname=..\\..\\..\\dist\\bin\\firefox.exe --autorun --browser-chrome --close-when-done'] + command = ["python", + "runtests.py", + "--appname=..\\..\\..\\dist\\bin\\firefox.exe", + "--autorun", + "--browser-chrome", + "--close-when-done"] class MozillaOSXBrowserChromeTest(MozillaBrowserChromeTest): command = ["python",