Bug 496362 -- Get Mozmill tests working on Windows and Linux. Linux parts by Andrew Sutherland <bugmail@asutherland.org>. r=Standard8
authorSiddharth Agarwal <sid.bugzilla@gmail.com>
Mon, 08 Jun 2009 20:35:22 +0530
changeset 2801 5b2668daf4de2bf3a790806be7e24faf57efcaf9
parent 2800 8cc20299e7c32a58c4c9a0b2b23e2429dc0e5b2a
child 2802 c64d9a572e6e37352f8885fb2abf1476844152df
push idunknown
push userunknown
push dateunknown
reviewersStandard8
bugs496362
Bug 496362 -- Get Mozmill tests working on Windows and Linux. Linux parts by Andrew Sutherland <bugmail@asutherland.org>. r=Standard8
mail/test/mozmill/runtest.py
--- a/mail/test/mozmill/runtest.py
+++ b/mail/test/mozmill/runtest.py
@@ -121,20 +121,24 @@ class ThunderTestProfile(mozrunner.Thund
         sys.path.append(self.automation_dir)
         import automation
 
         self.profile_dir = os.path.join(self.obj_dir, 'mozilla',
                                         '_tests', 'leakprofile')
         # XXX tidy up
         if automation.IS_MAC:
             self.bin_dir = os.path.join(self.obj_dir, 'mozilla', 'dist', 'ShredderDebug.app', 'Contents', 'MacOS')
+            appname = 'thunderbird-bin'
         else:
             self.bin_dir = os.path.join(self.obj_dir, 'mozilla', 'dist', 'bin')
+            appname = 'thunderbird'
+            if automation.IS_WIN32:
+                appname += '.exe'
 
-        self.app_path = os.path.join(self.bin_dir, 'thunderbird-bin')
+        self.app_path = os.path.join(self.bin_dir, appname)
 
         self.base_test_dir = os.getcwd()
 
 
     def find_src_dir(self):
         curdir = os.getcwd()
         while not os.path.isdir(os.path.join(curdir, '.hg')):
             curdir, olddir = os.path.split(curdir)
@@ -144,17 +148,17 @@ class ThunderTestProfile(mozrunner.Thund
 
     def find_obj_dir(self):
         if 'MOZCONFIG' in os.environ:
             mozconfig_path = os.environ['MOZCONFIG']
         else:
             mozconfig_path = os.path.join(self.src_dir, '.mozconfig.mk')
 
         guess_path = os.path.join(self.src_dir, 'mozilla/build/autoconf/config.guess')
-        config_guess = os.popen(guess_path).read()
+        config_guess = os.popen("sh " + guess_path).read()
         config_guess = config_guess.strip()
         f = open(mozconfig_path, 'rt')
         for line in f:
             if 'MOZ_OBJDIR' in line:
                 varpath = line.split('=')[1].strip()
                 varpath = varpath.replace('@TOPSRCDIR@', self.src_dir)
                 varpath = varpath.replace('$(TOPSRCDIR)', self.src_dir)
                 varpath = varpath.replace('@CONFIG_GUESS@',config_guess)