Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add run CLI subcommand #2215

Merged
merged 24 commits into from May 3, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

fix integration tests

  • Loading branch information...
bartlomieju committed May 3, 2019
commit f45d0299d127e59dae04a71713192e59b4bfb643
@@ -1,2 +1,2 @@
args: --reload tests/001_hello.js
args: run --reload tests/001_hello.js
output: tests/001_hello.js.out
@@ -1,2 +1,2 @@
args: --reload tests/002_hello.ts
args: run --reload tests/002_hello.ts
output: tests/002_hello.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/003_relative_import.ts
args: run --reload tests/003_relative_import.ts
output: tests/003_relative_import.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/004_set_timeout.ts
args: run --reload tests/004_set_timeout.ts
output: tests/004_set_timeout.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/005_more_imports.ts
args: run --reload tests/005_more_imports.ts
output: tests/005_more_imports.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/006_url_imports.ts
args: run --reload tests/006_url_imports.ts
output: tests/006_url_imports.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/012_async.ts
args: run --reload tests/012_async.ts
output: tests/012_async.ts.out
@@ -1,2 +1,2 @@
args: --allow-read --reload tests/016_double_await.ts
args: run --allow-read --reload tests/016_double_await.ts
output: tests/016_double_await.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/017_import_redirect.ts
args: run --reload tests/017_import_redirect.ts
output: tests/017_import_redirect.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/018_async_catch.ts
args: run --reload tests/018_async_catch.ts
output: tests/018_async_catch.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/019_media_types.ts
args: run --reload tests/019_media_types.ts
output: tests/019_media_types.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/020_json_modules.ts
args: run --reload tests/020_json_modules.ts
output: tests/020_json_modules.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/023_no_ext_with_headers
args: run --reload tests/023_no_ext_with_headers
output: tests/023_no_ext_with_headers.out
@@ -1,2 +1,2 @@
args: --reload tests/024_import_no_ext_with_headers.ts
args: run --reload tests/024_import_no_ext_with_headers.ts
output: tests/024_import_no_ext_with_headers.ts.out
@@ -1,2 +1,2 @@
args: --allow-high-precision --reload tests/025_high_precision.ts
args: run --allow-high-precision --reload tests/025_high_precision.ts
output: tests/025_high_precision.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/025_reload_js_type_error.js
args: run --reload tests/025_reload_js_type_error.js
output: tests/025_reload_js_type_error.js.out
@@ -1,2 +1,2 @@
args: --reload tests/026_redirect_javascript.js
args: run --reload tests/026_redirect_javascript.js
output: tests/026_redirect_javascript.js.out
@@ -1,2 +1,2 @@
args: --reload tests/026_workers.ts
args: run --reload tests/026_workers.ts
output: tests/026_workers.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/027_redirect_typescript.ts
args: run --reload tests/027_redirect_typescript.ts
output: tests/027_redirect_typescript.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/028_args.ts --arg1 val1 --arg2=val2 -- arg3 arg4
args: run --reload tests/028_args.ts --arg1 val1 --arg2=val2 -- arg3 arg4
output: tests/028_args.ts.out
@@ -1,4 +1,4 @@
exit_code: 1
args: --reload tests/async_error.ts
args: run --reload tests/async_error.ts
check_stderr: true
output: tests/async_error.ts.out
@@ -1,2 +1,2 @@
args: tests/circular1.js --reload
args: run --reload tests/circular1.js
output: tests/circular1.js.out
@@ -1,4 +1,4 @@
args: --reload --config tests/config.tsconfig.json tests/config.ts
args: run --reload --config tests/config.tsconfig.json tests/config.ts
check_stderr: true
exit_code: 1
output: tests/config.ts.out
@@ -1,4 +1,4 @@
args: --reload tests/error_001.ts
args: run --reload tests/error_001.ts
check_stderr: true
exit_code: 1
output: tests/error_001.ts.out
@@ -1,4 +1,4 @@
args: --reload tests/error_002.ts
args: run --reload tests/error_002.ts
check_stderr: true
exit_code: 1
output: tests/error_002.ts.out
@@ -1,3 +1,3 @@
args: --reload tests/error_003_typescript.ts
args: run --reload tests/error_003_typescript.ts
exit_code: 1
output: tests/error_003_typescript.ts.out
@@ -1,4 +1,4 @@
args: tests/error_004_missing_module.ts --reload
args: run --reload tests/error_004_missing_module.ts
check_stderr: true
exit_code: 1
output: tests/error_004_missing_module.ts.out
@@ -1,4 +1,4 @@
args: tests/error_005_missing_dynamic_import.ts --reload
args: run --reload tests/error_005_missing_dynamic_import.ts
check_stderr: true
exit_code: 1
output: tests/error_005_missing_dynamic_import.ts.out
@@ -1,4 +1,4 @@
args: tests/error_006_import_ext_failure.ts --reload
args: run --reload tests/error_006_import_ext_failure.ts
check_stderr: true
exit_code: 1
output: tests/error_006_import_ext_failure.ts.out
@@ -1,4 +1,4 @@
args: --reload tests/error_007_any.ts
args: run --reload tests/error_007_any.ts
check_stderr: true
exit_code: 1
output: tests/error_007_any.ts.out
@@ -1,4 +1,4 @@
args: --reload tests/error_008_checkjs.js
args: run --reload tests/error_008_checkjs.js
check_stderr: true
exit_code: 1
output: tests/error_008_checkjs.js.out
@@ -1,4 +1,4 @@
args: --reload tests/error_syntax.js
args: run --reload tests/error_syntax.js
check_stderr: true
exit_code: 1
output: tests/error_syntax.js.out
@@ -1,3 +1,3 @@
exit_code: 42
args: --reload tests/exit_error42.ts
args: run --reload tests/exit_error42.ts
output: tests/exit_error42.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/https_import.ts
args: run --reload tests/https_import.ts
output: tests/https_import.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/if_main.ts
args: run --reload tests/if_main.ts
output: tests/if_main.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/import_meta.ts
args: run --reload tests/import_meta.ts
output: tests/import_meta.ts.out
@@ -1,3 +1,3 @@
args: --reload tests/unbuffered_stderr.ts
args: run --reload tests/unbuffered_stderr.ts
check_stderr: true
output: tests/unbuffered_stderr.ts.out
@@ -1,2 +1,2 @@
args: --reload tests/unbuffered_stdout.ts
args: run --reload tests/unbuffered_stdout.ts
output: tests/unbuffered_stdout.ts.out
@@ -1,2 +1,2 @@
args: tests/wasm.ts
output: tests/wasm.ts.out
args: run tests/wasm.ts
output: tests/wasm.ts.out
@@ -21,14 +21,13 @@

