Add reachover build files for kyua-cli.

This commit is contained in:
jmmv 2013-02-23 14:16:49 +00:00
parent 964e4f5784
commit ba65fde2d7
65 changed files with 1123 additions and 0 deletions

10
external/bsd/kyua-cli/Makefile vendored Normal file
View File

@ -0,0 +1,10 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:49 jmmv Exp $
SUBDIR= lib .WAIT share tests usr.bin
.for dir in share tests usr.bin
includes-${dir}: .PHONY
@true
.endfor
.include <bsd.subdir.mk>

63
external/bsd/kyua-cli/Makefile.inc vendored Normal file
View File

@ -0,0 +1,63 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:49 jmmv Exp $
.include <bsd.own.mk>
TOPDIR= ${NETBSDSRCDIR}/external/bsd/kyua-cli
SRCDIR= ${TOPDIR}/dist
# Name of the private libraries (without their lib prefix) to depend on.
KYUA_LIBS?=
# Layout of installed files.
KYUA_BINDIR= /usr/bin
KYUA_CONFDIR= /etc/kyua
KYUA_DOCDIR= /usr/share/doc/kyua-cli
KYUA_EXAMPLESDIR= /usr/share/examples/kyua-cli
KYUA_MISCDIR= /usr/share/kyua-cli/misc
KYUA_STOREDIR= /usr/share/kyua-cli/store
KYUA_TESTERSDIR= /usr/libexec
KYUA_TESTSDIR= ${TESTSBASE}
KYUA_TARNAME!= grep 'define PACKAGE_TARNAME' ${TOPDIR}/config.h \
| cut -d '"' -f 2
KYUA_VERSION!= grep 'define VERSION' ${TOPDIR}/config.h | cut -d '"' -f 2
CPPFLAGS+= -DHAVE_CONFIG_H
# Not all source files need these settings, but it's just easier to
# set them in all cases.
CPPFLAGS+= -DKYUA_CONFDIR=\"${KYUA_CONFDIR}\"
CPPFLAGS+= -DKYUA_DOCDIR=\"${KYUA_DOCDIR}\"
CPPFLAGS+= -DKYUA_EXAMPLESDIR=\"${KYUA_EXAMPLESDIR}\"
CPPFLAGS+= -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\"
CPPFLAGS+= -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\"
CPPFLAGS+= -DKYUA_TESTERSDIR=\"${KYUA_TESTERSDIR}\"
CPPFLAGS+= -DKYUA_TESTSDIR=\"${KYUA_TESTSDIR}\"
CPPFLAGS+= -I${TOPDIR} # For config.h.
CPPFLAGS+= -I${TOPDIR}/lib # For utils/defs.hpp.
CPPFLAGS+= -I${SRCDIR}
PRIVATELIBDIR!= cd ${TOPDIR}/lib; ${PRINTOBJDIR}
.for lib in ${KYUA_LIBS}
LDADD+= ${PRIVATELIBDIR}/${lib}/lib${lib}.a
DPADD+= ${PRIVATELIBDIR}/${lib}/lib${lib}.a
.endfor
.if !empty(KYUA_LIBS:Mutils)
LDADD+= -llutok -lsqlite3
DPADD+= ${LIBLUTOK} ${LIBSQLITE}
.endif
BUILD_MANPAGE = \
sed -e 's,__CONFDIR__,${KYUA_CONFDIR},g' \
-e 's,__DOCDIR__,${KYUA_DOCDIR},g' \
-e 's,__EGDIR__,${KYUA_EXAMPLESDIR},g' \
-e 's,__MISCDIR__,${KYUA_MISCDIR},g' \
-e 's,__PACKAGE__,${KYUA_TARNAME},g' \
-e 's,__STOREDIR__,${KYUA_STOREDIR},g' \
-e 's,__TESTERSDIR__,${KYUA_TESTERSDIR},g' \
-e 's,__TESTSDIR__,${KYUA_TESTSDIR},g' \
-e 's,__VERSION__,${KYUA_VERSION},g' \
<${SRCDIR}/doc/$${name}.in >$${name}.tmp; \
mv $${name}.tmp $${name}

