From 8214b686cea3f6ad57d7da49a44d33185fdeb098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 18 Jul 2019 00:15:30 +0200 Subject: Refactor DenoDir (#2636) * rename `ModuleMetaData` to `SourceFile` and remove TS specific functionality * add `TsCompiler` struct encapsulating processing of TypeScript files * move `SourceMapGetter` trait implementation to `//cli/compiler.rs` * add low-level `DiskCache` API for general purpose caches and use it in `DenoDir` and `TsCompiler` for filesystem access * don't use hash-like filenames for compiled modules, instead use metadata file for storing compilation hash * add `SourceFileCache` for in-process caching of loaded files for fast subsequent access * define `SourceFileFetcher` trait encapsulating loading of local and remote files and implement it for `DenoDir` * define `use_cache` and `no_fetch` flags on `DenoDir` instead of using in fetch methods --- tools/integration_tests.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tools/integration_tests.py') diff --git a/tools/integration_tests.py b/tools/integration_tests.py index 6ce4f3d8b..56f430d76 100755 --- a/tools/integration_tests.py +++ b/tools/integration_tests.py @@ -55,7 +55,12 @@ class TestIntegrations(DenoTestCase): test_abs = os.path.join(tests_path, test_filename) test = read_test(test_abs) exit_code = int(test.get("exit_code", 0)) - args = test.get("args", "").split(" ") + args = test.get("args", None) + + if not args: + return + + args = args.split(" ") check_stderr = str2bool(test.get("check_stderr", "false")) stderr = subprocess.STDOUT if check_stderr else open(os.devnull, 'w') stdin_input = (test.get("input", @@ -87,13 +92,13 @@ class TestIntegrations(DenoTestCase): actual_code = e.returncode actual_out = e.output - self.assertEqual(exit_code, actual_code) - actual_out = strip_ansi_codes(actual_out) if not pattern_match(expected_out, actual_out): # This will always throw since pattern_match failed. self.assertEqual(expected_out, actual_out) + self.assertEqual(exit_code, actual_code) + # Add a methods for each test file in tests_path. for fn in sorted( -- cgit v1.2.3