summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-09-15 19:56:25 -0700
committerAnand Avati <avati@redhat.com>2013-09-20 21:12:39 -0700
commit7f608415063f04a1035bfe7d0f8ddfb9f0215e5c (patch)
tree547deabfc9053525165b1d9719640f715aac0e24
parent2e4064fe08e929fb4db30ae63c5cd404ab2d8b20 (diff)
tests: take regression tests out of autotools
make run-tests.sh "location independent" and replace 'make install' with cpio in glusterfs.spec.in Change-Id: I140473c7f558e1e0af93a863b79098ced516a76b BUG: 764966 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5986 Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r--Makefile.am5
-rw-r--r--configure.ac3
-rw-r--r--glusterfs.spec.in6
-rwxr-xr-xrun-tests.sh (renamed from run-tests.sh.in)5
-rw-r--r--tests.mk8
5 files changed, 9 insertions, 18 deletions
diff --git a/Makefile.am b/Makefile.am
index 2210492..598ebb4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,11 +1,10 @@
-include $(top_srcdir)/tests.mk
-
EXTRA_DIST = autogen.sh \
COPYING-GPLV2 COPYING-LGPLV3 \
INSTALL README AUTHORS THANKS NEWS \
glusterfs.spec glusterfs-api.pc.in libgfchangelog.pc.in \
error-codes.json gf-error-codes.h.template \
- gen-headers.py
+ gen-headers.py run-tests.sh \
+ $(shell find $(top_srcdir)/tests -type f -print)
SUBDIRS = argp-standalone libglusterfs rpc api xlators glusterfsd \
$(FUSERMOUNT_SUBDIR) doc extras cli @SYNCDAEMON_SUBDIR@
diff --git a/configure.ac b/configure.ac
index 940dde4..e723dfa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,8 +167,7 @@ AC_CONFIG_FILES([Makefile
geo-replication/Makefile
geo-replication/src/Makefile
geo-replication/syncdaemon/Makefile
- glusterfs.spec
- run-tests.sh])
+ glusterfs.spec])
AC_CANONICAL_HOST
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index 39fc23a..96341ad 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -588,6 +588,8 @@ touch %{buildroot}%{_sharedstatedir}/glusterd/options
touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/nfs-server.vol
touch %{buildroot}%{_sharedstatedir}/glusterd/nfs/run/nfs.pid
+find ./tests ./run-tests.sh -type f | cpio -pd %{buildroot}%{_prefix}/share/glusterfs
+
%clean
%{__rm} -rf %{buildroot}
@@ -790,8 +792,8 @@ fi
%files regression-tests
%defattr(-,root,root,-)
-%{_datarootdir}/glusterfs/*
-%exclude %{_datarootdir}/glusterfs/tests/basic/rpm.t
+%{_prefix}/share/glusterfs/*
+%exclude %{_prefix}/share/glusterfs/tests/basic/rpm.t
%post server
# Legacy server
diff --git a/run-tests.sh.in b/run-tests.sh
index a75b681..128404e 100755
--- a/run-tests.sh.in
+++ b/run-tests.sh
@@ -4,9 +4,8 @@
function _init()
{
- prefix="@prefix@";
- exec_prefix="@exec_prefix@";
- regression_testsdir="@datarootdir@/glusterfs";
+ regression_testsdir=$(dirname $0);
+
if [ ! -f ${regression_testsdir}/tests/include.rc ]; then
echo "Seems like GlusterFS quality tests are corrupted..aborting!!"
exit 1
diff --git a/tests.mk b/tests.mk
deleted file mode 100644
index 4760b76..0000000
--- a/tests.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-ALL_TEST_FILES = $(shell find $(top_srcdir)/tests -type f -print)
-
-regressiontestsdir = $(datarootdir)/glusterfs
-
-nobase_dist_regressiontests_DATA = $(ALL_TEST_FILES) run-tests.sh
-
-install-data-hook:
- chmod +x $(DESTDIR)$(datarootdir)/glusterfs/run-tests.sh