Blame SOURCES/openscap-1.3.7-PR-1844-fix-test-ds-misc-2.patch

f29ceb
From 650656bdac5e8e4df30c11bb4dbc830aab8baa78 Mon Sep 17 00:00:00 2001
f29ceb
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
f29ceb
Date: Tue, 1 Feb 2022 15:06:33 +0100
f29ceb
Subject: [PATCH] Prevent fails of test_ds_misc.sh
f29ceb
f29ceb
Other files from which the datastream is composed might also
f29ceb
affect the timestamp attributes in result document depending
f29ceb
on their mtime.
f29ceb
---
f29ceb
 tests/DS/test_ds_misc.sh | 4 +++-
f29ceb
 1 file changed, 3 insertions(+), 1 deletion(-)
f29ceb
f29ceb
diff --git a/tests/DS/test_ds_misc.sh b/tests/DS/test_ds_misc.sh
f29ceb
index cffbef303..1777c44f4 100755
f29ceb
--- a/tests/DS/test_ds_misc.sh
f29ceb
+++ b/tests/DS/test_ds_misc.sh
f29ceb
@@ -270,7 +270,9 @@ function test_source_date_epoch() {
f29ceb
 	export SOURCE_DATE_EPOCH="1583410177"
f29ceb
 	export TZ=UTC
f29ceb
 	# ensure the file mtime is always newer than the $timestamp
f29ceb
-	touch -c "$xccdf"
f29ceb
+	touch -c "$srcdir/sds_multiple_oval/first-oval.xml"
f29ceb
+	touch -c "$srcdir/sds_multiple_oval/multiple-oval-xccdf.xml"
f29ceb
+	touch -c "$srcdir/sds_multiple_oval/second-oval.xml"
f29ceb
 	$OSCAP ds sds-compose "$xccdf" "$result"
f29ceb
 	assert_exists 3 '//ds:component[@timestamp="'$timestamp'"]'
f29ceb
 	rm -f "$result"