|
| 1 | +summary: Test enabling default experiments |
| 2 | +execute: | |
| 3 | + oxidizr enable --yes --all |
| 4 | +
|
| 5 | + apt list rust-coreutils | MATCH installed |
| 6 | + while read p; do |
| 7 | + util_path="$(which $p)" |
| 8 | + util_dir="$(dirname "$util_path")" |
| 9 | + ls -la "$util_path"| MATCH "$util_path -> /usr/bin/coreutils" |
| 10 | + ls -la "$util_dir/.$p.oxidizr.bak" || echo "No backup file for $util_path" |
| 11 | + $util_path --help | NOMATCH "https://www.gnu.org/software/coreutils" |
| 12 | + done < ../rust-coreutils-bins.txt |
| 13 | +
|
| 14 | + apt list rust-findutils | MATCH installed |
| 15 | + while read p; do |
| 16 | + util_path="$(which $p)" |
| 17 | + util_dir="$(dirname "$util_path")" |
| 18 | + ls -la "$util_path"| MATCH "$util_path -> /usr/lib/cargo/bin/findutils/$p" |
| 19 | + ls -la "$util_dir/.$p.oxidizr.bak" || echo "No backup file for $util_path" |
| 20 | + $util_path --help | NOMATCH "https://www.gnu.org/software/coreutils" |
| 21 | + done < ../rust-findutils-bins.txt |
| 22 | +
|
| 23 | + if [[ "$(lsb_release -rs)" != "24.04" ]]; then |
| 24 | + apt list rust-diffutils | MATCH installed |
| 25 | + while read p; do |
| 26 | + util_path="$(which $p)" |
| 27 | + util_dir="$(dirname "$util_path")" |
| 28 | + ls -la "$util_path"| MATCH "$util_path -> /usr/lib/cargo/bin/diffutils/$p" |
| 29 | + ls -la "$util_dir/.$p.oxidizr.bak" || echo "No backup file for $util_path" |
| 30 | + $util_path --help | NOMATCH "https://www.gnu.org/software/coreutils" |
| 31 | + done < ../rust-diffutils-bins.txt |
| 32 | + fi |
| 33 | +
|
| 34 | + apt list sudo-rs | MATCH installed |
| 35 | +
|
| 36 | + ls -la /usr/bin/sudo | MATCH "/usr/bin/sudo -> /usr/lib/cargo/bin/sudo" |
| 37 | + ls -la /usr/bin | MATCH ".sudo.oxidizr.bak" |
| 38 | + /usr/bin/sudo --version 2>&1 | MATCH "sudo-rs" |
| 39 | +
|
| 40 | + ls -la /usr/bin/su | MATCH "/usr/bin/su -> /usr/lib/cargo/bin/su" |
| 41 | + ls -la /usr/bin | MATCH ".su.oxidizr.bak" |
| 42 | + /usr/bin/su --version 2>&1 | MATCH "su-rs" |
| 43 | +
|
| 44 | + ls -la /usr/sbin/visudo | MATCH "/usr/sbin/visudo -> /usr/lib/cargo/bin/visudo" |
| 45 | + ls -la /usr/sbin | MATCH ".visudo.oxidizr.bak" |
| 46 | +
|
| 47 | +restore: | |
| 48 | + if [[ -z "${CI:-}" ]]; then |
| 49 | + oxidizr disable --yes --all |
| 50 | + fi |
0 commit comments