2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-10-22 15:48:14 +00:00
Files
xcat-core/xCAT-test/bats/fixtures/package-command.sh
T
Vinícius Ferrão 9ff054bb3b test(postscripts): run package callers in isolated filesystems
Exercise the complete ospkgs and otherpkgs scripts with recorded package
commands. Check unattended options, pkglist environment, failure status,
and CUDA architecture handling without extracting source fragments.
2026-10-09 21:01:26 -03:00

23 lines
514 B
Bash

#!/bin/sh
command=${0##*/}
case "$command" in
logger|mount|apt-cache|dpkg) exit 0 ;;
esac
printf '%s\t' "$command" "${DEBIAN_FRONTEND-unset}" "${ACCEPT_EULA-unset}" "${ARCH-unset}" "$@" >>/run/fixture/commands
printf '\n' >>/run/fixture/commands
for argument do
case "$argument" in
cuda-toolkit) exit "${CUDA_STATUS:-0}" ;;
esac
done
for argument do
case "$argument" in
upgrade) exit "${UPGRADE_STATUS:-0}" ;;
install) exit "${INSTALL_STATUS:-0}" ;;
esac
done
exit 0