travis: add an osbuild test

Actually test the tools. This simply runs a noop stage followed by
a noop assembler.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2019-07-29 15:56:01 +02:00 committed by Lars Karlitski
parent 659ce42c83
commit fa7a5b985e
3 changed files with 27 additions and 0 deletions

View file

@ -2,9 +2,13 @@ dist: bionic
language: python
python:
- "3.7"
before_install:
- sudo apt-get install -y systemd-container
install:
- pip install pylint
jobs:
include:
- name: pylint
script: pylint osbuild osbuild-run assemblers/* stages/*
- name: pipeline-noop
script: sudo env "PATH=$PATH" python3 -m osbuild --libdir . --output . samples/noop.json

12
assemblers/org.osbuild.noop Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/python3
import json
import sys
def main(_tree, _output_dir, options):
print("Not doing anything with these options:", json.dumps(options))
if __name__ == '__main__':
args = json.load(sys.stdin)
r = main(args["tree"], args["output_dir"], args.get("options", {}))
sys.exit(r)

11
samples/noop.json Normal file
View file

@ -0,0 +1,11 @@
{
"name": "noop",
"stages": [
{
"name": "org.osbuild.noop"
}
],
"assembler": {
"name": "org.osbuild.noop"
}
}