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 """Tests of the jseval utility.""" | 5 """Tests of the jseval utility.""" |
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 test_dir = os.path.join(SCRIPT_DIR, 'tests') | 19 test_dir = os.path.join(SCRIPT_DIR, 'tests') |
21 app = os.path.join(DEVENV_OUT_DIR, 'app') | 20 app = os.path.join(DEVENV_OUT_DIR, 'app') |
22 | 21 |
23 chrome_test.Main([ | 22 chrome_test.Main([ |
24 '-C', test_dir, | 23 '-C', test_dir, |
25 '-C', app, | 24 '-C', app, |
26 '-t', '60', | 25 '-t', '60', |
27 '--unlimited-storage', | 26 '--unlimited-storage', |
28 'jseval_test.html'] + sys.argv[1:]) | 27 'jseval_test.html'] + sys.argv[1:]) |
OLD | NEW |