nixos/test/virtualbox: Fix linting errors
There were a bunch of unnecessary f-strings in there and I also removed the "# fmt: on/off" comments, because we no longer use Black and thus won't need those comments anymore. Signed-off-by: aszlig <aszlig@nix.build>
This commit is contained in:
parent
74bff4e667
commit
54bc69637b
@ -226,18 +226,16 @@ let
|
|||||||
|
|
||||||
|
|
||||||
def create_vm_${name}():
|
def create_vm_${name}():
|
||||||
# fmt: off
|
vbm("createvm --name ${name} ${createFlags}")
|
||||||
vbm(f"createvm --name ${name} ${createFlags}")
|
vbm("modifyvm ${name} ${vmFlags}")
|
||||||
vbm(f"modifyvm ${name} ${vmFlags}")
|
vbm("setextradata ${name} VBoxInternal/PDM/HaltOnReset 1")
|
||||||
vbm(f"setextradata ${name} VBoxInternal/PDM/HaltOnReset 1")
|
vbm("storagectl ${name} ${controllerFlags}")
|
||||||
vbm(f"storagectl ${name} ${controllerFlags}")
|
vbm("storageattach ${name} ${diskFlags}")
|
||||||
vbm(f"storageattach ${name} ${diskFlags}")
|
vbm("sharedfolder add ${name} ${sharedFlags}")
|
||||||
vbm(f"sharedfolder add ${name} ${sharedFlags}")
|
vbm("sharedfolder add ${name} ${nixstoreFlags}")
|
||||||
vbm(f"sharedfolder add ${name} ${nixstoreFlags}")
|
|
||||||
cleanup_${name}()
|
cleanup_${name}()
|
||||||
|
|
||||||
${mkLog "$HOME/VirtualBox VMs/${name}/Logs/VBox.log" "HOST-${name}"}
|
${mkLog "$HOME/VirtualBox VMs/${name}/Logs/VBox.log" "HOST-${name}"}
|
||||||
# fmt: on
|
|
||||||
|
|
||||||
|
|
||||||
def destroy_vm_${name}():
|
def destroy_vm_${name}():
|
||||||
@ -259,9 +257,7 @@ let
|
|||||||
|
|
||||||
def wait_for_ip_${name}(interface):
|
def wait_for_ip_${name}(interface):
|
||||||
property = f"/VirtualBox/GuestInfo/Net/{interface}/V4/IP"
|
property = f"/VirtualBox/GuestInfo/Net/{interface}/V4/IP"
|
||||||
# fmt: off
|
|
||||||
getip = f"VBoxManage guestproperty get ${name} {property} | sed -n -e 's/^Value: //p'"
|
getip = f"VBoxManage guestproperty get ${name} {property} | sed -n -e 's/^Value: //p'"
|
||||||
# fmt: on
|
|
||||||
|
|
||||||
ip = machine.succeed(
|
ip = machine.succeed(
|
||||||
ru(
|
ru(
|
||||||
@ -394,9 +390,7 @@ let
|
|||||||
|
|
||||||
machine.wait_for_x()
|
machine.wait_for_x()
|
||||||
|
|
||||||
# fmt: off
|
|
||||||
${mkLog "$HOME/.config/VirtualBox/VBoxSVC.log" "HOST-SVC"}
|
${mkLog "$HOME/.config/VirtualBox/VBoxSVC.log" "HOST-SVC"}
|
||||||
# fmt: on
|
|
||||||
|
|
||||||
${testScript}
|
${testScript}
|
||||||
# (keep black happy)
|
# (keep black happy)
|
||||||
|
Loading…
Reference in New Issue
Block a user