Skip to content

Commit

Permalink
try to cleanup after itself
Browse files Browse the repository at this point in the history
  • Loading branch information
alekseifedotov committed Dec 6, 2024
1 parent 4481294 commit faaeee8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions update-agent/t/podman-runner.nu
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ def main [prog, args] {
let mock_systemctl = mock-systemctl
let mmcblk0 = populate-mock-mmcblk

(podman run
try {
(podman run
--rm
-v $"($absolute_path):/mnt/program:Z"
-w /mnt
Expand All @@ -220,8 +221,11 @@ def main [prog, args] {
--mount=type=bind,src=($mmcblk0),dst=/dev/mmcblk0,rw,relabel=shared
-e RUST_BACKTRACE
-it fedora:latest
/mnt/program --nodbus
)
/mnt/program --nodbus)
} catch {
rm -rf $mock_efivars $mock_usr_persistent $mock_systemctl $mmcblk0
}

["run"
"download /dev/sda2 ./APP_b.after_ota.img"
"download /dev/sda19 ./SOFTWARE_LAYER_b.after_ota.img"
Expand All @@ -246,4 +250,6 @@ def main [prog, args] {
log error "CACHE_LAYER_b Test failed"
}

rm -rf $mock_efivars $mock_usr_persistent $mock_systemctl $mmcblk0
rm -rf APP_b.after_ota.img
}

0 comments on commit faaeee8

Please sign in to comment.