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

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