psss / rpms / libguestfs

Forked from rpms/libguestfs 5 years ago
Clone
Blob Blame History Raw
From e0e0c9d9a13bb6326b9b35b34d963ce6d6f6eb74 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 5 Nov 2013 07:25:46 +0000
Subject: [PATCH] builder/website: Add index validation test script.

(cherry picked from commit 154bfb7dd46e7998eed1d40ead95923590763739)
---
 builder/website/Makefile.am |  4 ++++
 builder/website/validate.sh | 24 ++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100755 builder/website/validate.sh

diff --git a/builder/website/Makefile.am b/builder/website/Makefile.am
index fae8c52..61234a2 100644
--- a/builder/website/Makefile.am
+++ b/builder/website/Makefile.am
@@ -39,3 +39,7 @@ EXTRA_DIST = \
 	ubuntu-*.*.xz.sig
 
 CLEANFILES = *~
+
+# Validates the index file.
+TESTS_ENVIRONMENT = $(top_builddir)/run --test
+TESTS = validate.sh
diff --git a/builder/website/validate.sh b/builder/website/validate.sh
new file mode 100755
index 0000000..f09e30c
--- /dev/null
+++ b/builder/website/validate.sh
@@ -0,0 +1,24 @@
+#!/bin/bash -
+# libguestfs virt-builder validate index
+# Copyright (C) 2013 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+export LANG=C
+set -e
+
+../virt-index-validate index
+../virt-index-validate index.asc
+
-- 
1.8.3.1