test: '{. -> ./run}/test_sources.py'
Move the runtime tests of source modules into the runtime-tests subdirectory, so `make test-runtime` can pick them up.
This commit is contained in:
parent
cecb27ac82
commit
aaa8854437
3 changed files with 6 additions and 19 deletions
19
.github/workflows/runtime-tests.yml
vendored
19
.github/workflows/runtime-tests.yml
vendored
|
|
@ -55,25 +55,6 @@ jobs:
|
|||
sudo env "PATH=$PATH" python3 -m osbuild --libdir . samples/noop.json
|
||||
done
|
||||
|
||||
source_tests:
|
||||
name: "Source Tests"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Clone Repository"
|
||||
uses: actions/checkout@v2
|
||||
- name: "Install Dependencies"
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install \
|
||||
rpm \
|
||||
systemd-container
|
||||
- name: "Set up Python"
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: "Run Source Tests"
|
||||
run: sudo env "PATH=$PATH" python3 -m unittest -v test.test_sources
|
||||
|
||||
assembler_tests:
|
||||
name: "Assembler Tests"
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
1
test/run/__init__.py
Normal file
1
test/run/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
# The `unittest` module requires `__init__.py` to discover a directory.
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
#
|
||||
# Runtime Tests for Source Modules
|
||||
#
|
||||
|
||||
import contextlib
|
||||
import ctypes
|
||||
import http.server
|
||||
|
|
@ -11,6 +15,7 @@ import unittest
|
|||
|
||||
import osbuild.sources
|
||||
|
||||
|
||||
def errcheck(ret, _func, _args):
|
||||
if ret == -1:
|
||||
e = ctypes.get_errno()
|
||||
Loading…
Add table
Add a link
Reference in a new issue