containers / bubblewrap

Low-level unprivileged sandboxing tool used by Flatpak and similar projects
Other
3.9k stars 238 forks source link

Implement change proposed in "All MRs that add unit tests conflict with each other" #602

Closed quag closed 1 year ago

quag commented 1 year ago

Fixes containers/bubblewrap#420 using the proposed approach of defining ok(), done_testing(), and shifting the TAP plan from being written at the start to being written at the end. I also introduced an ok_skip() function, but I'm happy to change all uses to ok "# SKIP ..." if you prefer that.

This pull request also has two trivial fixes to the tests:

  1. A typo in a test case ("prefxing" -> "prefixing"
  2. Switch the last /bin/bash to just bash (there are five references to bash, the other four--including #!/usr/bin/env bash-- all use the bash on the $PATH)

Let me know if you'd rather these two changes were in separate pull requests.

smcv commented 1 year ago

Rebasing after I merged #599 will also require adding one extra ok_skip, I think.

quag commented 1 year ago

Rebases done. Let me know if more are needed.