No description
Find a file
David Rheinsberg ff8cd76def test: provide Makefile convenience targets
Add convenience targets to `Makefile` which can run common sets of
tests. For now, add a target for pylint, module-unittests,
pipeline-runtime-tests, as well as all tests.

Currently, it is quite cumbersome to run a reasonable test-setup
locally. Pylint invokation is rather complex, the unittests and runtime
tests in ./test are mixed, and not all tests in ./test can necessarily
be run from a development system.

This commit prepares for a simpler setup:

  * Add `make test-pylint` to run pylint as it is run by CI.

  * Add `make test-module` to run all module-unittests. This is meant to
    be fast (preferably close to instant) and easy to run during
    development to do a short check whether there are obvious typos or
    other errors in local changes.
    If we can keep these tests to machine-local requirements, if we
    avoid any sleeps or heavy computations, then this will remain a
    convenient test-suite to run locally without having to wait for
    30min. In other words: We should be able to keep this under 10s (and
    for the long term under 1min) easily.

  * Add `make test-runtime` to run all osbuild pipeline executions. This
    is not meant to be fast, but thorough. This will require external
    sources (preferably limited to a suitable container image with
    everything embedded). This will very likely not be run during
    development, but rather by the CI.

  * Add `make test-all` to run all tests. Very handy for shy people when
    the chance of embarrassing copy-paste mistakes is too high to push
    publicly.

Additionally to these new targets, this PR introduces 2 new directories
in ./test: ./test/mod/ and ./test/run/
These are meant as equivalent to `test-module` and `test-runtime`. The
reason is that preferably we stick to the auto-discovery of `unittest`
to enumerate tests, rather than enrolling our own or having to enumerate
them explicitly somewhere.
However, we need some way to tell `unittest` which test belongs into
which group. The easiest setup is likely to just use sub-directories.
Note that `test-all` picks all tests independently of where they are
put, even if they are in further different sub-modules under ./test.

For now, no tests are moved into the new directories. I expect this to
take a bit, since there are several out-standing PRs that modify ./test.
I intend to do the final move once we agreed on this and we synchronized
our test-modifications.
2020-04-24 15:50:44 +02:00
.github/workflows test: provide Makefile convenience targets 2020-04-24 15:50:44 +02:00
assemblers osbuild: convert to jsoncomm 2020-04-21 13:47:38 +02:00
docs osbuild: add --output-directory=DIR 2020-04-15 15:40:17 +02:00
jenkins 🥊 Resilient testing + log gathering 2020-04-22 17:42:40 +00:00
osbuild buildroot: micro cleanups for some strings 2020-04-24 15:49:03 +02:00
runners osbuild: convert to jsoncomm 2020-04-21 13:47:38 +02:00
samples samples: fix grub2-legacy in base-qcow2 2020-04-20 18:58:53 +02:00
schemas schema: add json-schema describing our manifest 2020-03-07 13:43:24 +01:00
sources osbuild: unify libdir handling 2020-04-21 13:44:43 +02:00
stages osbuild: cleanup contextlib usage 2020-04-21 16:02:20 +02:00
test util/linux: add explicit FS_IMMUTABLE_FL helpers 2020-04-21 14:46:02 +02:00
.editorconfig editorconfig: add one matching current style 2019-12-13 18:15:08 +01:00
.gitignore .gitignore: remove old ignored directory 2020-03-06 11:57:17 +01:00
.pylintrc pylint: disable too-many-arguments rule 2019-07-24 12:55:48 +02:00
.travis.yml ci: import runtime tests to github actions 2020-03-24 16:08:24 +01:00
LICENSE Revert "Fill in the license template" 2019-11-18 12:23:10 +01:00
Makefile test: provide Makefile convenience targets 2020-04-24 15:50:44 +02:00
NEWS.md NEWS: add v12 entry 2020-04-15 18:21:03 +02:00
osbuild.spec osbuild: unify libdir handling 2020-04-21 13:44:43 +02:00
README.md docs: refactor README 2020-03-02 21:34:09 +01:00
setup.py util: mark as module 2020-04-21 17:00:04 +02:00
tree-diff tools/tree-diff: strip NULL character from selinux xattr 2019-10-08 21:39:35 +02:00

OSBuild

Build-Pipelines for Operating System Artifacts

OSBuild is a pipeline-based build system for operating system artifacts. It defines a universal pipeline description and a build system to execute them, producing artifacts like operating system images, working towards an image build pipeline that is more comprehensible, reproducible, and extendable.

See the osbuild(1) man-page for details on how to run osbuild, the definition of the pipeline description, and more.

Project

Requirements

The requirements for this project are:

  • python >= 3.7
  • systemd-nspawn >= 244

Additionally, the built-in stages require:

  • bash >= 5.0
  • coreutils >= 8.31
  • curl >= 7.68
  • qemu-img >= 4.2.0
  • rpm >= 4.15
  • tar >= 1.32
  • util-linux >= 235

At build-time, the following software is required:

  • python-docutils >= 0.13
  • pkg-config >= 0.29

Build

The standard python package system is used. Consult upstream documentation for detailed help. In most situations the following commands are sufficient to build and install from source:

python setup.py build
python setup.py install --skip-build --root=/

The man-pages require python-docutils and can be built via:

rst2man docs/<input-file>.rst <output-file>

Repository:

License:

  • Apache-2.0
  • See LICENSE file for details.