From: Cheng Zhao Date: Fri, 19 Jul 2013 02:41:24 +0000 (+0800) Subject: [Win] Pass relative path in the test script. X-Git-Tag: v0.1.4~10 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=99c37fc90220912779ba74ab11b4213fa746e28d;p=electron.git [Win] Pass relative path in the test script. Parameter starting with '/' could be thought as switches under Windows. --- diff --git a/script/test.py b/script/test.py index 659c2528..dd9842fd 100755 --- a/script/test.py +++ b/script/test.py @@ -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__':