HACKING 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. Running the Tests
  2. -----------------
  3. The tests are run via
  4. make
  5. To also run the component tests, you need to initialize the git submodules once
  6. via:
  7. git submodule update --init --recursive
  8. This will fetch the necessary binary data for the DEB and RPM component tests,
  9. and the tests are from now on included within each regular test run.
  10. Some tests reach out to the network. To run these in addition to all
  11. other tests use:
  12. make all+net
  13. You can run the tests in a debian/sid docker container by using
  14. tests/helpers/run-in-docker.
  15. Building the API Docs
  16. ---------------------
  17. You can build the API docs using
  18. make apidocs
  19. Contributing Patches
  20. --------------------
  21. Make sure the tests pass before sending in patch. You can either send it to the
  22. mailing list or add it to a bug report against git-buildpackage on
  23. http://bugs.debian.org/src:git-buildpackage
  24. Layout
  25. ------
  26. gbp/scripts/*.py - the actual gbp commands (buildpackage, dch, …)
  27. gbp/scripts/common/ - code shared between Debian and RPM commands
  28. gbp/deb/ - Debian package handling (control, dsc, …)
  29. gbp/rpm/ - RPM package handling (spec files, …)
  30. gbp/git/ - Git repository interaction
  31. tests/*.py - unit tests
  32. tests/doctests - doctests that also serve as examples
  33. tests/component/ - component tests that invoke actual commands
  34. Interfaces
  35. ----------
  36. A gbp command in gbp/scripts/<commmand>.py must provide these interfaces:
  37. When one invokes `gbp <command>` gbp/scripts/<commmand>.py is imported by
  38. gbp/scripts/supercommand.py
  39. which then invokes it's *main* function with all given command line arguments.
  40. It is expected to return with the exit status that should be passed back to the
  41. shell.
  42. When one invokes `gbp config <command>` gbp/scripts/<commmand>.py is imported by
  43. gbp/scripts/config.py
  44. which then invokes it's *build_parser* function with the command name as argument.
  45. It is expected to return a GbpConfigParser with all config files parsed.