File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 66
66
@echo "Special variables:"
67
67
@echo " BUILD_TARGET=foo - Override the build target"
68
68
@echo " DEBUG=1 - Enable verbose output on host and interactive debugging"
69
+ @echo " ROOT_USER=1 - Login as root user for interactive shell"
69
70
@echo ' EXTRA_CONFIGURE_OPTS="..." - Pass to configure step'
70
71
@echo " J=[0..9]* - Override the -jN parameter for make commands"
71
72
@echo " LOG_CONSOLE=1 - Log console to file in: ~/.cache/qemu-vm "
@@ -141,6 +142,6 @@ vm-boot-ssh-%: $(IMAGES_DIR)/%.img $(VM_VENV)
141
142
$(if $(EFI_AARCH64),--efi-aarch64 $(EFI_AARCH64)) \
142
143
$(if $(LOG_CONSOLE),--log-console) \
143
144
--image "$<" \
144
- --interactive \
145
+ $(if $(ROOT_USER), --interactive-root,-interactive) \
145
146
false, \
146
147
" VM-BOOT-SSH $*") || true
Original file line number Diff line number Diff line change @@ -612,8 +612,11 @@ def get_default_jobs():
612
612
parser .add_argument ("--source-path" , default = None ,
613
613
help = "Path of source directory, " \
614
614
"for finding additional files. " )
615
- parser .add_argument ("--interactive" , "-I" , action = "store_true" ,
616
- help = "Interactively run command" )
615
+ int_ops = parser .add_mutually_exclusive_group ()
616
+ int_ops .add_argument ("--interactive" , "-I" , action = "store_true" ,
617
+ help = "Interactively run command" )
618
+ int_ops .add_argument ("--interactive-root" , action = "store_true" ,
619
+ help = "Interactively run command as root" )
617
620
parser .add_argument ("--snapshot" , "-s" , action = "store_true" ,
618
621
help = "run tests with a snapshot" )
619
622
parser .add_argument ("--genisoimage" , default = "genisoimage" ,
@@ -675,6 +678,8 @@ def main(vmcls, config=None):
675
678
exitcode = 3
676
679
if args .interactive :
677
680
vm .ssh ()
681
+ elif args .interactive_root :
682
+ vm .ssh_root ()
678
683
679
684
if not args .snapshot :
680
685
vm .graceful_shutdown ()
You can’t perform that action at this time.
0 commit comments