summaryrefslogtreecommitdiff
path: root/test_util/src/lib.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-11-24 12:24:13 +0100
committerGitHub <noreply@github.com>2021-11-24 12:24:13 +0100
commit1a51f2392db731fe0c1aa0ccd00da6769d254e66 (patch)
treee6648dbd80771b358c0b4c2f11ce26bb2fbaac7a /test_util/src/lib.rs
parente68420f96077d772f329601f36b64ba6d26a3484 (diff)
chore: speed up compat tests (#12884)
This commit speeds up compat tests by using local copy of "deno_std" instead of downloading it from https://deno.land for each test. Additionally type checking is skipped.
Diffstat (limited to 'test_util/src/lib.rs')
-rw-r--r--test_util/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs
index 06ca6464d..857884efc 100644
--- a/test_util/src/lib.rs
+++ b/test_util/src/lib.rs
@@ -105,6 +105,10 @@ pub fn third_party_path() -> PathBuf {
root_path().join("third_party")
}
+pub fn std_path() -> PathBuf {
+ root_path().join("test_util").join("std")
+}
+
pub fn target_dir() -> PathBuf {
let current_exe = std::env::current_exe().unwrap();
let target_dir = current_exe.parent().unwrap().parent().unwrap();
@@ -1655,6 +1659,7 @@ pub struct CheckOutputIntegrationTest {
pub output_str: Option<&'static str>,
pub exit_code: i32,
pub http_server: bool,
+ pub envs: Vec<(String, String)>,
}
impl CheckOutputIntegrationTest {
@@ -1675,6 +1680,7 @@ impl CheckOutputIntegrationTest {
println!("deno_exe args {}", self.args);
println!("deno_exe testdata path {:?}", &testdata_dir);
command.args(args);
+ command.envs(self.envs.clone());
command.current_dir(&testdata_dir);
command.stdin(Stdio::piped());
let writer_clone = writer.try_clone().unwrap();