From: Viktor M. <mih...@us...> - 2005-04-13 13:01:20
|
Update of /cvsroot/sblim/cmpi-base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12796 Modified Files: Makefile.am acinclude.m4 configure.ac sblim-cmpi-base.spec.in Added Files: README.TEST Log Message: Bug 1179465: Added testsuite support to the automake build. This included additional check macros in acinclude.m4 (phew). Further the RPM specs had to be adapted. Index: sblim-cmpi-base.spec.in =================================================================== RCS file: /cvsroot/sblim/cmpi-base/sblim-cmpi-base.spec.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sblim-cmpi-base.spec.in 6 Apr 2005 16:29:47 -0000 1.1 +++ sblim-cmpi-base.spec.in 13 Apr 2005 13:01:11 -0000 1.2 @@ -29,6 +29,15 @@ %Description devel SBLIM Base Provider Development Package +%Package test +Summary: SBLIM Base Instrumentation Testcase Files +Group: Systems Management/Base +Requires: %{name} = %{version} +Requires: sblim-wbemcli + +%Description test +SBLIM Base Provider Testcase Files for the SBLIM Testsuite + %prep %setup -n %{name}-%{version} @@ -39,7 +48,7 @@ %build -%configure +%configure TESTSUITEDIR=%{_datadir}/sblim-testsuite make %clean @@ -102,4 +111,9 @@ %defattr(-,root,root) %{_includedir} +%files test + +%defattr(-,root,root) +%{_datadir}/sblim-testsuite + Index: acinclude.m4 =================================================================== RCS file: /cvsroot/sblim/cmpi-base/acinclude.m4,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- acinclude.m4 11 Apr 2005 15:45:29 -0000 1.4 +++ acinclude.m4 13 Apr 2005 13:01:11 -0000 1.5 @@ -204,10 +204,19 @@ [ AC_MSG_CHECKING(for CMPI provider directory) _DIRS="$libdir/cmpi" + save_exec_prefix=${exec_prefix} + save_prefix=${prefix} + if test xNONE == x${prefix}; then + prefix=/usr/local + fi + if test xNONE == x${exec_prefix}; then + exec_prefix=$prefix + fi for _dir in $_DIRS do + _xdir=`eval echo $_dir` AC_MSG_CHECKING( $_dir ) - if test -d $_dir ; then + if test -d $_xdir ; then dnl Found it AC_MSG_RESULT(yes) if test x"$PROVIDERDIR" == x ; then @@ -220,6 +229,8 @@ PROVIDERDIR="$libdir"/cmpi AC_MSG_RESULT(implied: $PROVIDERDIR) fi + exec_prefix=$save_exec_prefix + prefix=$save_prefix ] ) @@ -256,3 +267,43 @@ ] ) +dnl +dnl The check for the SBLIM test suite +dnl Sets the TESTSUITEDIR variable and the TESTSUITE conditional +dnl + +AC_DEFUN([CHECK_TESTSUITE], + [ + AC_MSG_CHECKING(for SBLIM testsuite) + _DIRS="$datadir/sblim-testsuite" + save_exec_prefix=${exec_prefix} + save_prefix=${prefix} + if test xNONE == x${prefix}; then + prefix=/usr/local + fi + if test xNONE == x${exec_prefix}; then + exec_prefix=$prefix + fi + for _name in $_DIRS + do + AC_MSG_CHECKING( $_name ) + _xname=`eval echo $_name` + if test -x $_xname/run.sh ; then + dnl Found it + AC_MSG_RESULT(yes) + if test x"$TESTSUITEDIR" == x; then + TESTSUITEDIR=$_name + fi + AC_SUBST(TESTSUITEDIR) + break; + fi + done + if test x"$TESTSUITEDIR" == x ; then + AC_MSG_RESULT(no) + fi + AM_CONDITIONAL(TESTSUITE,[test x"$TESTSUITEDIR" != x]) + exec_prefix=$save_exec_prefix + prefix=$save_prefix + ] +) + Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/cmpi-base/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- configure.ac 8 Apr 2005 11:48:47 -0000 1.3 +++ configure.ac 13 Apr 2005 13:01:11 -0000 1.4 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(SBLIM BaseOS Providers Base, 1.4.3, sbl...@li...,sblim-cmpi-base) +AC_INIT(SBLIM BaseOS Providers Base, 1.4.3t, sbl...@li...,sblim-cmpi-base) AC_CONFIG_SRCDIR([OSBase_Common.c]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE @@ -10,7 +10,7 @@ AC_CANONICAL_HOST case $host_cpu in i*86) HW=INTEL;; - s390) HW=S390;; + s390*) HW=S390;; ppc*) HW=PPC;; x86_64) HW=X86_64;; ia64) HW=IA64;; @@ -18,6 +18,7 @@ esac # Configuration Arguments +AC_ARG_VAR([TESTSUITEDIR],[the directory where the SBLIM testsuite resides.]) AC_ARG_VAR([PROVIDERDIR],[the directory where the CMPI providers will be installed.]) AC_ARG_VAR([CIMSERVER],[the target CIM server (pegasus|sfcb|openwbem|sniacimom).]) @@ -38,6 +39,9 @@ # Check for CIM Server (defined in acinclude.m4) CHECK_CIMSERVER +# Check for the Testsuite (defined in acinclude.m4) +CHECK_TESTSUITE + # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC @@ -88,6 +92,11 @@ else INDICATION_SUPPORT=Disabled fi +if test x"$TESTSUITEDIR" == x; then + TESTSUITE_SUPPORT=Disabled +else + TESTSUITE_SUPPORT=Enabled +fi # Display configuration options echo "-------------------------------------------------------" echo "Configuration for $PACKAGE complete." @@ -97,6 +106,10 @@ echo "PROVIDERDIR: " $PROVIDERDIR echo "CPPFLAGS:" $CPPFLAGS echo "Indication Support" $INDICATION_SUPPORT +echo "Test Suite Support" $TESTSUITE_SUPPORT +if test x"$TESTSUITEDIR" != x; then +echo "TESTSUITEDIR " $TESTSUITEDIR +fi echo "-------------------------------------------------------" AC_OUTPUT --- NEW FILE: README.TEST --- Test Environment for SBLIM Base Instrumentation The SBLIM project offers a Test Suite to perform tests against the provider implementation and consistence tests against system values. Prerequisites ............. - sblim-cmpi-base package propertly installed - testsuite package Pepare Test ........... done automatically during configure Install Configuration Files ........................... done during make install Run Test ........ Run the test in the testsuite directory (typically /usr/share/sblim-testsuite) by executing . test-cmpi-base.sh echo Status: $SBLIM_TESTSUITE_RUN Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/cmpi-base/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 11 Apr 2005 14:24:00 -0000 1.2 +++ Makefile.am 13 Apr 2005 13:01:11 -0000 1.3 @@ -170,3 +170,39 @@ dist-hook: test -d "$(distdir)" && rm -rf `find $(distdir) -type d -name CVS` + +# +# Automake instructions for ./test subdir +# +EXTRA_DIST+=test +if TESTSUITE +testsuitedir=@TESTSUITEDIR@ +testsuitesystemdir=@TESTSUITEDIR@/system/linux +testsuitecimdir=@TESTSUITEDIR@/cim + +testsuite_SCRIPTS=test/test-cmpi-base.sh +testsuitesystem_DATA=test/system/linux/Linux_CSProcessor.system \ + test/system/linux/Linux_ComputerSystem.system \ + test/system/linux/Linux_OSProcess.system \ + test/system/linux/Linux_OperatingSystem.system \ + test/system/linux/Linux_Processor.system \ + test/system/linux/Linux_RunningOS.system \ + test/system/linux/Linux_UnixProcess.system +testsuitesystem_SCRIPTS=test/system/linux/Linux_OperatingSystem.version.sh \ + test/system/linux/Linux_Processor.pl \ + test/system/linux/Linux_UnixProcess.pl \ + test/system/linux/createKeyFiles.sh +testsuitecim_DATA=test/cim/Linux_CSProcessor.cim \ + test/cim/Linux_ComputerSystem.cim \ + test/cim/Linux_OSProcess.cim \ + test/cim/Linux_OperatingSystem.cim \ + test/cim/Linux_Processor.cim \ + test/cim/Linux_RunningOS.cim \ + test/cim/Linux_UnixProcess.cim + +runtest: install + cd $(DESTDIR)$(TESTSUITEDIR) && ./test-cmpi-base.sh + +doc_DATA+=README.TEST +EXTRA_DIST+=README.TEST +endif |