From bbf1e3273751a294bdff7329fae022bce4963b66 Mon Sep 17 00:00:00 2001 From: sterni Date: Wed, 19 Oct 2022 19:19:03 +0200 Subject: fix(tvix/eval): restore .exp.xml files and skip in test suite Change-Id: Iebda5e0d99925a0a8c1d6ae1d7a35397d127bf31 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7047 Autosubmit: sterni Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/eval/src/tests/mod.rs | 7 +++ .../notyetpassing/eval-okay-functionargs.exp | 15 ------- .../notyetpassing/eval-okay-functionargs.exp.xml | 15 +++++++ .../nix_tests/notyetpassing/eval-okay-xml.exp | 52 ---------------------- .../nix_tests/notyetpassing/eval-okay-xml.exp.xml | 52 ++++++++++++++++++++++ 5 files changed, 74 insertions(+), 67 deletions(-) delete mode 100644 tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.exp create mode 100644 tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.exp.xml delete mode 100644 tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-xml.exp create mode 100644 tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-xml.exp.xml diff --git a/tvix/eval/src/tests/mod.rs b/tvix/eval/src/tests/mod.rs index 8a58b3cc7973..798cc7b87b6e 100644 --- a/tvix/eval/src/tests/mod.rs +++ b/tvix/eval/src/tests/mod.rs @@ -9,9 +9,16 @@ fn eval_test(code_path: &str, expect_success: bool) { .strip_suffix("nix") .expect("test files always end in .nix"); let exp_path = format!("{}exp", base); + let exp_xml_path = std::path::PathBuf::from(format!("{}exp.xml", base)); let code = std::fs::read_to_string(code_path).expect("should be able to read test code"); + if exp_xml_path.exists() { + // We can't test them at the moment because we don't have XML output yet. + // Checking for success / failure only is a bit disingenious. + return; + } + match interpret(&code, Some(code_path.into()), Options::test_options()) { Ok(result) => { let result_str = format!("{}", result); diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.exp b/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.exp deleted file mode 100644 index 651f54c36341..000000000000 --- a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.exp +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.exp.xml b/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.exp.xml new file mode 100644 index 000000000000..651f54c36341 --- /dev/null +++ b/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-functionargs.exp.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-xml.exp b/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-xml.exp deleted file mode 100644 index 20099326cc96..000000000000 --- a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-xml.exp +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-xml.exp.xml b/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-xml.exp.xml new file mode 100644 index 000000000000..20099326cc96 --- /dev/null +++ b/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-xml.exp.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit 1.4.1