| 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 devenv app.""" | 5 """Tests of the devenv app.""" |
| 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 test_out_dir = os.path.join(DEVENV_OUT_DIR, 'tests') | 21 test_out_dir = os.path.join(DEVENV_OUT_DIR, 'tests') |
| 23 | 22 |
| 24 chrome_test.Main([ | 23 chrome_test.Main([ |
| 25 '-C', test_dir, | 24 '-C', test_dir, |
| 26 '-C', test_out_dir, | 25 '-C', test_out_dir, |
| 27 '-t', '60', | 26 '-t', '60', |
| 28 '--enable-nacl', | 27 '--enable-nacl', |
| 29 '--load-extension', app, | 28 '--load-extension', app, |
| 30 'devenv_small_test.html'] + sys.argv[1:]) | 29 'devenv_small_test.html'] + sys.argv[1:]) |
| OLD | NEW |