98
external/bsd/kyua-cli/config.h vendored Normal file
View File

@ -0,0 +1,98 @@
/* 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 has optreset */
#define HAVE_GETOPT_WITH_OPTRESET 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> 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 <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> 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 <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#define HAVE_SYS_SYSCTL_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `unsetenv' function. */
#define HAVE_UNSETENV 1
/* Name of the system architecture (aka processor type) */
#define KYUA_ARCHITECTURE "x86_64"
/* Name of the system platform (aka machine name) */
#define KYUA_PLATFORM "amd64"
/* Define to the last valid signal number */
#define LAST_SIGNO 63
/* Define to the name of the sysctl MIB */
#define MEMORY_QUERY_SYSCTL_MIB "hw.usermem64"
/* Define to the memory query type */
#define MEMORY_QUERY_TYPE "sysctlbyname"
/* Name of package */
#define PACKAGE "kyua-cli"
/* 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 - Command line interface"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "Kyua - Command line interface 0.6"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "kyua-cli"
/* Define to the home page for this package. */
#define PACKAGE_URL "http://code.google.com/p/kyua/"
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.6"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "0.6"

5
external/bsd/kyua-cli/lib/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:49 jmmv Exp $
SUBDIR= utils store engine cli
.include <bsd.subdir.mk>

14
external/bsd/kyua-cli/lib/Makefile.inc vendored Normal file
View File

@ -0,0 +1,14 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:49 jmmv Exp $
.include "../Makefile.inc"
LIBISCXX= yes
LIBISPRIVATE= yes
LIBDPLIBS+= lua ${.CURDIR}/../../../../mit/lua/lib/liblua
.if ${HAVE_GCC} == 4
LIBDPLIBS+= stdc++ ${.CURDIR}/../../../../../gnu/lib/libstdc++-v3_4
.else
LIBDPLIBS+= stdc++ ${.CURDIR}/../../../../../external/gpl3/gcc/lib/libstdc++-v3
.endif
LIBDPLIBS+= m ${.CURDIR}/../../../../../lib/libm

27
external/bsd/kyua-cli/lib/cli/Makefile vendored Normal file
View File

@ -0,0 +1,27 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:50 jmmv Exp $
KYUA_LIBS= engine store utils
.include <bsd.init.mk>
.PATH: ${SRCDIR}/cli
LIB= cli
WARNS?= 3
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_test.cpp \
common.cpp \
config.cpp \
main.cpp
.include <bsd.lib.mk>

View File

@ -0,0 +1,32 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:50 jmmv Exp $
KYUA_LIBS= store utils
.include <bsd.init.mk>
.PATH: ${SRCDIR}/engine
.PATH: ${SRCDIR}/engine/drivers
LIB= engine
WARNS?= 3
SRCS= action.cpp \
config.cpp \
context.cpp \
exceptions.cpp \
filters.cpp \
kyuafile.cpp \
metadata.cpp \
test_case.cpp \
test_program.cpp \
test_result.cpp \
testers.cpp
# engine/drivers subdirectory.
SRCS+= debug_test.cpp \
list_tests.cpp \
run_tests.cpp \
scan_action.cpp
.include <bsd.lib.mk>

View File

@ -0,0 +1,19 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:50 jmmv Exp $
KYUA_LIBS= utils
.include <bsd.init.mk>
.PATH: ${SRCDIR}/store
LIB= store
WARNS?= 3
SRCS= backend.cpp \
dbtypes.cpp \
exceptions.cpp \
metadata.cpp \
transaction.cpp
.include <bsd.lib.mk>

View File

