improve checks
This commit is contained in:
+4
-2
@@ -107,7 +107,7 @@ select_scenarios() {
|
||||
}
|
||||
|
||||
smoketest_run() {
|
||||
local tier=pr ref=HEAD keep=0 names=()
|
||||
local tier="pr" ref=HEAD keep=0 names=()
|
||||
while (( $# > 0 )); do
|
||||
case "$1" in
|
||||
--tier) tier="${2:-}"; shift 2 || die "--tier needs pr or all" ;;
|
||||
@@ -338,7 +338,9 @@ smoketest_shell() {
|
||||
mkdir -p "$dir"
|
||||
qemu-img create -q -f qcow2 -b "$IMAGES/$image.qcow2" -F qcow2 "$dir/disk.qcow2"
|
||||
vm_start "$dir" "$dir/disk.qcow2"
|
||||
trap 'vm_kill; rm -rf "$dir"' EXIT
|
||||
# Expanded now: $dir is local, and gone by the time the script exits
|
||||
# shellcheck disable=SC2064
|
||||
trap "vm_kill; rm -rf $(printf '%q' "$dir")" EXIT
|
||||
echo "Starting a throwaway copy of the $image image..."
|
||||
vm_wait_up
|
||||
vm_ssh -t
|
||||
|
||||
Reference in New Issue
Block a user