summaryrefslogtreecommitdiff
path: root/tools/integration_tests.py
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2019-07-18 00:15:30 +0200
committerRyan Dahl <ry@tinyclouds.org>2019-07-17 18:15:30 -0400
commit8214b686cea3f6ad57d7da49a44d33185fdeb098 (patch)
tree00517c7b8f4bb835ce050e89f29ec1826bac92ce /tools/integration_tests.py
parent481a82c983e40201589e105e28be4ce809e46a60 (diff)
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
Diffstat (limited to 'tools/integration_tests.py')
-rwxr-xr-xtools/integration_tests.py11
1 files changed, 8 insertions, 3 deletions
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(