aboutsummaryrefslogtreecommitdiffhomepage
path: root/zluda_inject/tests/inject.rs
diff options
context:
space:
mode:
Diffstat (limited to 'zluda_inject/tests/inject.rs')
-rw-r--r--zluda_inject/tests/inject.rs20
1 files changed, 15 insertions, 5 deletions
diff --git a/zluda_inject/tests/inject.rs b/zluda_inject/tests/inject.rs
index de5fef8..d6430e0 100644
--- a/zluda_inject/tests/inject.rs
+++ b/zluda_inject/tests/inject.rs
@@ -2,15 +2,25 @@ use std::{env, io, path::PathBuf, process::Command};
#[test]
fn direct_cuinit() -> io::Result<()> {
+ run_process_and_check_for_zluda_dump("direct_cuinit")
+}
+
+#[test]
+fn indirect_cuinit() -> io::Result<()> {
+ run_process_and_check_for_zluda_dump("indirect_cuinit")
+}
+
+#[test]
+fn do_cuinit() -> io::Result<()> {
+ run_process_and_check_for_zluda_dump("do_cuinit_main")
+}
+
+fn run_process_and_check_for_zluda_dump(name: &'static str) -> io::Result<()> {
let zluda_with_exe = PathBuf::from(env!("CARGO_BIN_EXE_zluda_with"));
let mut zluda_dump_dll = zluda_with_exe.parent().unwrap().to_path_buf();
zluda_dump_dll.push("zluda_dump.dll");
let helpers_dir = env!("HELPERS_OUT_DIR");
- let exe_under_test = format!(
- "{}{}direct_cuinit.exe",
- helpers_dir,
- std::path::MAIN_SEPARATOR
- );
+ let exe_under_test = format!("{}{}{}.exe", helpers_dir, std::path::MAIN_SEPARATOR, name);
let mut test_cmd = Command::new(&zluda_with_exe);
let test_cmd = test_cmd.arg(&zluda_dump_dll).arg("--").arg(&exe_under_test);
let test_output = test_cmd.output()?;