Hi,
I have been busy last week, so I couldn't reply :-( But I am able to complete most of the framework. It has support for logging multiple testcase failures and reporting them at the end of test execution. Please go through the attached patch and let me know your suggestions. Attached framework has support for two kinds of tests. 1. Unit Tests 2. Functional Tests Unit tests are test programs that doesn't need an active GRUB instance for their operation. These programs target specific code of GRUB, like grub_printf logic, etc. These are run during the build time by "make check" command. Since these are normal programs, they can link with standard C library and others. Functional tests are for testing GRUB functionality that needs an active instance of GRUB (for example, testing serial console code, partition tables logic, biosdisk access, etc.). Every functional test is a GRUB module that registers itself when its loaded. These are run using special GRUB command "functional_test" in GRUB shell. Attached patch has example tests for both. An additional grub_sprintf unit test is also available which tests grub_sprintf function logic and gets executed as part of "make check". Since functional tests are grub modules, we either need to boot into GRUB to run them or can make use of i386-qemu port of GRUB. Below is how I currently tested functional tests using i386-port $ ./autogen.sh $ ./configure --prefix=/usr --with-platform=qemu $ make && make check $ ./grub-mkimage -d . -o grub.bios at_keyboard normal help halt functional_test example_functional_test $ qemu -bios ./grub.bios -hda /dev/zero rescue:grub> functional_test example_functional_test ... rescue:grub> halt As for the future framework related enhancements, I am thinking of developing a grub-test script which would run functional tests directly inside a qemu using serial console -- as part of the build process. Then we can have test scripts using grub-test as its interpreter, which would remove the difference between functional tests and unit tests. thanks, -- bvk.chaitanya
testing-framework.patch
Description: Binary data
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel