Skip to content

Commit

Permalink
lib/netbootxyz-lib.robot: enter utilities and set kernel paramaters
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Król <[email protected]>
  • Loading branch information
pietrushnic committed Dec 20, 2024
1 parent 025c897 commit 525f667
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
37 changes: 37 additions & 0 deletions lib/netbootxyz-lib.robot
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,19 @@ Enter Netboot.Xyz Linux Install Menu And Return Construction
${menu}= Parse Netboot.Xyz Linux Install Menu Snapshot Into Construction ${out}
RETURN ${menu}

Enter Netboot.Xyz Utilities Menu And Return Construction
[Documentation] Return only selectable entries of netboot.xyz Utilities
... submenu. If some menu option is not selectable it will not
... be in the menu construction list.
Enter Netboot.Xyz Menu
${nb_menu}= Get Netboot.Xyz Menu Construction
${index}= Get Index Of Matching Option In Menu ${nb_menu} Utilities (64-bit)
Select Option ${index} ${ARROW_DOWN}
Press Enter
${out}= Read From Terminal
${menu}= Parse Netboot.Xyz Linux Distro Install Menu Snapshot Into Construction ${out}
RETURN ${menu}

Enter Netboot.Xyz Linux Distro Install Menu And Return Construction
[Documentation] Return only selectable entries of netboot.xyz Linux
... Install submenu for provided Linux distribution. If some menu option
Expand Down Expand Up @@ -132,6 +145,19 @@ Parse Netboot.Xyz Linux Distro Install Menu Snapshot Into Construction
... Older Releases
... Testing Releases
... .* - amd64
... netboot.xyz tools:
... Utilities:
${nextpage}= Strip String ${menu_lines[-1]}
IF "${nextpage}" == "..."
${keypress}= Get Length ${construction}
Press Key N Times ${keypress} ${ARROW_DOWN}
${out}= Read From Terminal
${out}= Fetch From Right ${out} ...
${menu}= Parse Netboot.Xyz Linux Distro Install Menu Snapshot Into Construction ${out}
${construction}= Combine Lists ${construction} ${menu}
# We have to get back to top of the list to no confuse user
Press Key N Times ${keypress} ${ARROW_UP}
END
RETURN ${construction}

Parse Netboot.Xyz Linux Install Menu Snapshot Into Construction
Expand Down Expand Up @@ -168,3 +194,14 @@ Parse Netboot.Xyz Linux Install Menu Snapshot Into Construction
END
RETURN ${construction}

Enter Netboot.Xyz And Set Kernel Cmdline Params
[Documentation] Enter Netboot.Xyz Utilities and set kernel cmdline params
[Arguments] ${params}
${menu}= Enter Netboot.Xyz Utilities Menu And Return Construction
${index}= Get Index Of Matching Option In Menu ${menu} Kernel cmdline params: [] ${TRUE}
Should Not Be Equal '${index}' -1 The option was not found in menu
Press Key N Times And Enter ${index} ${ARROW_DOWN}
${out}= Read From Terminal
Write Bare Into Terminal ${params}\n 0.1
${out}= Read From Terminal
Press Key N Times 2 ${ESC}
44 changes: 44 additions & 0 deletions self-tests/netbootxyz.robot
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,50 @@ Enter Netboot.Xyz Linux Distro Install Menu And Return Construction (Fedora)
Should Contain ${nb_menu} Fedora rawhide
Should Not Contain ${nb_menu} Latest Releases

Enter Netboot.Xyz Utilities Menu And Return Construction
[Documentation] Test Enter Netboot.Xyz Utilities Menu And Return
... Construction kwd
Power On
${nb_menu}= Enter Netboot.Xyz Utilities Menu And Return Construction
Should Contain ${nb_menu} 4MLinux
Should Contain ${nb_menu} Boot Repair CD
Should Contain ${nb_menu} Breakin
Should Contain ${nb_menu} CAINE
Should Contain ${nb_menu} Clonezilla
Should Contain ${nb_menu} Dasharo Tools Suite
Should Contain ${nb_menu} DBAN
Should Contain ${nb_menu} GParted
Should Contain ${nb_menu} Grml
Should Contain ${nb_menu} Kaspersky Rescue Disk
Should Contain ${nb_menu} Memtest86+ 5.01.0
Should Contain ${nb_menu} Memtest86+ 7.20
Should Contain ${nb_menu} RedoRescue
Should Contain ${nb_menu} Rescatux
Should Contain ${nb_menu} Rescuezilla
Should Contain ${nb_menu} ShredOS
Should Contain ${nb_menu} Super GRUB2 Disk
Should Contain ${nb_menu} System Rescue CD
Should Contain ${nb_menu} Ultimate Boot CD (UBCD)
Should Contain ${nb_menu} Kernel cmdline params: []
Should Contain ${nb_menu} Set custom menu [url: ]
Should Contain ${nb_menu} Set Github username [user: ]
Should Contain ${nb_menu} Test Distribution ISO
Should Contain ${nb_menu} netboot.xyz endpoints
Should Not Contain ${nb_menu} netboot.xyz tools:
Should Not Contain ${nb_menu} Utilities:

Enter Netboot.Xyz And Set Kernel Cmdline Params
[Documentation] Test Enter Netboot.Xyz And Set Kernel Cmdline Params kwd
Power On
Enter Netboot.Xyz And Set Kernel Cmdline Params console=ttyS0,115200n8
${nb_menu}= Get Netboot.Xyz Menu Construction
${index}= Get Index Of Matching Option In Menu ${nb_menu} Utilities (64-bit)
Select Option ${index} ${ARROW_DOWN}
Press Enter
${out}= Read From Terminal
${menu}= Parse Netboot.Xyz Linux Distro Install Menu Snapshot Into Construction ${out}
Should Contain ${menu} Kernel cmdline params: [console=ttyS0,115200n8]

# Enter Advanced Secure Boot Keys Management
# [Documentation] Test Enter Advanced Secure Boot Keys Management kwd
# Power On
Expand Down

0 comments on commit 525f667

Please sign in to comment.