Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| faa14baede | |||
| e7f851fe6d | |||
| 499d04246c | |||
| e0e5cb41e3 | |||
| cbd3700a65 | |||
| 893de727f5 | |||
| 2b0dbf1d7b |
@@ -0,0 +1,53 @@
|
|||||||
|
From 84a33f8ada6fba17641e71aef24130b1c0022fb9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||||
|
Date: Fri, 20 Jun 2025 11:30:03 -0400
|
||||||
|
Subject: [PATCH] Increase the value of FS_SLEEP in the tests (fix #4)
|
||||||
|
|
||||||
|
---
|
||||||
|
flexcache/testsuite/test_byhash.py | 2 +-
|
||||||
|
flexcache/testsuite/test_bymtime.py | 2 +-
|
||||||
|
flexcache/testsuite/test_header.py | 2 +-
|
||||||
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/flexcache/testsuite/test_byhash.py b/flexcache/testsuite/test_byhash.py
|
||||||
|
index d0aa8e7..9d15fdb 100644
|
||||||
|
--- a/flexcache/testsuite/test_byhash.py
|
||||||
|
+++ b/flexcache/testsuite/test_byhash.py
|
||||||
|
@@ -8,7 +8,7 @@ from flexcache import DiskCacheByHash
|
||||||
|
|
||||||
|
# These sleep time is needed when run on GitHub Actions
|
||||||
|
# If not given or too short, some mtime changes are not visible.
|
||||||
|
-FS_SLEEP = 0.010
|
||||||
|
+FS_SLEEP = 0.100
|
||||||
|
|
||||||
|
|
||||||
|
def parser(p: pathlib.Path):
|
||||||
|
diff --git a/flexcache/testsuite/test_bymtime.py b/flexcache/testsuite/test_bymtime.py
|
||||||
|
index 0b3dc94..72cfeba 100644
|
||||||
|
--- a/flexcache/testsuite/test_bymtime.py
|
||||||
|
+++ b/flexcache/testsuite/test_bymtime.py
|
||||||
|
@@ -8,7 +8,7 @@ from flexcache import DiskCacheByMTime
|
||||||
|
|
||||||
|
# These sleep time is needed when run on GitHub Actions
|
||||||
|
# If not given or too short, some mtime changes are not visible.
|
||||||
|
-FS_SLEEP = 0.010
|
||||||
|
+FS_SLEEP = 0.100
|
||||||
|
|
||||||
|
|
||||||
|
def parser(p: pathlib.Path):
|
||||||
|
diff --git a/flexcache/testsuite/test_header.py b/flexcache/testsuite/test_header.py
|
||||||
|
index f27a516..1301273 100644
|
||||||
|
--- a/flexcache/testsuite/test_header.py
|
||||||
|
+++ b/flexcache/testsuite/test_header.py
|
||||||
|
@@ -13,7 +13,7 @@ import flexcache
|
||||||
|
|
||||||
|
# These sleep time is needed when run on GitHub Actions
|
||||||
|
# If not given or too short, some mtime changes are not visible.
|
||||||
|
-FS_SLEEP = 0.010
|
||||||
|
+FS_SLEEP = 0.100
|
||||||
|
|
||||||
|
|
||||||
|
def test_empty(tmp_path):
|
||||||
|
--
|
||||||
|
2.49.0
|
||||||
|
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
From 84a33f8ada6fba17641e71aef24130b1c0022fb9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||||
|
Date: Fri, 20 Jun 2025 11:30:03 -0400
|
||||||
|
Subject: [PATCH] Increase the value of FS_SLEEP in the tests (fix #4)
|
||||||
|
|
||||||
|
---
|
||||||
|
flexcache/testsuite/test_byhash.py | 2 +-
|
||||||
|
flexcache/testsuite/test_bymtime.py | 2 +-
|
||||||
|
flexcache/testsuite/test_header.py | 2 +-
|
||||||
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/flexcache/testsuite/test_byhash.py b/flexcache/testsuite/test_byhash.py
|
||||||
|
index d0aa8e7..9d15fdb 100644
|
||||||
|
--- a/flexcache/testsuite/test_byhash.py
|
||||||
|
+++ b/flexcache/testsuite/test_byhash.py
|
||||||
|
@@ -8,7 +8,7 @@
|
||||||
|
|
||||||
|
# These sleep time is needed when run on GitHub Actions
|
||||||
|
# If not given or too short, some mtime changes are not visible.
|
||||||
|
-FS_SLEEP = 0.010
|
||||||
|
+FS_SLEEP = 0.100
|
||||||
|
|
||||||
|
|
||||||
|
def parser(p: pathlib.Path):
|
||||||
|
diff --git a/flexcache/testsuite/test_bymtime.py b/flexcache/testsuite/test_bymtime.py
|
||||||
|
index 0b3dc94..72cfeba 100644
|
||||||
|
--- a/flexcache/testsuite/test_bymtime.py
|
||||||
|
+++ b/flexcache/testsuite/test_bymtime.py
|
||||||
|
@@ -8,7 +8,7 @@
|
||||||
|
|
||||||
|
# These sleep time is needed when run on GitHub Actions
|
||||||
|
# If not given or too short, some mtime changes are not visible.
|
||||||
|
-FS_SLEEP = 0.010
|
||||||
|
+FS_SLEEP = 0.100
|
||||||
|
|
||||||
|
|
||||||
|
def parser(p: pathlib.Path):
|
||||||
|
diff --git a/flexcache/testsuite/test_header.py b/flexcache/testsuite/test_header.py
|
||||||
|
index f27a516..1301273 100644
|
||||||
|
--- a/flexcache/testsuite/test_header.py
|
||||||
|
+++ b/flexcache/testsuite/test_header.py
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
|
||||||
|
# These sleep time is needed when run on GitHub Actions
|
||||||
|
# If not given or too short, some mtime changes are not visible.
|
||||||
|
-FS_SLEEP = 0.010
|
||||||
|
+FS_SLEEP = 0.100
|
||||||
|
|
||||||
|
|
||||||
|
def test_empty(tmp_path):
|
||||||
+16
-19
@@ -7,9 +7,21 @@ License: BSD-3-Clause
|
|||||||
URL: https://github.com/hgrecco/flexcache
|
URL: https://github.com/hgrecco/flexcache
|
||||||
Source: %{pypi_source flexcache}
|
Source: %{pypi_source flexcache}
|
||||||
|
|
||||||
BuildArch: noarch
|
# Increase the value of FS_SLEEP in the tests (fix #4)
|
||||||
|
# https://github.com/hgrecco/flexcache/pull/5
|
||||||
|
#
|
||||||
|
# Fixes:
|
||||||
|
#
|
||||||
|
# test_name_by_paths fails flakily on ppc64le and s390x
|
||||||
|
# https://github.com/hgrecco/flexcache/issues/4
|
||||||
|
Patch: %{url}/pull/5.patch
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildSystem: pyproject
|
||||||
|
BuildOption(install): -l flexcache
|
||||||
|
# We remove flexcache.testsuite manually in %%install.
|
||||||
|
BuildOption(check): -e 'flexcache.testsuite*'
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
# See the test extra in pyproject.toml. We list test dependencies manually
|
# See the test extra in pyproject.toml. We list test dependencies manually
|
||||||
# since we do not want pytest-cov
|
# since we do not want pytest-cov
|
||||||
@@ -31,22 +43,7 @@ Summary: %{summary}
|
|||||||
%description -n python3-flexcache %{common_description}
|
%description -n python3-flexcache %{common_description}
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%install -a
|
||||||
%autosetup -n flexcache-%{version}
|
|
||||||
|
|
||||||
|
|
||||||
%generate_buildrequires
|
|
||||||
%pyproject_buildrequires
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
|
||||||
%pyproject_wheel
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
|
||||||
%pyproject_install
|
|
||||||
%pyproject_save_files -l flexcache
|
|
||||||
|
|
||||||
# Upstream probably doesn’t want to install flexcache.testsuite, but we don’t
|
# Upstream probably doesn’t want to install flexcache.testsuite, but we don’t
|
||||||
# know how to suggest a fix given “[BUG] options.packages.find.exclude not
|
# know how to suggest a fix given “[BUG] options.packages.find.exclude not
|
||||||
# taking effect when include_package_data = True”,
|
# taking effect when include_package_data = True”,
|
||||||
@@ -58,7 +55,7 @@ rm -rvf '%{buildroot}%{python3_sitelib}/flexcache/testsuite'
|
|||||||
sed -r -i '/\/flexcache\/testsuite/d' %{pyproject_files}
|
sed -r -i '/\/flexcache\/testsuite/d' %{pyproject_files}
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check -a
|
||||||
%pytest
|
%pytest
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user