Blame 0005-tests-rpm2extents-Add-basic-tests-for-rpm2extents.patch

2f13d7
From fd4060dcfbe4127fb0d19f1878d0d8b9f34c7b9a Mon Sep 17 00:00:00 2001
2f13d7
From: chantra <chantr4@gmail.com>
2f13d7
Date: Fri, 28 Jan 2022 08:33:16 -0800
2f13d7
Subject: [PATCH 05/30] [tests][rpm2extents] Add basic tests for rpm2extents
2f13d7
2f13d7
---
2f13d7
 tests/Makefile.am    |  1 +
2f13d7
 tests/rpm2extents.at | 31 +++++++++++++++++++++++++++++++
2f13d7
 tests/rpmtests.at    |  1 +
2f13d7
 3 files changed, 33 insertions(+)
2f13d7
 create mode 100644 tests/rpm2extents.at
2f13d7
2f13d7
diff --git a/tests/Makefile.am b/tests/Makefile.am
2f13d7
index f78e17c3e..fc8a24a5e 100644
2f13d7
--- a/tests/Makefile.am
2f13d7
+++ b/tests/Makefile.am
2f13d7
@@ -36,6 +36,7 @@ TESTSUITE_AT += rpmio.at
2f13d7
 TESTSUITE_AT += rpmio.at
2f13d7
 TESTSUITE_AT += rpmorder.at
2f13d7
 TESTSUITE_AT += rpmvfylevel.at
2f13d7
+TESTSUITE_AT += rpm2extents.at
2f13d7
 EXTRA_DIST += $(TESTSUITE_AT)
2f13d7
 
2f13d7
 ## testsuite data
2f13d7
diff --git a/tests/rpm2extents.at b/tests/rpm2extents.at
2f13d7
new file mode 100644
2f13d7
index 000000000..f943b9af4
2f13d7
--- /dev/null
2f13d7
+++ b/tests/rpm2extents.at
2f13d7
@@ -0,0 +1,31 @@
2f13d7
+#    rpm2extents.at: Some very basic checks
2f13d7
+#
2f13d7
+#    Copyright (C) 2022  Manu Bretelle <chantr4@gmail.com>
2f13d7
+#
2f13d7
+#    This program is free software; you can redistribute it and/or modify
2f13d7
+#    it under the terms of the GNU General Public License as published by
2f13d7
+#    the Free Software Foundation; either version 2 of the License, or
2f13d7
+#    (at your option) any later version.
2f13d7
+#
2f13d7
+#    This program is distributed in the hope that it will be useful,
2f13d7
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
2f13d7
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2f13d7
+#    GNU General Public License for more details.
2f13d7
+#
2f13d7
+#    You should have received a copy of the GNU General Public License
2f13d7
+#    along with this program; if not, write to the Free Software
2f13d7
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
2f13d7
+
2f13d7
+AT_BANNER([rpm2extents tests])
2f13d7
+
2f13d7
+# ------------------------------
2f13d7
+
2f13d7
+# check that transcoder write magic at the end
2f13d7
+AT_SETUP([rpm2extents magic])
2f13d7
+AT_KEYWORDS([rpm2extents])
2f13d7
+AT_CHECK([runroot_other cat /data/RPMS/hello-2.0-1.x86_64.rpm | runroot_other rpm2extents SHA256 | tail -c8],
2f13d7
+[0],
2f13d7
+[KWTSH100],
2f13d7
+[ignore])
2f13d7
+AT_CLEANUP
2f13d7
+
2f13d7
diff --git a/tests/rpmtests.at b/tests/rpmtests.at
2f13d7
index a1adab8e0..205fed6a3 100644
2f13d7
--- a/tests/rpmtests.at
2f13d7
+++ b/tests/rpmtests.at
2f13d7
@@ -21,3 +21,4 @@ m4_include([rpmreplace.at])
2f13d7
 m4_include([rpmconfig.at])
2f13d7
 m4_include([rpmconfig2.at])
2f13d7
 m4_include([rpmconfig3.at])
2f13d7
+m4_include([rpm2extents.at])
2f13d7
-- 
2f13d7
2.35.1
2f13d7