Skip to content

Convert to new style integration tests

Closes issue #2 (closed)

Converting the tests

The old (bash) style integration tests have been converted to to the new style integration test which use pytest - similar to those used in the main repo.

This branch has removed all of the old style tests in thie integration-tests/ directory and has working pylint tests within tests/ for the following plugins:

  • Docker-source
  • Dpkg-build
  • Quilt-build

Running the tests

Just like in the main repo, the tests can be run by executing ./setup.py test

Things to note

  1. The perimissions of one of the files had to be explicitly altered by prepending a build command: chmod +x <filename>
  2. The plugins do not depend on the same Alpine Linux base (https://gitlab.com/BuildStream/buildstream/blob/master/tests/integration/project/elements/base/base-alpine.bst) like the integration tests in the main repo do.
    • Instead docker depends on an Alpine Linux image from Dockerhub
    • Quilt and Dpkg-build depend on the base freedesktop platform
  3. In order, for the tests to run with pytest we need to use testutils which can be found in the main repo (https://gitlab.com/BuildStream/buildstream/tree/master/tests/testutils). As a temporary workaround I just copied the testutils/ directory into bst-external/tests/ However, we probably want to avoid having duplicate code.
Edited by James Ennis

Merge request reports

Loading