compile_tests.rs 464 B

123456789101112131415161718192021
  1. use std::process::Command;
  2. #[test]
  3. fn main() {
  4. let dir = env!("CARGO_MANIFEST_DIR");
  5. let tests = [
  6. "throw_and_catch",
  7. "catch_std_exception",
  8. "std_catch_exception",
  9. "panic_abort_no_debuginfo",
  10. ];
  11. for test in tests {
  12. let status = Command::new("./check.sh")
  13. .current_dir(format!("{dir}/test_crates/{test}"))
  14. .status()
  15. .unwrap();
  16. assert!(status.success());
  17. }
  18. }