@ -0,0 +1,87 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:50 jmmv Exp $
.include <bsd.init.mk>
.PATH: ${SRCDIR}/utils
LIB= utils
WARNS?= 2
SRCS= datetime.cpp \
env.cpp \
memory.cpp \
passwd.cpp \
sanity.cpp \
stream.cpp \
units.cpp
SRCS+= cmdline/base_command.cpp \
cmdline/exceptions.cpp \
cmdline/globals.cpp \
cmdline/options.cpp \
cmdline/parser.cpp \
cmdline/ui.cpp \
cmdline/ui_mock.cpp
SRCS+= config/exceptions.cpp \
config/keys.cpp \
config/lua_module.cpp \
config/nodes.cpp \
config/parser.cpp \
config/tree.cpp
SRCS+= format/exceptions.cpp \
format/formatter.cpp
SRCS+= fs/auto_cleaners.cpp \
fs/exceptions.cpp \
fs/lua_module.cpp \
fs/operations.cpp \
fs/path.cpp
SRCS+= logging/operations.cpp
SRCS+= process/child.cpp \
process/exceptions.cpp \
process/fdstream.cpp \
process/status.cpp \
process/system.cpp \
process/systembuf.cpp
SRCS+= signals/exceptions.cpp \
signals/interrupts.cpp \
signals/misc.cpp \
signals/programmer.cpp
SRCS+= sqlite/c_gate.cpp \
sqlite/database.cpp \
sqlite/exceptions.cpp \
sqlite/statement.cpp \
sqlite/transaction.cpp
SRCS+= text/exceptions.cpp \
text/operations.cpp \
text/table.cpp \
text/templates.cpp
# The subdirectories into which we recurse only exist to create the necessary
# obj directories for the above SRCS declarations to work. We need to be able
# to create object files of the form <subdirectory>/<file>.o, and therefore
# the subdirectory must exist upfront.
#
# Note that there are source files of the same name in various subdirectories,
# so we just cannot use .PATH to look for files in all of them at once.
#
# TODO: Would be nice if bsd.obj.mk (or whichever other module) did the right
# thing here and just created these obj directories for us. Or, alternatively,
# we could have every subdirectory Makefile create a temporary .a and we could
# pull all the .a files together from here into libutil.a.
SUBDIR= cmdline config format fs logging process signals sqlite text
.for dir in ${SUBDIR}
clean-${dir} cleandir-${dir} includes-${dir}: .PHONY
@true
.endfor
.include <bsd.subdir.mk>
.include <bsd.lib.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:50 jmmv Exp $
.include "../Makefile.inc"

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:50 jmmv Exp $
.include <bsd.obj.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:51 jmmv Exp $
.include <bsd.obj.mk>

View File

@ -0,0 +1,63 @@
// Copyright 2010 Google Inc.
// 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__))
/// 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)

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:51 jmmv Exp $
.include <bsd.obj.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:51 jmmv Exp $
.include <bsd.obj.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:51 jmmv Exp $
.include <bsd.obj.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:51 jmmv Exp $
.include <bsd.obj.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:51 jmmv Exp $
.include <bsd.obj.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:52 jmmv Exp $
.include <bsd.obj.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:52 jmmv Exp $
.include <bsd.obj.mk>

107
external/bsd/kyua-cli/prepare-import.sh vendored Executable file
View File

