From 07e6a2cf99aae1abfdc9f60fc8a84480baee8a37 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 17 Nov 2020 12:46:17 +0100 Subject: [PATCH] tests: Work around summary mtime cache issue (for 1.8 branch) This adds a sleep(1) before each summary update (if there is a pre-existing summary file). This avoids issues where a new summary file get the same mtime (in seconds precision). This is kind of a hacky work around, but it is good enought to get the flatpak-1.8 branch working with latest ostree, and master has a better fix already. --- tests/libtest.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/libtest.sh b/tests/libtest.sh index 60268640..8dab5a6c 100644 --- a/tests/libtest.sh +++ b/tests/libtest.sh @@ -360,6 +360,10 @@ update_repo () { collection_args= fi + if test -f repos/${REPONAME}/summary; then + sleep 1 # ensure we get a new timestamp on the summary files + fi + ${FLATPAK} build-update-repo ${collection_args} ${GPGARGS:-${FL_GPGARGS}} ${UPDATE_REPO_ARGS-} repos/${REPONAME} }