Difference between revisions of "User:Allan/Makepkg Test Suite"

From ArchWiki
Jump to: navigation, search
(Created page with '=Outline= The test suite will be written in python. It will have the following components (naming not fixed...) * pbparse.py - A simple PKGBUILD parser * pbtest.py - A script …')
 
(Example Test Suite PKGBUID: Typo)
 
Line 8: Line 8:
 
* test/test??? - test suite PKGBUILDs  
 
* test/test??? - test suite PKGBUILDs  
  
=Example Test Suite PKGBUID=
+
=Example Test Suite PKGBUILD=
  
 
The test suite are standard PKGBUILDs with information on how they are intended to be run in the header comments.
 
The test suite are standard PKGBUILDs with information on how they are intended to be run in the header comments.

Latest revision as of 14:21, 4 September 2009

Outline

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

  • pbparse.py - A simple PKGBUILD parser
  • pbtest.py - A script to parse the test data
  • mptest.py - 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
# FLAGS:
# EXPECTED: pass
# SOURCE:

pkgname=NAME
pkgver=VERSION
pkgrel=1
arch=('any')

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