]> khamidou — GitHub mirrors - electron.git/commitdiff
[Win] Pass relative path in the test script.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 19 Jul 2013 02:41:24 +0000 (10:41 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 19 Jul 2013 02:41:24 +0000 (10:41 +0800)
Parameter starting with '/' could be thought as switches under Windows.

script/test.py

index 659c2528b08c22d96de13d07282898a21fa678bf..dd9842fdecf3b9029485f054b7c04c90a50e3880 100755 (executable)
@@ -9,13 +9,15 @@ SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
 
 
 def main():
+  os.chdir(SOURCE_ROOT)
+
   if sys.platform == 'darwin':
     atom_shell = os.path.join(SOURCE_ROOT, 'out', 'Debug', 'Atom.app',
                               'Contents', 'MacOS', 'Atom')
   else:
     atom_shell = os.path.join(SOURCE_ROOT, 'out', 'Debug', 'atom.exe')
 
-  subprocess.check_call([atom_shell, os.path.join(SOURCE_ROOT, 'spec')])
+  subprocess.check_call([atom_shell, 'spec'])
 
 
 if __name__ == '__main__':