[rhmessaging-commits] rhmessaging commits: r1648 - in store/trunk/cpp: tests/jrnl and 1 other directories.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Wed Feb 6 14:31:17 EST 2008
Author: kpvdr
Date: 2008-02-06 14:31:17 -0500 (Wed, 06 Feb 2008)
New Revision: 1648
Modified:
store/trunk/cpp/bootstrap
store/trunk/cpp/configure.ac
store/trunk/cpp/tests/jrnl/Makefile.am
store/trunk/cpp/tests/jrnl/jtt/Makefile.am
store/trunk/cpp/tests/jrnl/jtt/args.cpp
store/trunk/cpp/tests/jrnl/jtt/args.hpp
store/trunk/cpp/tests/jrnl/jtt/configure.ac
store/trunk/cpp/tests/jrnl/jtt/test_mgr.cpp
store/trunk/cpp/tests/jrnl/run-journal-tests
Log:
Linked Journal Test Tool (jtt) to top-level make, added jtt as part of journal test
Modified: store/trunk/cpp/bootstrap
===================================================================
--- store/trunk/cpp/bootstrap 2008-02-06 19:27:44 UTC (rev 1647)
+++ store/trunk/cpp/bootstrap 2008-02-06 19:31:17 UTC (rev 1648)
@@ -34,4 +34,4 @@
automake --add-missing
autoconf
-# cd tests/jrnl/jtt && ./bootstrap
+cd tests/jrnl/jtt && ./bootstrap
Modified: store/trunk/cpp/configure.ac
===================================================================
--- store/trunk/cpp/configure.ac 2008-02-06 19:27:44 UTC (rev 1647)
+++ store/trunk/cpp/configure.ac 2008-02-06 19:31:17 UTC (rev 1648)
@@ -21,7 +21,7 @@
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([rhm], [0.2], [rhm-users at redhat.com])
+AC_INIT([rhm], [0.2], [rhemrg-users-list at redhat.com])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([dist-bzip2])
@@ -190,6 +190,6 @@
docs/Makefile
])
-dnl AC_CONFIG_SUBDIRS([tests/jrnl/jtt])
+AC_CONFIG_SUBDIRS([tests/jrnl/jtt])
AC_OUTPUT
Modified: store/trunk/cpp/tests/jrnl/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/Makefile.am 2008-02-06 19:27:44 UTC (rev 1647)
+++ store/trunk/cpp/tests/jrnl/Makefile.am 2008-02-06 19:31:17 UTC (rev 1648)
@@ -25,7 +25,7 @@
INCLUDES=-I../../lib
-# SUBDIRS = jtt
+SUBDIRS = jtt
TESTS = \
_ut_time_ns \
Modified: store/trunk/cpp/tests/jrnl/jtt/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/Makefile.am 2008-02-06 19:27:44 UTC (rev 1647)
+++ store/trunk/cpp/tests/jrnl/jtt/Makefile.am 2008-02-06 19:31:17 UTC (rev 1648)
@@ -36,9 +36,7 @@
_ut_test_case_set \
_ut_jrnl_instance
-bin_PROGRAMS = jtt
-
-check_PROGRAMS = \
+check_PROGRAMS = jtt \
_ut_data_src \
_ut_jrnl_init_params \
_ut_read_arg \
@@ -159,5 +157,6 @@
${LIBOBJDIR}/time_ns.o
EXTRA_DIST = \
+ file_chk.py \
jtt.csv \
_ut_test_case_set.csv
Modified: store/trunk/cpp/tests/jrnl/jtt/args.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/args.cpp 2008-02-06 19:27:44 UTC (rev 1647)
+++ store/trunk/cpp/tests/jrnl/jtt/args.cpp 2008-02-06 19:31:17 UTC (rev 1648)
@@ -86,6 +86,7 @@
const bool
args::parse(int argc, char** argv) // return true if error, false if ok
{
+ get_jtt_path(argv[0]);
try
{
po::store(po::parse_command_line(argc, argv, _options_descr), _vmap);
@@ -135,6 +136,20 @@
return false;
}
+void
+args::get_jtt_path(const char* argv0)
+{
+ std::string s(argv0);
+ size_t pos = s.rfind("/jtt");
+ assert(pos != std::string::npos);
+ if (pos > 1)
+ {
+ size_t start = s.substr(0, 2).compare("./") == 0 ? 2 : 0;
+ size_t len = s.size() - start - 3;
+ jtt_path = s.substr(start, len);
+ }
+}
+
const bool
args::usage() const
{
Modified: store/trunk/cpp/tests/jrnl/jtt/args.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/args.hpp 2008-02-06 19:27:44 UTC (rev 1647)
+++ store/trunk/cpp/tests/jrnl/jtt/args.hpp 2008-02-06 19:31:17 UTC (rev 1648)
@@ -38,6 +38,7 @@
boost::program_options::variables_map _vmap;
// Add args here
+ std::string jtt_path;
std::string test_case_csv_file_name;
bool format_chk;
bool keep_jrnls;
@@ -55,6 +56,7 @@
args(std::string opt_title);
const bool parse(int argc, char** argv); // return true if error, false if ok
+ void get_jtt_path(const char* argv0);
const bool usage() const; // return true
void print_args() const;
void print_flags() const;
Modified: store/trunk/cpp/tests/jrnl/jtt/configure.ac
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/configure.ac 2008-02-06 19:27:44 UTC (rev 1647)
+++ store/trunk/cpp/tests/jrnl/jtt/configure.ac 2008-02-06 19:31:17 UTC (rev 1648)
@@ -19,7 +19,7 @@
dnl #
dnl # The GNU Lesser General Public License is available in the file COPYING.
-AC_INIT([Journal Test Tool], [0.1], [kim.vdriet at redhat.com])
+AC_INIT([Journal Test Tool], [0.1], [rhemrg-users-list at redhat.com])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CXX
AC_CONFIG_HEADERS([config.hpp])
Modified: store/trunk/cpp/tests/jrnl/jtt/test_mgr.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/test_mgr.cpp 2008-02-06 19:27:44 UTC (rev 1647)
+++ store/trunk/cpp/tests/jrnl/jtt/test_mgr.cpp 2008-02-06 19:31:17 UTC (rev 1648)
@@ -93,8 +93,9 @@
for (ji_list_citr jii=_ji_list.begin(); jii!=_ji_list.end(); jii++)
{
jrnl_init_params::shared_ptr jpp = (*jii)->params();
+ std::string path = _args.jtt_path.size() ? _args.jtt_path : "./";
std::ostringstream oss;
- oss << "./jfile_chk.py -q";
+ oss << path << "jfile_chk.py -q";
oss << " -d " << jpp->jdir();
oss << " -b " << jpp->base_filename();
oss << " -c" << _args.test_case_csv_file_name;
Modified: store/trunk/cpp/tests/jrnl/run-journal-tests
===================================================================
--- store/trunk/cpp/tests/jrnl/run-journal-tests 2008-02-06 19:27:44 UTC (rev 1647)
+++ store/trunk/cpp/tests/jrnl/run-journal-tests 2008-02-06 19:31:17 UTC (rev 1648)
@@ -4,6 +4,12 @@
fail=0
+# Run jtt using default test set
+echo
+$pwd/jtt/jtt --csv $pwd/jtt/jtt.csv --format-chk || fail = 1
+echo
+
+# Run cpp-unit tests
LD_PRELOAD=$pwd/.libs/libdlclose_noop.so DllPlugInTester -c -b $pwd/.libs/Journal*Tests.so || fail=1
exit $fail
More information about the rhmessaging-commits
mailing list