fix(windows): launch commands on the interactive desktop
This commit is contained in:
1 parent
30e7bb8545
commit
8d28925e44
20 files changed
+1036
-28
No files matched your search
@@ -550,6 +550,10 @@ case "$action" in
|
||||
require_lease
|
||||
VBoxManage guestcontrol "$vm" --username "$guest_user" --passwordfile "$password_file" \
|
||||
copyto "$host_stage/client.toml" "$guest_root\\client.toml" </dev/null
|
||||
if [ -f "$host_stage/windows_gui_probe.ps1" ]; then
|
||||
VBoxManage guestcontrol "$vm" --username "$guest_user" --passwordfile "$password_file" \
|
||||
copyto "$host_stage/windows_gui_probe.ps1" "$guest_root\\windows_gui_probe.ps1" </dev/null
|
||||
fi
|
||||
;;
|
||||
stage-copy-ca)
|
||||
assert_identity
|
||||
@@ -847,14 +851,19 @@ case $action in
|
||||
remote prepare-stage
|
||||
[ -f "$bundle/rvbox.exe" ] && [ ! -L "$bundle/rvbox.exe" ] || fail "rvbox.exe must be a regular non-symlink file"
|
||||
[ -f "$bundle/client.toml" ] && [ ! -L "$bundle/client.toml" ] || fail "client.toml must be a regular non-symlink file"
|
||||
bundle_files='rvbox.exe client.toml'
|
||||
if [ -f "$bundle/ca.pem" ]; then
|
||||
[ ! -L "$bundle/ca.pem" ] || fail "ca.pem must not be a symlink"
|
||||
local_hashes=$(cd "$bundle" && sha256sum rvbox.exe client.toml ca.pem)
|
||||
else
|
||||
local_hashes=$(cd "$bundle" && sha256sum rvbox.exe client.toml)
|
||||
bundle_files="$bundle_files ca.pem"
|
||||
fi
|
||||
if [ -f "$bundle/windows_gui_probe.ps1" ]; then
|
||||
[ ! -L "$bundle/windows_gui_probe.ps1" ] || fail "GUI probe must not be a symlink"
|
||||
bundle_files="$bundle_files windows_gui_probe.ps1"
|
||||
fi
|
||||
local_hashes=$(cd "$bundle" && sha256sum $bundle_files)
|
||||
copy_stage_file "$bundle/client.toml" client.toml
|
||||
if [ -f "$bundle/ca.pem" ]; then copy_stage_file "$bundle/ca.pem" ca.pem; fi
|
||||
if [ -f "$bundle/windows_gui_probe.ps1" ]; then copy_stage_file "$bundle/windows_gui_probe.ps1" windows_gui_probe.ps1; fi
|
||||
local_exe_hash=$(sha256sum "$bundle/rvbox.exe" | awk '{print $1}')
|
||||
remote_exe_hash=$(ssh -o BatchMode=yes "$RVBOX_TEST_VBOX_HOST" "sha256sum '$host_stage/rvbox.exe' 2>/dev/null | awk '{print \$1}'" 2>/dev/null || true)
|
||||
if [ "$local_exe_hash" = "$remote_exe_hash" ]; then
|
||||
@@ -863,11 +872,7 @@ case $action in
|
||||
accelerated_stage || fail "accelerated executable transfer failed"
|
||||
trap 'if [ -n "$accelerated_artifact" ]; then rm -f "$accelerated_artifact"; fi' EXIT HUP INT TERM
|
||||
fi
|
||||
if [ -f "$bundle/ca.pem" ]; then
|
||||
remote_hashes=$(ssh -o BatchMode=yes "$RVBOX_TEST_VBOX_HOST" "cd '$host_stage' && sha256sum rvbox.exe client.toml ca.pem" 2>/dev/null || true)
|
||||
else
|
||||
remote_hashes=$(ssh -o BatchMode=yes "$RVBOX_TEST_VBOX_HOST" "cd '$host_stage' && sha256sum rvbox.exe client.toml" 2>/dev/null || true)
|
||||
fi
|
||||
remote_hashes=$(ssh -o BatchMode=yes "$RVBOX_TEST_VBOX_HOST" "cd '$host_stage' && sha256sum $bundle_files" 2>/dev/null || true)
|
||||
[ "$local_hashes" = "$remote_hashes" ] || fail "bundle transfer did not reach the expected SHA-256 manifest"
|
||||
printf 'verified transfer_sha256 run_id=%s\n%s\n' "$run_id" "$local_hashes"
|
||||
remote stage
|
||||
|
||||
Reference in new issue
Block a user