From aaa8854437fa680bd16cb32e17883bf5fc943810 Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Fri, 24 Apr 2020 09:30:13 +0200 Subject: [PATCH] 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. --- .github/workflows/runtime-tests.yml | 19 ------------------- test/run/__init__.py | 1 + test/{ => run}/test_sources.py | 5 +++++ 3 files changed, 6 insertions(+), 19 deletions(-) create mode 100644 test/run/__init__.py rename test/{ => run}/test_sources.py (98%) diff --git a/.github/workflows/runtime-tests.yml b/.github/workflows/runtime-tests.yml index adc62b67..f00340e4 100644 --- a/.github/workflows/runtime-tests.yml +++ b/.github/workflows/runtime-tests.yml @@ -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 diff --git a/test/run/__init__.py b/test/run/__init__.py new file mode 100644 index 00000000..970d467f --- /dev/null +++ b/test/run/__init__.py @@ -0,0 +1 @@ +# The `unittest` module requires `__init__.py` to discover a directory. diff --git a/test/test_sources.py b/test/run/test_sources.py similarity index 98% rename from test/test_sources.py rename to test/run/test_sources.py index ad99f28a..cf7cff36 100644 --- a/test/test_sources.py +++ b/test/run/test_sources.py @@ -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()