OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2014 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2014 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | |
6 """Test of Google I/O 2014 tutorial.""" | 5 """Test of Google I/O 2014 tutorial.""" |
7 | 6 |
8 import os | 7 import os |
9 import sys | 8 import sys |
10 | 9 |
11 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) | 10 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) |
12 sys.path.append(os.path.join(SCRIPT_DIR, '../..')) | 11 sys.path.append(os.path.join(SCRIPT_DIR, '../..')) |
13 SRC_DIR = os.path.dirname(os.path.dirname(SCRIPT_DIR)) | 12 SRC_DIR = os.path.dirname(os.path.dirname(SCRIPT_DIR)) |
14 TOOLCHAIN = os.environ.get('TOOLCHAIN', 'newlib') | 13 TOOLCHAIN = os.environ.get('TOOLCHAIN', 'newlib') |
15 DEVENV_OUT_DIR = os.path.join(SRC_DIR, 'out/publish/devenv', TOOLCHAIN) | 14 DEVENV_OUT_DIR = os.path.join(SRC_DIR, 'out/publish/devenv', TOOLCHAIN) |
16 | 15 |
17 import chrome_test | 16 import chrome_test |
18 | 17 |
19 | 18 |
20 app = os.path.join(DEVENV_OUT_DIR, 'app') | 19 app = os.path.join(DEVENV_OUT_DIR, 'app') |
21 test_dir = os.path.join(SCRIPT_DIR, 'tests') | 20 test_dir = os.path.join(SCRIPT_DIR, 'tests') |
22 | 21 |
23 chrome_test.Main([ | 22 chrome_test.Main([ |
24 '-C', test_dir, | 23 '-C', test_dir, |
25 '-p', 'TOOLCHAIN=' + TOOLCHAIN, | 24 '-p', 'TOOLCHAIN=' + TOOLCHAIN, |
26 '-t', '400', | 25 '-t', '400', |
27 '--enable-nacl', | 26 '--enable-nacl', |
28 '--load-extension', app, | 27 '--load-extension', app, |
29 'io2014_test.html'] + sys.argv[1:]) | 28 'io2014_test.html'] + sys.argv[1:]) |
OLD | NEW |