Index: lib/kyua/Makefile =================================================================== --- lib/kyua/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# $FreeBSD$ - -SUBDIR= cli \ - drivers \ - engine \ - model \ - store \ - utils - -.include Index: lib/kyua/Makefile.inc =================================================================== --- lib/kyua/Makefile.inc +++ /dev/null @@ -1,20 +0,0 @@ -# $FreeBSD$ - -KYUA_LIBDIR:= ${.PARSEDIR} - -.include "${KYUA_LIBDIR}/Makefile.kyua" - -LIB_CXX= kyua_${KYUA_LIB} -INTERNALLIB= - -.PATH: ${KYUA_SRCDIR}/${KYUA_LIB} -CFLAGS+= -I${KYUA_LIBDIR} \ - -I${KYUA_SRCDIR} \ - -I${SRCTOP}/contrib/lutok/include - -CFLAGS+= -DHAVE_CONFIG_H - -# kyua uses auto_ptr -CFLAGS+= -Wno-deprecated-declarations - -.include "${.PARSEDIR}/../Makefile.inc" Index: lib/kyua/Makefile.kyua =================================================================== --- lib/kyua/Makefile.kyua +++ /dev/null @@ -1,11 +0,0 @@ -# $FreeBSD$ - -KYUA_VERSION= 0.13 - -KYUA_CONFDIR= /etc/kyua -KYUA_DOCDIR= /usr/share/doc/kyua -KYUA_EGDIR= /usr/share/examples/kyua -KYUA_MISCDIR= /usr/share/kyua/misc -KYUA_STOREDIR= /usr/share/kyua/store - -KYUA_SRCDIR= ${SRCTOP}/contrib/kyua Index: lib/kyua/cli/Makefile =================================================================== --- lib/kyua/cli/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= cli -INTERNALLIB= -LIBADD= kyua_drivers kyua_engine kyua_model kyua_store kyua_utils -CFLAGS+= -DKYUA_CONFDIR=\"${KYUA_CONFDIR}\" \ - -DKYUA_DOCDIR=\"${KYUA_DOCDIR}\" \ - -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\" \ - -DPACKAGE=\"kyua\" \ - -DPACKAGE_NAME=\"Kyua\" \ - -DPACKAGE_VERSION=\"${KYUA_VERSION}\" \ - -DVERSION=\"${KYUA_VERSION}\" - -SRCS= cmd_about.cpp \ - cmd_config.cpp \ - cmd_db_exec.cpp \ - cmd_db_migrate.cpp \ - cmd_debug.cpp \ - cmd_help.cpp \ - cmd_list.cpp \ - cmd_report.cpp \ - cmd_report_html.cpp \ - cmd_report_junit.cpp \ - cmd_test.cpp \ - common.cpp \ - config.cpp \ - main.cpp - -.include Index: lib/kyua/config.h =================================================================== --- /dev/null +++ lib/kyua/config.h @@ -1,122 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to the optind value to reset getopt processing */ -#define GETOPT_OPTIND_RESET_VALUE 1 - -/* Define to 1 if getcwd(NULL, 0) works */ -#define HAVE_GETCWD_DYN 1 - -/* Define to 1 if getopt allows a + sign for POSIX behavior */ -/* #undef HAVE_GETOPT_GNU */ - -/* Define to 1 if getopt has optreset */ -#define HAVE_GETOPT_WITH_OPTRESET 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `setenv' function. */ -#define HAVE_SETENV 1 - -/* Define to 1 if you have the `statfs' function. */ -#define HAVE_STATFS 1 - -/* Define to 1 if you have the `statvfs' function. */ -#define HAVE_STATVFS 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MOUNT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STATVFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_VFS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TERMIOS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `unmount' function. */ -#define HAVE_UNMOUNT 1 - -/* Define to 1 if you have the `unsetenv' function. */ -#define HAVE_UNSETENV 1 - -/* Define to 1 if your lchmod works */ -#define HAVE_WORKING_LCHMOD 1 - -/* Define to the last valid signal number */ -#define LAST_SIGNO 128 - -/* Define to the name of the sysctl MIB */ -#define MEMORY_QUERY_SYSCTL_MIB "hw.usermem" - -/* Define to the memory query type */ -#define MEMORY_QUERY_TYPE "sysctlbyname" - -/* Name of package */ -#define PACKAGE "kyua" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "kyua-discuss@googlegroups.com" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "Kyua" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Kyua 0.13" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "kyua" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "https://github.com/jmmv/kyua/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.13" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Set to the path of umount(8) */ -/* #undef UMOUNT */ - -/* Version number of package */ -#define VERSION "0.13" Index: lib/kyua/drivers/Makefile =================================================================== --- lib/kyua/drivers/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= drivers -LIBADD= kyua_model kyua_engine kyua_store - -SRCS= debug_test.cpp \ - list_tests.cpp \ - report_junit.cpp \ - run_tests.cpp \ - scan_results.cpp - -.include Index: lib/kyua/engine/Makefile =================================================================== --- lib/kyua/engine/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= engine -LIBADD= lutok kyua_utils -CFLAGS= -DKYUA_ARCHITECTURE=\"${MACHINE_ARCH}\" \ - -DKYUA_PLATFORM=\"${MACHINE}\" - -SRCS= atf.cpp \ - atf_list.cpp \ - atf_result.cpp \ - config.cpp \ - exceptions.cpp \ - filters.cpp \ - kyuafile.cpp \ - plain.cpp \ - requirements.cpp \ - scanner.cpp \ - tap.cpp \ - tap_parser.cpp \ - scheduler.cpp - -.include Index: lib/kyua/model/Makefile =================================================================== --- lib/kyua/model/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= model -LIBADD= lutok - -SRCS= context.cpp \ - exceptions.cpp \ - metadata.cpp \ - test_case.cpp \ - test_program.cpp \ - test_result.cpp - -.include Index: lib/kyua/store/Makefile =================================================================== --- lib/kyua/store/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= store -LIBADD= kyua_model kyua_utils sqlite3 - -CFLAGS+= -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\" - -SRCS= dbtypes.cpp \ - exceptions.cpp \ - layout.cpp \ - metadata.cpp \ - migrate.cpp \ - read_backend.cpp \ - read_transaction.cpp \ - write_backend.cpp \ - write_transaction.cpp - -.include Index: lib/kyua/utils/Makefile =================================================================== --- lib/kyua/utils/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= utils -LIBADD= lutok - -CFLAGS+= -I${SRCTOP}/contrib/sqlite3 -CFLAGS+= -DGDB=\"/usr/local/bin/gdb\" - -SRCS= datetime.cpp \ - env.cpp \ - memory.cpp \ - passwd.cpp \ - sanity.cpp \ - stacktrace.cpp \ - stream.cpp \ - units.cpp \ - cmdline/base_command.cpp \ - cmdline/exceptions.cpp \ - cmdline/globals.cpp \ - cmdline/options.cpp \ - cmdline/parser.cpp \ - cmdline/ui.cpp \ - cmdline/ui_mock.cpp \ - config/exceptions.cpp \ - config/keys.cpp \ - config/lua_module.cpp \ - config/nodes.cpp \ - config/parser.cpp \ - config/tree.cpp \ - format/exceptions.cpp \ - format/formatter.cpp \ - fs/auto_cleaners.cpp \ - fs/directory.cpp \ - fs/exceptions.cpp \ - fs/lua_module.cpp \ - fs/operations.cpp \ - fs/path.cpp \ - logging/operations.cpp \ - process/child.cpp \ - process/deadline_killer.cpp \ - process/exceptions.cpp \ - process/executor.cpp \ - process/fdstream.cpp \ - process/isolation.cpp \ - process/operations.cpp \ - process/status.cpp \ - process/system.cpp \ - process/systembuf.cpp \ - signals/exceptions.cpp \ - signals/interrupts.cpp \ - signals/misc.cpp \ - signals/programmer.cpp \ - signals/timer.cpp \ - sqlite/c_gate.cpp \ - sqlite/database.cpp \ - sqlite/exceptions.cpp \ - sqlite/statement.cpp \ - sqlite/transaction.cpp \ - text/exceptions.cpp \ - text/operations.cpp \ - text/regex.cpp \ - text/table.cpp \ - text/templates.cpp \ - -.include Index: lib/kyua/utils/defs.hpp =================================================================== --- /dev/null +++ lib/kyua/utils/defs.hpp @@ -1,70 +0,0 @@ -// Copyright 2010 The Kyua Authors. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// * Neither the name of Google Inc. nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/// \file utils/defs.hpp -/// -/// Definitions for compiler and system features autodetected at configuration -/// time. - -#if !defined(UTILS_DEFS_HPP) -#define UTILS_DEFS_HPP - - -/// Attribute to mark a function as non-returning. -#define UTILS_NORETURN __attribute__((noreturn)) - - -/// Attribute to mark a function as pure. -#define UTILS_PURE __attribute__((__pure__)) - - -/// Attribute to mark an entity as unused. -#define UTILS_UNUSED __attribute__((__unused__)) - - -/// Unconstifies a pointer. -/// -/// \param type The target type of the conversion. -/// \param ptr The pointer to be unconstified. -#define UTILS_UNCONST(type, ptr) ((type*)(unsigned long)(const void*)(ptr)) - - -/// Macro to mark a parameter as unused. -/// -/// This macro has to be called on the name of a parameter during the -/// definition (not declaration) of a function. When doing so, it declares -/// the parameter as unused to silence compiler warnings and also renames -/// the parameter by prefixing "unused_" to it. This is to ensure that the -/// developer remembers to remove the call to this macro from the parameter -/// when he actually starts using it. -/// -/// \param name The name of the function parameter to mark as unused. -#define UTILS_UNUSED_PARAM(name) unused_ ## name UTILS_UNUSED - - -#endif // !defined(UTILS_DEFS_HPP) Index: share/mk/src.libnames.mk =================================================================== --- share/mk/src.libnames.mk +++ share/mk/src.libnames.mk @@ -41,12 +41,6 @@ fifolog \ ifconfig \ ipf \ - kyua_cli \ - kyua_drivers \ - kyua_engine \ - kyua_model \ - kyua_store \ - kyua_utils \ lpr \ lua \ lutok \ @@ -286,12 +280,6 @@ _DP_geom= bsdxml sbuf _DP_cam= sbuf _DP_kvm= elf -_DP_kyua_cli= kyua_drivers kyua_engine kyua_model kyua_store kyua_utils -_DP_kyua_drivers= kyua_model kyua_engine kyua_store -_DP_kyua_engine= lutok kyua_utils -_DP_kyua_model= lutok -_DP_kyua_utils= lutok -_DP_kyua_store= kyua_model kyua_utils sqlite3 _DP_casper= nv _DP_cap_dns= nv _DP_cap_fileargs= nv @@ -510,24 +498,6 @@ LIBELFTCDIR= ${_LIB_OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc${PIE_SUFFIX}.a -LIBKYUA_CLIDIR= ${_LIB_OBJTOP}/lib/kyua/cli -LIBKYUA_CLI?= ${LIBKYUA_CLIDIR}/libkyua_cli${PIE_SUFFIX}.a - -LIBKYUA_DRIVERSDIR= ${_LIB_OBJTOP}/lib/kyua/drivers -LIBKYUA_DRIVERS?= ${LIBKYUA_DRIVERSDIR}/libkyua_drivers${PIE_SUFFIX}.a - -LIBKYUA_ENGINEDIR= ${_LIB_OBJTOP}/lib/kyua/engine -LIBKYUA_ENGINE?= ${LIBKYUA_ENGINEDIR}/libkyua_engine${PIE_SUFFIX}.a - -LIBKYUA_MODELDIR= ${_LIB_OBJTOP}/lib/kyua/model -LIBKYUA_MODEL?= ${LIBKYUA_MODELDIR}/libkyua_model${PIE_SUFFIX}.a - -LIBKYUA_STOREDIR= ${_LIB_OBJTOP}/lib/kyua/store -LIBKYUA_STORE?= ${LIBKYUA_STOREDIR}/libkyua_store${PIE_SUFFIX}.a - -LIBKYUA_UTILSDIR= ${_LIB_OBJTOP}/lib/kyua/utils -LIBKYUA_UTILS?= ${LIBKYUA_UTILSDIR}/libkyua_utils${PIE_SUFFIX}.a - LIBLUADIR= ${_LIB_OBJTOP}/lib/liblua LIBLUA?= ${LIBLUADIR}/liblua${PIE_SUFFIX}.a Index: usr.bin/kyua/Makefile =================================================================== --- usr.bin/kyua/Makefile +++ usr.bin/kyua/Makefile @@ -2,14 +2,20 @@ .include -.include "${SRCTOP}/lib/kyua/Makefile.kyua" - +KYUA_CONFDIR= /etc/kyua +KYUA_DOCDIR= /usr/share/doc/kyua +KYUA_EGDIR= /usr/share/examples/kyua +KYUA_MISCDIR= /usr/share/kyua/misc +KYUA_STOREDIR= /usr/share/kyua/store +KYUA_VERSION= 0.13 + +KYUA_SRCDIR= ${SRCTOP}/contrib/kyua .PATH: ${KYUA_SRCDIR} PACKAGE= tests PROG_CXX= kyua SRCS= main.cpp -LIBADD= kyua_cli kyua_drivers kyua_engine kyua_model kyua_store +LIBADD= lutok sqlite3 MAN= kyua-about.1 \ kyua-config.1 \ @@ -26,10 +32,134 @@ kyua.conf.5 \ kyuafile.5 -CFLAGS+= -I${KYUA_SRCDIR} - +CFLAGS+= -I${KYUA_SRCDIR} -I${.CURDIR} +CFLAGS+= -I${SRCTOP}/contrib/lutok/include +CFLAGS+= -I${SRCTOP}/contrib/sqlite3 # kyua uses auto_ptr CFLAGS+= -Wno-deprecated-declarations +CFLAGS+= -DHAVE_CONFIG_H + +# We compile the kyua libraries as part of the main executable as this saves +# compile time and we don't install them anyway. +CFLAGS+= -DGDB=\"/usr/local/bin/gdb\" \ + -DKYUA_ARCHITECTURE=\"${MACHINE_ARCH}\" \ + -DKYUA_CONFDIR=\"${KYUA_CONFDIR}\" \ + -DKYUA_DOCDIR=\"${KYUA_DOCDIR}\" \ + -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\" \ + -DKYUA_PLATFORM=\"${MACHINE}\" \ + -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\" \ + -DPACKAGE=\"kyua\" \ + -DPACKAGE_NAME=\"Kyua\" \ + -DPACKAGE_VERSION=\"${KYUA_VERSION}\" \ + -DVERSION=\"${KYUA_VERSION}\" + +SRCS+= utils/datetime.cpp \ + utils/env.cpp \ + utils/memory.cpp \ + utils/passwd.cpp \ + utils/sanity.cpp \ + utils/stacktrace.cpp \ + utils/stream.cpp \ + utils/units.cpp \ + utils/cmdline/base_command.cpp \ + utils/cmdline/exceptions.cpp \ + utils/cmdline/globals.cpp \ + utils/cmdline/options.cpp \ + utils/cmdline/parser.cpp \ + utils/cmdline/ui.cpp \ + utils/cmdline/ui_mock.cpp \ + utils/config/exceptions.cpp \ + utils/config/keys.cpp \ + utils/config/lua_module.cpp \ + utils/config/nodes.cpp \ + utils/config/parser.cpp \ + utils/config/tree.cpp \ + utils/format/exceptions.cpp \ + utils/format/formatter.cpp \ + utils/fs/auto_cleaners.cpp \ + utils/fs/directory.cpp \ + utils/fs/exceptions.cpp \ + utils/fs/lua_module.cpp \ + utils/fs/operations.cpp \ + utils/fs/path.cpp \ + utils/logging/operations.cpp \ + utils/process/child.cpp \ + utils/process/deadline_killer.cpp \ + utils/process/exceptions.cpp \ + utils/process/executor.cpp \ + utils/process/fdstream.cpp \ + utils/process/isolation.cpp \ + utils/process/operations.cpp \ + utils/process/status.cpp \ + utils/process/system.cpp \ + utils/process/systembuf.cpp \ + utils/signals/exceptions.cpp \ + utils/signals/interrupts.cpp \ + utils/signals/misc.cpp \ + utils/signals/programmer.cpp \ + utils/signals/timer.cpp \ + utils/sqlite/c_gate.cpp \ + utils/sqlite/database.cpp \ + utils/sqlite/exceptions.cpp \ + utils/sqlite/statement.cpp \ + utils/sqlite/transaction.cpp \ + utils/text/exceptions.cpp \ + utils/text/operations.cpp \ + utils/text/regex.cpp \ + utils/text/table.cpp \ + utils/text/templates.cpp + +SRCS+= model/context.cpp \ + model/exceptions.cpp \ + model/metadata.cpp \ + model/test_case.cpp \ + model/test_program.cpp \ + model/test_result.cpp + +SRCS+= engine/atf.cpp \ + engine/atf_list.cpp \ + engine/atf_result.cpp \ + engine/config.cpp \ + engine/exceptions.cpp \ + engine/filters.cpp \ + engine/kyuafile.cpp \ + engine/plain.cpp \ + engine/requirements.cpp \ + engine/scanner.cpp \ + engine/tap.cpp \ + engine/tap_parser.cpp \ + engine/scheduler.cpp + +SRCS+= store/dbtypes.cpp \ + store/exceptions.cpp \ + store/layout.cpp \ + store/metadata.cpp \ + store/migrate.cpp \ + store/read_backend.cpp \ + store/read_transaction.cpp \ + store/write_backend.cpp \ + store/write_transaction.cpp + +SRCS+= drivers/debug_test.cpp \ + drivers/list_tests.cpp \ + drivers/report_junit.cpp \ + drivers/run_tests.cpp \ + drivers/scan_results.cpp + +SRCS+= cli/cmd_about.cpp \ + cli/cmd_config.cpp \ + cli/cmd_db_exec.cpp \ + cli/cmd_db_migrate.cpp \ + cli/cmd_debug.cpp \ + cli/cmd_help.cpp \ + cli/cmd_list.cpp \ + cli/cmd_report.cpp \ + cli/cmd_report_html.cpp \ + cli/cmd_report_junit.cpp \ + cli/cmd_test.cpp \ + cli/common.cpp \ + cli/config.cpp \ + cli/main.cpp FILESGROUPS= DOCS MISC STORE