tests.rmk 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # -*- makefile -*-
  2. # For grub-shell
  3. grub-shell: tests/util/grub-shell.in config.status
  4. ./config.status --file=$@:$<
  5. chmod +x $@
  6. check_SCRIPTS += grub-shell
  7. CLEANFILES += grub-shell
  8. # For grub-shell-tester
  9. grub-shell-tester: tests/util/grub-shell-tester.in config.status
  10. ./config.status --file=$@:$<
  11. chmod +x $@
  12. check_SCRIPTS += grub-shell-tester
  13. CLEANFILES += grub-shell-tester
  14. pkglib_MODULES += functional_test.mod
  15. functional_test_mod_SOURCES = tests/lib/functional_test.c tests/lib/test.c
  16. functional_test_mod_CFLAGS = $(COMMON_CFLAGS)
  17. functional_test_mod_LDFLAGS = $(COMMON_LDFLAGS)
  18. # Rules for unit tests
  19. check_UTILITIES += example_unit_test
  20. example_unit_test_SOURCES = tests/example_unit_test.c kern/list.c kern/misc.c tests/lib/test.c tests/lib/unit_test.c
  21. example_unit_test_CFLAGS = -Wno-format
  22. # Rules for functional tests
  23. pkglib_MODULES += example_functional_test.mod
  24. example_functional_test_mod_SOURCES = tests/example_functional_test.c
  25. example_functional_test_mod_CFLAGS = -Wno-format $(COMMON_CFLAGS)
  26. example_functional_test_mod_LDFLAGS = $(COMMON_LDFLAGS)
  27. # Rules for scripted tests
  28. check_SCRIPTS += example_scripted_test
  29. example_scripted_test_SOURCES = tests/example_scripted_test.in
  30. check_SCRIPTS += example_grub_script_test
  31. example_grub_script_test_SOURCES = tests/example_grub_script_test.in
  32. #
  33. # Rules for real tests
  34. #
  35. check_SCRIPTS += grub_script_echo1
  36. grub_script_echo1_SOURCES = tests/grub_script_echo1.in
  37. check_SCRIPTS += grub_script_echo_keywords
  38. grub_script_echo_keywords_SOURCES = tests/grub_script_echo_keywords.in
  39. check_SCRIPTS += grub_script_vars1
  40. grub_script_vars1_SOURCES = tests/grub_script_vars1.in
  41. check_SCRIPTS += grub_script_for1
  42. grub_script_for1_SOURCES = tests/grub_script_for1.in
  43. check_SCRIPTS += grub_script_while1
  44. grub_script_while1_SOURCES = tests/grub_script_while1.in
  45. check_SCRIPTS += grub_script_if
  46. grub_script_if_SOURCES = tests/grub_script_if.in
  47. check_SCRIPTS += grub_script_blanklines
  48. grub_script_blanklines_SOURCES = tests/grub_script_blanklines.in
  49. check_SCRIPTS += grub_script_final_semicolon
  50. grub_script_final_semicolon_SOURCES = tests/grub_script_final_semicolon.in
  51. check_SCRIPTS += grub_script_dollar
  52. grub_script_dollar_SOURCES = tests/grub_script_dollar.in
  53. check_SCRIPTS += grub_script_comments
  54. grub_script_comments_SOURCES = tests/grub_script_comments.in
  55. # List of tests to execute on "make check"
  56. # SCRIPTED_TESTS = example_scripted_test
  57. # SCRIPTED_TESTS += example_grub_script_test
  58. # UNIT_TESTS = example_unit_test
  59. # FUNCTIONAL_TESTS = example_functional_test.mod
  60. SCRIPTED_TESTS = grub_script_echo1
  61. SCRIPTED_TESTS += grub_script_echo_keywords
  62. SCRIPTED_TESTS += grub_script_vars1
  63. SCRIPTED_TESTS += grub_script_for1
  64. SCRIPTED_TESTS += grub_script_while1
  65. SCRIPTED_TESTS += grub_script_if
  66. SCRIPTED_TESTS += grub_script_blanklines
  67. SCRIPTED_TESTS += grub_script_final_semicolon
  68. SCRIPTED_TESTS += grub_script_dollar
  69. SCRIPTED_TESTS += grub_script_comments
  70. # dependencies between tests and testing-tools
  71. $(SCRIPTED_TESTS): grub-shell grub-shell-tester
  72. $(FUNCTIONAL_TESTS): functional_test.mod