User:Allan/Makepkg Test Suite

From ArchWiki
Jump to: navigation, search


The test suite will be written in python. It will have the following components (naming not fixed...)

  • - A simple PKGBUILD parser
  • - A script to parse the test data
  • - A script to run the test suite
  • test/test??? - test suite PKGBUILDs

Example Test Suite PKGBUILD

The test suite are standard PKGBUILDs with information on how they are intended to be run in the header comments.

# TEST: Minimal working PKGBUILD
# EXPECTED: pass


build() {
  return 0

The fields available at the top are:

  • TEST - a description of the test being performed
  • FLAGS - flags to be passed to makepkg
  • EXPECTED - either pass/fail for the expected result from makepkg
  • SOURCE - files needed to be copied to the test build directory

Tests will be run using the --config and -p options in temporary directories