| |
@@ -1,7 +1,6 @@
|
| |
- # Disable the tests for now, too many unavailable dependencies.
|
| |
# Tests works with enabled network. Also possible to run tests in COPR:
|
| |
# https://download.copr.fedorainfracloud.org/results/atim/buildstream/fedora-35-x86_64/02660103-buildstream/builder-live.log.gz
|
| |
- %bcond_with test
|
| |
+ %bcond_without test
|
| |
|
| |
Name: buildstream
|
| |
Summary: Build/integrate software stacks
|
| |
@@ -36,27 +35,27 @@
|
| |
BuildRequires: python3-ujson
|
| |
|
| |
%if %{with test}
|
| |
- # These from cov-requirements.in + dev-requirements.in
|
| |
- BuildRequires: python3-coverage >= 4.4
|
| |
- BuildRequires: python3-pylint >= 2.10
|
| |
+ BuildRequires: zip
|
| |
+ BuildRequires: tar
|
| |
+ BuildRequires: lzip
|
| |
+ BuildRequires: git-core
|
| |
+ BuildRequires: bzr
|
| |
+ BuildRequires: ostree
|
| |
+ BuildRequires: python3-pip
|
| |
+ # These from dev-requirements.in
|
| |
BuildRequires: python3-pytest >= 3.7
|
| |
- BuildRequires: python3-pytest-cov >= 2.5
|
| |
- BuildRequires: python3-pytest-timeout
|
| |
- BuildRequires: python3-pytest-xdist
|
| |
- BuildRequires: python3-pep8
|
| |
BuildRequires: python3-pytest-datafiles
|
| |
BuildRequires: python3-pytest-env
|
| |
- %endif
|
| |
-
|
| |
- # These aren't in Fedora any more, preventing us from running the tests.
|
| |
- # Buildstream master moved to pycodestyle though, so this will sort itself out.
|
| |
- # * python3-pep8
|
| |
- # * python3-pytest-pep8
|
| |
+ BuildRequires: python3-pytest-timeout
|
| |
+ BuildRequires: python3-pytest-xdist
|
| |
+ # Not available: pyftpdlib (we skip the associated tests)
|
| |
|
| |
- # These aren't in Fedora yet, preventing us from running the tests
|
| |
- # * python3-pytest-datafiles
|
| |
- # * python3-pytest-env
|
| |
- # * python3-pytest-pylint
|
| |
+ # We do not need linters (nor omitted coverage from cov-requirements.in); see:
|
| |
+ # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
| |
+ #
|
| |
+ # BuildRequires: python3-pep8
|
| |
+ # BuildRequires: python3-pylint >= 2.10
|
| |
+ %endif
|
| |
|
| |
Requires: bubblewrap >= 0.1.2
|
| |
Requires: fuse
|
| |
@@ -130,7 +129,36 @@
|
| |
|
| |
%if %{with test}
|
| |
%check
|
| |
- %{__python3} setup.py test
|
| |
+ # The following fail in koji but not in a local mock build; this seems to have
|
| |
+ # something to do with sandboxing.
|
| |
+ k="${k-}${k+ and }not test_push_pull"
|
| |
+ k="${k-}${k+ and }not test_push_pull_all"
|
| |
+ k="${k-}${k+ and }not test_pull_secondary_cache"
|
| |
+ k="${k-}${k+ and }not test_push_pull_specific_remote"
|
| |
+ k="${k-}${k+ and }not test_push_pull_non_strict"
|
| |
+ k="${k-}${k+ and }not test_push_pull_track_non_strict"
|
| |
+ k="${k-}${k+ and }not test_push_pull_cross_junction"
|
| |
+ k="${k-}${k+ and }not test_pull_missing_blob"
|
| |
+ k="${k-}${k+ and }not test_pull_access_rights"
|
| |
+ k="${k-}${k+ and }not test_push"
|
| |
+ k="${k-}${k+ and }not test_push_all"
|
| |
+ k="${k-}${k+ and }not test_push_after_pull"
|
| |
+ k="${k-}${k+ and }not test_artifact_expires"
|
| |
+ k="${k-}${k+ and }not test_artifact_too_large"
|
| |
+ k="${k-}${k+ and }not test_recently_pulled_artifact_does_not_expire"
|
| |
+ k="${k-}${k+ and }not test_push_cross_junction"
|
| |
+ k="${k-}${k+ and }not test_push_already_cached"
|
| |
+ # This test expects 'arch' to be 'x86_64' or 'x86_32', so it fails when the
|
| |
+ # builder is anything but x86_64. Even 32-bit x86 fails, as 'arch' is 'i686'.
|
| |
+ # Since the package is noarch, we just skip it unconditionally.
|
| |
+ k="${k-}${k+ and }not test_project_error"
|
| |
+ # Ignored tests would require pyftpdlib, which is not packaged
|
| |
+ %pytest -vv -k "${k-}" \
|
| |
+ --ignore=tests/testutils/file_server.py \
|
| |
+ --ignore=tests/testutils/ftp_server.py \
|
| |
+ --ignore=tests/sources/remote.py \
|
| |
+ --ignore=tests/sources/tar.py \
|
| |
+ --ignore=tests/sources/zip.py
|
| |
%endif
|
| |
|
| |
|
| |
I just packaged python-pytest-env, and had a look around to see which packages might have had to patch out a
pytest-env
dependency while it was not available.This PR demonstrates that it is now possible to run most of buildstream’s tests.