Skip to content

Commit 3051425

Browse files
committed
Remove another python3 call from test dependencies
1 parent eceaa01 commit 3051425

File tree

1 file changed

+1
-48
lines changed

1 file changed

+1
-48
lines changed

tests/other_backends.rs

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,7 @@
1-
use std::process::Command;
2-
3-
/// Compare the output of memphis running the Engine::BytecodeVm against python3.
4-
fn run_script_and_compare(script: &'static str) {
5-
let output = Command::new("target/debug/memphis")
6-
.arg(script)
7-
.env("MEMPHIS_ENGINE", "bytecode_vm")
8-
.output()
9-
.expect("Failed to run test script");
10-
11-
if !output.status.success() {
12-
panic!("Running script {} failed.", script);
13-
}
14-
15-
let expected = Command::new("python3")
16-
.arg(script)
17-
.output()
18-
.expect("Failed to run test script");
19-
20-
if !expected.status.success() {
21-
panic!("Running script {} failed.", script);
22-
}
23-
24-
assert_eq!(
25-
String::from_utf8_lossy(&output.stdout),
26-
String::from_utf8_lossy(&expected.stdout),
27-
"Running script {} produced unexpected output.",
28-
script
29-
);
30-
}
31-
32-
#[cfg(test)]
33-
mod bytecode_vm_tests {
34-
use super::*;
35-
36-
fn ui_tests() -> Vec<&'static str> {
37-
vec!["examples/loop_perf.py"]
38-
}
39-
40-
#[test]
41-
fn run_scripts() {
42-
for ui_test in ui_tests() {
43-
run_script_and_compare(ui_test);
44-
}
45-
}
46-
}
47-
481
#[cfg(feature = "llvm_backend")]
492
#[cfg(test)]
503
mod llvm_backend_tests {
51-
use super::*;
4+
use std::process::Command;
525

536
/// Run memphis with the Engine::LlvmBackend engine and just confirm it doesn't fail.
547
fn run_script(script: &'static str) {

0 commit comments

Comments
 (0)