# The list of the tuples of the benchmark name and arguments
exec_time_benchmarks = [
("hello", ["run", "tests/002_hello.ts"]),
("relative_import", ["run", "tests/003_relative_import.ts"]),
("error_001", ["run", "tests/error_001.ts"]),
("cold_hello", ["--reload", "run", "tests/002_hello.ts"]),
("cold_relative_import",
["--reload", "run", "tests/003_relative_import.ts"]),
("workers_startup", ["run", "tests/workers_startup_bench.ts"]),
("workers_round_robin", ["run", "tests/workers_round_robin_bench.ts"]),
("hello", ["tests/002_hello.ts"]),
("relative_import", ["tests/003_relative_import.ts"]),
("error_001", ["tests/error_001.ts"]),
("cold_hello", ["--reload", "tests/002_hello.ts"]),
("cold_relative_import", ["--reload", "tests/003_relative_import.ts"]),
("workers_startup", ["tests/workers_startup_bench.ts"]),
("workers_round_robin", ["tests/workers_round_robin_bench.ts"]),
]

gh_pages_data_file = "gh-pages/data.json"
@@ -68,7 +68,7 @@ def integration_tests(deno_exe, test_filter=None):
output_abs = os.path.join(root_path, test.get("output", ""))
with open(output_abs, 'r') as f:
expected_out = f.read()
cmd = [deno_exe, "run"] + args
cmd = [deno_exe] + args
sys.stdout.write("tests/%s ... " % (test_filename))
sys.stdout.flush()
actual_code = 0
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.