test 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env python3
  2. import common
  3. import shell_helpers
  4. from shell_helpers import LF
  5. class Main(common.TestCliFunction):
  6. def __init__(self):
  7. super().__init__(
  8. description='''\
  9. https://github.com/cirosantilli/linux-kernel-module-cheat#automated-tests
  10. '''
  11. )
  12. self.add_argument(
  13. '--size',
  14. default=1,
  15. type=int,
  16. help='''\
  17. Size of the tests to run. Scale:
  18. * 1: a few seconds and important
  19. * 2: < 5 minutes and important or a few seconds and not too important
  20. * 3: all
  21. '''
  22. )
  23. def timed_main(self):
  24. run_args = self.get_common_args()
  25. test_boot_args = run_args.copy()
  26. test_boot_args['size'] = self.env['size']
  27. self.run_test(self.import_path_main('test-boot'), test_boot_args, 'test-boot')
  28. self.run_test(self.import_path_main('test-userland-full-system'), run_args, 'test-userland')
  29. self.run_test(self.import_path_main('test-baremetal'), run_args, 'test-baremetal')
  30. self.run_test(self.import_path_main('test-user-mode'), run_args, 'test-user-mode')
  31. self.run_test(self.import_path_main('test-gdb'), run_args, 'test-gdb')
  32. if __name__ == '__main__':
  33. Main().cli()