summaryrefslogtreecommitdiffstats
path: root/tests/crash.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/crash.rs')
-rw-r--r--tests/crash.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/crash.rs b/tests/crash.rs
index ca58a04..e1f856f 100644
--- a/tests/crash.rs
+++ b/tests/crash.rs
@@ -45,8 +45,8 @@ fn run_cli(env: &Env, args: &[&str]) -> std::process::Output {
fn a_process_killed_mid_step_resumes_from_its_checkpoints_with_no_duplicate_work() {
let (mut env, _fx) = env_with_fixture("plain-make");
let id = queued(&env, "plain-make");
- // The child will be murdered the moment it invokes makechrootpkg.
- env.cfg.hooks.shim_kill_parent = Some("makechrootpkg".into());
+ // The child will be murdered the moment it invokes makepkg.
+ env.cfg.hooks.shim_kill_parent = Some("makepkg".into());
env.cfg.save().unwrap();
let out = run_cli(&env, &["run", &id]);
@@ -71,10 +71,10 @@ fn a_process_killed_mid_step_resumes_from_its_checkpoints_with_no_duplicate_work
Some(StepState::Running),
"the step that was running should be recorded as running"
);
- assert_eq!(
- builds::step_status(&env.db, &id, "chroot").unwrap(),
- Some(StepState::Succeeded),
- "the completed step before the crash must be checkpointed"
+ let chroot_status = builds::step_status(&env.db, &id, "chroot").unwrap();
+ assert!(
+ chroot_status.is_some_and(|s| s.is_done()),
+ "the completed step before the crash must be checkpointed: {chroot_status:?}"
);
assert!(db::accepted_release(&env.db, "plain-make").unwrap().is_none(), "nothing was published");
@@ -97,11 +97,11 @@ fn a_process_killed_mid_step_resumes_from_its_checkpoints_with_no_duplicate_work
let shim = env.cfg.hooks.shim_dir.clone().unwrap();
assert_eq!(
aur_build::shims::called_with(&shim, "mkarchroot", ""),
- 1,
- "the chroot step was checkpointed as done and must not run again"
+ 0,
+ "the provisioning model never calls devtools, before or after a crash"
);
assert_eq!(
- aur_build::shims::called_with(&shim, "makechrootpkg", ""),
+ aur_build::shims::called_with(&shim, "makepkg", ""),
2,
"exactly one rebuild: the crashed attempt and the resumed one"
);
@@ -147,7 +147,7 @@ fn a_failed_build_leaves_the_index_serving_the_old_version_and_says_so() {
// v2 is approved and its build fails deterministically.
fx.bump(&[("pkgver", "2.0")]);
- env.set_shim_fail("makechrootpkg");
+ env.set_shim_fail("makepkg");
let c2 = approved(&env, "plain-make");
let id2 = pipeline::enqueue_for_candidate(&env.cfg, &env.db, &c2).unwrap();
let out = pipeline::run(&env.cfg, &env.db, &id2).unwrap();