@ -0,0 +1,107 @@
#!/bin/sh
# $NetBSD: prepare-import.sh,v 1.1 2013/02/23 14:16:49 jmmv Exp $
#
# Use this script to recreate the 'dist' subdirectory from a newly released
# distfile. The script takes care of unpacking the distfile, removing any
# files that are not relevant to NetBSD and checking if there are any new
# files in the new release that need to be addressed.
#
set -e
ProgName=${0##*/}
CLEAN_PATTERNS=
CLEAN_PATTERNS="${CLEAN_PATTERNS} *.m4"
CLEAN_PATTERNS="${CLEAN_PATTERNS} INSTALL TODO"
CLEAN_PATTERNS="${CLEAN_PATTERNS} Doxyfile*"
CLEAN_PATTERNS="${CLEAN_PATTERNS} Makefile* */Makefile* */*/Makefile*"
CLEAN_PATTERNS="${CLEAN_PATTERNS} admin"
CLEAN_PATTERNS="${CLEAN_PATTERNS} api-docs"
CLEAN_PATTERNS="${CLEAN_PATTERNS} config.h.in"
CLEAN_PATTERNS="${CLEAN_PATTERNS} configure*"
CLEAN_PATTERNS="${CLEAN_PATTERNS} m4"
CLEAN_PATTERNS="${CLEAN_PATTERNS} utils/defs.hpp"
err() {
echo "${ProgName}:" "${@}" 1>&2
exit 1
}
log() {
echo "${ProgName}:" "${@}"
}
backup_dist() {
if [ -d dist.old ]; then
log "Removing dist; dist.old exists"
rm -rf dist
else
log "Backing up dist as dist.old"
mv dist dist.old
fi
}
extract_distfile() {
local distfile="${1}"; shift
local distname="${1}"; shift
log "Extracting ${distfile}"
tar -xzf "${distfile}"
[ -d "${distname}" ] || err "Distfile did not create ${distname}"
log "Renaming ${distname} to dist"
mv "${distname}" dist
}
get_distname() {
local distfile="${1}"; shift
basename "${distfile}" | sed -e 's,\.tar.*,,'
}
cleanup_dist() {
log "Removing unnecessary files from dist"
( cd dist && rm -rf ${CLEAN_PATTERNS} )
}
diff_dirs() {
local old_dir="${1}"; shift
local new_dir="${1}"; shift
local old_list=$(mktemp -t kyua-cli-import.XXXXXX)
local new_list=$(mktemp -t kyua-cli-import.XXXXXX)
local diff=$(mktemp -t kyua-cli-import.XXXXXX)
trap "rm -f '${old_list}' '${new_list}' '${diff}'; exit 1" \
HUP INT QUIT TERM
( cd "${old_dir}" && find . | sort >>"${old_list}" )
( cd "${new_dir}" && find . | sort >>"${new_list}" )
diff -u "${old_list}" "${new_list}" | grep '^+\.' >>"${diff}" || true
if [ -s "${diff}" ]; then
log "New files found"
diff -u "${old_list}" "${new_list}" | grep '^+\.'
log "Check if any files have to be cleaned up and update" \
"the prepare-import.sh script accordingly"
else
log "No new files; all good!"
fi
rm -f "${old_list}" "${new_list}" "${diff}"
}
main() {
[ ${#} -eq 1 ] || err "Must provide a distfile name"
local distfile="${1}"; shift
[ -f Makefile -a -f prepare-import.sh ] || \
err "Must be run from the src/external/bsd/kyua-cli subdirectory"
local distname="$(get_distname ${distfile})"
backup_dist
extract_distfile "${distfile}" "${distname}"
cleanup_dist
diff_dirs dist.old dist
}
main "${@}"

5
external/bsd/kyua-cli/share/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:52 jmmv Exp $
SUBDIR= doc examples kyua-cli man
.include <bsd.subdir.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:52 jmmv Exp $
.include "../Makefile.inc"

View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:52 jmmv Exp $
SUBDIR= kyua-cli
.include <bsd.subdir.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:52 jmmv Exp $
.include "../Makefile.inc"

View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:52 jmmv Exp $
.include <bsd.init.mk>
.if ${MKSHARE} != "no"
.PATH: ${SRCDIR}
FILESDIR= ${KYUA_DOCDIR}
FILESMODE= 444
FILES= AUTHORS COPYING NEWS README
.endif
.include <bsd.files.mk>

View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:53 jmmv Exp $
SUBDIR= kyua-cli
.include <bsd.subdir.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:53 jmmv Exp $
.include "../Makefile.inc"

View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:53 jmmv Exp $
.include <bsd.init.mk>
.if ${MKSHARE} != "no"
.PATH: ${SRCDIR}/examples
FILESDIR= ${KYUA_EXAMPLESDIR}
FILESMODE= 444
FILES= Kyuafile.top kyua.conf
.endif
.include <bsd.files.mk>

View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:53 jmmv Exp $
SUBDIR= misc store
.include <bsd.subdir.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:53 jmmv Exp $
.include "../Makefile.inc"

View File

@ -0,0 +1,16 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:53 jmmv Exp $
.include <bsd.init.mk>
.if ${MKSHARE} != "no"
.PATH: ${SRCDIR}/misc
FILESDIR= ${KYUA_MISCDIR}
FILESMODE= 444
FILES= context.html \
index.html \
report.css \
test_result.html
.endif
.include <bsd.files.mk>

View File

@ -0,0 +1,14 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:54 jmmv Exp $
.include <bsd.init.mk>
.if ${MKSHARE} != "no"
.PATH: ${SRCDIR}/store
FILESDIR= ${KYUA_STOREDIR}
FILESMODE= 444
FILES= migrate_v1_v2.sql \
schema_v2.sql
.endif
.include <bsd.files.mk>

View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:54 jmmv Exp $
SUBDIR= man5 man7
.include <bsd.subdir.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:54 jmmv Exp $
.include "../Makefile.inc"

View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:54 jmmv Exp $
.include <bsd.init.mk>
.PATH: ${SRCDIR}/doc
.for name in kyua.conf.5 kyuafile.5
MAN+= ${name}
${name}: ${name}.in
name=${name}; ${BUILD_MANPAGE}
.endfor
.include <bsd.man.mk>

View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:54 jmmv Exp $
.include <bsd.init.mk>
.PATH: ${SRCDIR}/doc
.for name in kyua-build-root.7 kyua-test-filters.7
MAN+= ${name}
${name}: ${name}.in
name=${name}; ${BUILD_MANPAGE}
.endfor
.include <bsd.man.mk>

5
external/bsd/kyua-cli/tests/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:54 jmmv Exp $
SUBDIR= kyua-cli
.include <bsd.subdir.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:54 jmmv Exp $
.include "../Makefile.inc"

View File

@ -0,0 +1,15 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:54 jmmv Exp $
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli
TESTS_SUBDIRS= cli engine examples integration store utils
# Build and install the 'bootstrap' tests but prevent them from being
# recursed into from the Atffile. These tests are broken in platforms
# where /bin/sh is not bash (like NetBSD). Kyua's Issue 24 has more
# details.
SUBDIR= bootstrap
.include <bsd.test.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:55 jmmv Exp $
.include "../Makefile.inc"

View File

@ -0,0 +1,25 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:55 jmmv Exp $
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/bootstrap
ATFFILE= no
.PATH: ${SRCDIR}/bootstrap
FILES= testsuite
FILESDIR= ${TESTSDIR}
FILESMODE= ${BINMODE}
PROGS_CXX= atf_helpers
BINDIR.atf_helpers= ${TESTSDIR}
MAN.atf_helpers= # none
LDADD.atf_helpers= -latf-c++ -latf-c
DPADD.atf_helpers= ${LIBATF_CXX} ${LIBATF_C}
PROGS_CXX+= plain_helpers
BINDIR.plain_helpers= ${TESTSDIR}
MAN.plain_helpers= # none
.include <bsd.files.mk>
.include <bsd.test.mk>

View File

@ -0,0 +1,25 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:55 jmmv Exp $
KYUA_LIBS= cli engine store engine utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/cli
.PATH: ${SRCDIR}/cli
TESTS_CXX= cmd_about_test \
cmd_config_test \
cmd_db_exec_test \
cmd_db_migrate_test \
cmd_debug_test \
cmd_help_test \
cmd_list_test \
cmd_report_html_test \
cmd_report_test \
cmd_test_test \
common_test \
config_test \
main_test
.include <bsd.test.mk>

View File

@ -0,0 +1,35 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:55 jmmv Exp $
KYUA_LIBS= engine store engine utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/engine
.PATH: ${SRCDIR}/engine
TESTS_CXX= action_test \
config_test \
context_test \
exceptions_test \
filters_test \
kyuafile_test \
metadata_test \
test_case_test \
test_program_test \
test_result_test \
testers_test
PROGS_CXX= test_case_atf_helpers
BINDIR.test_case_atf_helpers= ${TESTSDIR}
MAN.test_case_atf_helpers= # none
LDADD.test_case_atf_helpers= -latf-c++ -latf-c
DPADD.test_case_atf_helpers= ${LIBATF_CXX} ${LIBATF_C}
PROGS_CXX+= test_case_plain_helpers
BINDIR.test_case_plain_helpers= ${TESTSDIR}
MAN.test_case_plain_helpers= # none
TESTS_SUBDIRS+= drivers
.include <bsd.test.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:55 jmmv Exp $
.include "../Makefile.inc"

View File

@ -0,0 +1,22 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:55 jmmv Exp $
KYUA_LIBS= engine store engine utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/engine/drivers
.PATH: ${SRCDIR}/engine/drivers
TESTS_CXX= debug_test_test \
list_tests_test \
run_tests_test \
scan_action_test
PROGS_CXX= list_tests_helpers
BINDIR.list_tests_helpers= ${TESTSDIR}
MAN.list_tests_helpers= # none
LDADD.list_tests_helpers= -latf-c++ -latf-c
DPADD.list_tests_helpers= ${LIBATF_CXX} ${LIBATF_C}
.include <bsd.test.mk>

View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:55 jmmv Exp $
KYUA_LIBS= engine utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/examples
.PATH: ${SRCDIR}/examples
TESTS_CXX= syntax_test
.include <bsd.test.mk>

View File

@ -0,0 +1,34 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:56 jmmv Exp $
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/integration
.PATH: ${SRCDIR}/integration
TESTS_SH+= cmd_about_test
TESTS_SH_SRC_cmd_about_test= utils.sh cmd_about_test.tmp.sh
CLEANFILES+= cmd_about_test.tmp.sh cmd_about_test.tmp.sh.tmp
cmd_about_test.tmp.sh: cmd_about_test.sh
sed -e 's,__KYUA_DOCDIR__,${KYUA_DOCDIR},g' \
<${.ALLSRC} >${.TARGET}.tmp
mv ${.TARGET}.tmp ${.TARGET}
.for test in \
cmd_config_test \
cmd_db_exec_test \
cmd_db_migrate_test \
cmd_debug_test \
cmd_help_test \
cmd_list_test \
cmd_report_html_test \
cmd_report_test \
cmd_test_test \
global_test
TESTS_SH+= ${test}
TESTS_SH_SRC_${test}= utils.sh ${test}.sh
.endfor
SUBDIR+= helpers
.include <bsd.test.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:56 jmmv Exp $
.include "../Makefile.inc"

View File

@ -0,0 +1,26 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:56 jmmv Exp $
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/integration/helpers
# Even though we use bsd.test.mk here because some of the helpers are
# actually ATF-based test programs, we don't want to install an Atffile
# because they are not runnable on their own.
ATFFILE= no
.PATH: ${SRCDIR}/integration/helpers
TESTS_CXX= bogus_test_cases \
config \
expect_all_pass \
expect_some_fail \
interrupts \
metadata \
simple_all_pass \
simple_some_fail
PROGS_CXX= bad_test_program
BINDIR.bad_test_program= ${TESTSDIR}
MAN.bad_test_program= # none
.include <bsd.test.mk>

View File

@ -0,0 +1,24 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:56 jmmv Exp $
KYUA_LIBS= store engine utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/store
.PATH: ${SRCDIR}/store
TESTS_CXX= backend_test \
dbtypes_test \
exceptions_test \
metadata_test \
schema_inttest \
transaction_test
FILESDIR= ${TESTSDIR}
FILESMODE= 444
FILES= schema_v1.sql \
testdata_v1.sql \
testdata_v2.sql
.include <bsd.test.mk>

View File

@ -0,0 +1,23 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:56 jmmv Exp $
KYUA_LIBS= utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/utils
.PATH: ${SRCDIR}/utils
TESTS_CXX= auto_array_test \
datetime_test \
env_test \
memory_test \
optional_test \
passwd_test \
sanity_test \
stream_test \
units_test
TESTS_SUBDIRS+= cmdline config format fs logging process signals sqlite text
.include <bsd.test.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:56 jmmv Exp $
.include "../Makefile.inc"

View File

@ -0,0 +1,19 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:56 jmmv Exp $
KYUA_LIBS= utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/utils/cmdline
.PATH: ${SRCDIR}/utils/cmdline
TESTS_CXX= base_command_test \
commands_map_test \
exceptions_test \
globals_test \
options_test \
parser_test \
ui_test
.include <bsd.test.mk>

View File

@ -0,0 +1,18 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:57 jmmv Exp $
KYUA_LIBS= utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/utils/config
.PATH: ${SRCDIR}/utils/config
TESTS_CXX= exceptions_test \
keys_test \
lua_module_test \
nodes_test \
parser_test \
tree_test
.include <bsd.test.mk>

View File

@ -0,0 +1,14 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:57 jmmv Exp $
KYUA_LIBS= utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/utils/format
.PATH: ${SRCDIR}/utils/format
TESTS_CXX= exceptions_test \
formatter_test
.include <bsd.test.mk>

View File

@ -0,0 +1,17 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:57 jmmv Exp $
KYUA_LIBS= utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/utils/fs
.PATH: ${SRCDIR}/utils/fs
TESTS_CXX= auto_cleaners_test \
exceptions_test \
lua_module_test \
operations_test \
path_test
.include <bsd.test.mk>

View File

@ -0,0 +1,14 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:57 jmmv Exp $
KYUA_LIBS= utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/utils/logging
.PATH: ${SRCDIR}/utils/logging
TESTS_CXX= macros_test \
operations_test
.include <bsd.test.mk>

View File

@ -0,0 +1,21 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:57 jmmv Exp $
KYUA_LIBS= utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/utils/process
.PATH: ${SRCDIR}/utils/process
TESTS_CXX= child_test \
exceptions_test \
fdstream_test \
status_test \
systembuf_test
PROGS_CXX= helpers
BINDIR.helpers= ${TESTSDIR}
MAN.helpers= # none
.include <bsd.test.mk>

View File

@ -0,0 +1,16 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:57 jmmv Exp $
KYUA_LIBS= utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/utils/signals
.PATH: ${SRCDIR}/utils/signals
TESTS_CXX= exceptions_test \
interrupts_test \
misc_test \
programmer_test
.include <bsd.test.mk>

View File

@ -0,0 +1,17 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:58 jmmv Exp $
KYUA_LIBS= utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/utils/sqlite
.PATH: ${SRCDIR}/utils/sqlite
TESTS_CXX= c_gate_test \
database_test \
exceptions_test \
statement_test \
transaction_test
.include <bsd.test.mk>

View File

@ -0,0 +1,16 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:58 jmmv Exp $
KYUA_LIBS= utils
.include <bsd.init.mk>
TESTSDIR= ${TESTSBASE}/kyua-cli/utils/text
.PATH: ${SRCDIR}/utils/text
TESTS_CXX= exceptions_test \
operations_test \
table_test \
templates_test
.include <bsd.test.mk>

View File

@ -0,0 +1,5 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:58 jmmv Exp $
SUBDIR= kyua
.include <bsd.subdir.mk>

View File

@ -0,0 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2013/02/23 14:16:58 jmmv Exp $
.include "../Makefile.inc"

View File

@ -0,0 +1,24 @@
# $NetBSD: Makefile,v 1.1 2013/02/23 14:16:58 jmmv Exp $
KYUA_LIBS= cli engine store engine utils
.include <bsd.init.mk>
.PATH: ${SRCDIR} ${SRCDIR}/doc
BINDIR= ${KYUA_BINDIR}
PROG_CXX= kyua
SRCS= main.cpp
WARNS?= 3
.for name in \
kyua-about.1 kyua-config.1 kyua-db-exec.1 kyua-db-migrate.1 \
kyua-debug.1 kyua-help.1 kyua-list.1 kyua-report-html.1 \
kyua-report.1 kyua-test.1 kyua.1
MAN+= ${name}
${name}: ${name}.in
name=${name}; ${BUILD_MANPAGE}
.endfor
.include <bsd.prog.mk>