Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rhboot/grubby
Retired; BLS-only support lives at https://src.fedoraproject.org/rpms/grubby
https://github.com/rhboot/grubby
Last synced: 3 months ago
JSON representation
Retired; BLS-only support lives at https://src.fedoraproject.org/rpms/grubby
- Host: GitHub
- URL: https://github.com/rhboot/grubby
- Owner: rhboot
- License: gpl-2.0
- Archived: true
- Created: 2015-03-20T20:31:49.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2022-04-27T17:14:25.000Z (over 2 years ago)
- Last Synced: 2024-06-03T06:38:44.123Z (5 months ago)
- Language: Roff
- Homepage:
- Size: 1.53 MB
- Stars: 29
- Watchers: 5
- Forks: 28
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: COPYING
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
This repo is retired
====================With the adoption of BLS, grubby has been largely superseded by a shell script
that lives downstream in Fedora. This repo is no longer maintained.grubby
======grubby is a command line tool for updating and displaying information about
the configuration files for the grub, lilo, elilo (ia64), yaboot (powerpc)
and zipl (s390) boot loaders. It is primarily designed to be used from scripts
which install new kernels and need to find information about the current boot
environment.Testing grubby
==============To execute the integrated test suite from inside the source directory run the
command::make test
Test Suite Architecture
------------------------grubby's test suite is written in Bash. The file `test.sh` contains several
helper functions and a list of different test scenarios which are exercised
upon execution. Important functions are:- oneTest() - test if the configuration generated by the supplied grubby
parameters matches a well known configuration file;- oneDisplayTest() - test grubby features that display some information,
checking grubby's output against well known values;- commandTest() - test if the output of some commands matches the provided
text. This function is only used for grub2 testing in a few places.Note: the test suite creates aliases for oneTest() and oneDisplayTest(), which
are prefixed with the corresponding boot loader name. For example:
grubTest(). eliloTest(), etc.The invocation syntax is::
testFunction config_file results_file --grubby --options
For example the line::
grubTest grub.1 updargs/g1.1 --update-kernel=DEFAULT --args="root=/dev/hda1"
means execute the command::
./grubby --grub --config-file tests/grub.1 --update-kernel=DEFAULT \
--args="root=/dev/hda1"and compare the resulting configuration with the file
`tests/results/updargs/g1.1`.The line::
grubDisplayTest grub.1 defaultindex/0 --default-index
means execute::
./grubby --grub --config-file tests/grub.1 --default-index
and compare the output with the file `tests/results/defaultindex/0`.
Writing New Test Cases
----------------------To write a new test case for grubby you need a config file which matches the
initial test conditions (either existing one or a new one), provide a
results file (likely a new one) which contains the expected configuration or
output and finally add a call to the test function(s) using the desired grubby
parameters in an appropriate section of `test.sh`.