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 <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
sterni 2022-10-19 19:19:03 +02:00
parent d9dfe65910
commit bbf1e32737
3 changed files with 7 additions and 0 deletions

View file

@ -9,9 +9,16 @@ fn eval_test(code_path: &str, expect_success: bool) {
.strip_suffix("nix") .strip_suffix("nix")
.expect("test files always end in .nix"); .expect("test files always end in .nix");
let exp_path = format!("{}exp", base); 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"); 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()) { match interpret(&code, Some(code_path.into()), Options::test_options()) {
Ok(result) => { Ok(result) => {
let result_str = format!("{}", result); let result_str = format!("{}", result);