pkgsrc/devel/kyua/Makefile

55 lines
1.4 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.21 2020/04/12 08:28:32 adam Exp $
DISTNAME= kyua-0.13
PKGREVISION= 9
CATEGORIES= devel
Update kyua to 0.11 Changes in version 0.11 ======================= Released on October 23rd, 2014. * Added support to print the details of all test cases (metadata and their output) to 'report'. This is via a new '--verbose' flag which replaces the previous '--show-context'. * Added support to specify the amount of physical disk space required by a test case. This is in the form of a new "required_disk_space" metadata property, which can also be provided by ATF test cases as "require.diskspace". * Assimilated the contents of all the kyua-*-tester(1) and kyua-*-interface(7) manual pages into more relevant places. In particular, added more details on test program registration and their metadata to kyuafile(5), and added kyua-test-isolation(7) describing the isolation features of the test execution. * Assimilated the contents of all auxiliary manual pages, including kyua-build-root(7), kyua-results-files(7), kyua-test-filters(7) and kyua-test-isolation(7), into the relevant command-specific manual pages. This is for easier discoverability of relevant information when reading how specific Kyua commands work. * Issue 30: Plumbed through support to query configuration variables from ATF's test case heads. This resolves the confusing situation where test cases could only do this from their body and cleanup routines. * Issue 49: Extended 'report' to support test case filters as command-line arguments. Combined with '--verbose', this allows inspecting the details of a test case failure after execution. * Issue 55: Deprecated support for specifying test_suite overrides on a test program basis. This idiom should not be used but support for it remains in place. * Issue 72: Added caching support to the getcwd(3) test in configure so that the result can be overriden for cross-compilation purposes. * Issue 83: Changed manual page headings to include a "kyua" prefix in their name. This prevents some possible confusion when displaying, for example, the "kyua-test" manual page with a plain name of "test". * Issue 84: Started passing test-suite configuration variables to plain and TAP test programs via the environment. The name of the environment variables set this way is prefixed by TEST_ENV_, so a configuration variable of the form 'test_suites.some_name.allow_unsafe_ops=yes' in kyua.conf becomes 'TEST_ENV_allow_unsafe_ops=YES' in the environment. * Issue 97 and 116: Fixed the build on Illumos. * Issue 102: Set TMPDIR to the test case's work directory when running the test case. If the test case happens to use the mktemp(3) family of functions (due to misunderstandings on how Kyua works or due to the reuse of legacy test code), we don't want it to easily escape the automanaged work directory. * Issue 103: Started being more liberal in the parsing of TAP test results by treating the number in 'ok' and 'not ok' lines as optional. * Issue 105: Started using tmpfs instead of md as a temporary file system for tests in FreeBSD so that we do not leak md(4) devices. * Issue 109: Changed the privilege dropping code to start properly dropping group privileges when unprivileged_user is set. Also fixes testers/run_test:fork_wait__unprivileged_group. * Issue 110: Changed 'help' to display version information and clarified the purpose of the 'about' command in its documentation. * Issue 111: Fixed crash when defining a test program in a Kyuafile that has not yet specified the test suite name. * Issue 114: Improved the kyuafile(5) manual page by clarifying the restrictions of the include() directive and by adding abundant examples.
2015-10-01 17:17:32 +02:00
MASTER_SITES= ${MASTER_SITE_GITHUB:=jmmv/kyua/releases/download/${DISTNAME}/}
MAINTAINER= jmmv@NetBSD.org
Update kyua-cli to 0.9: Experimental version released on August 8th, 2014. Major changes: The internal architecture of Kyua to record the results of test suite runs has completely changed in this release. Kyua no longer stores all the different test suite run results as different "actions" within the single store.db database. Instead, Kyua now generates a separate results file inside ~/.kyua/store/ for every test suite run. Due to the complexity involved in the migration process and the little need for it, this is probably going to be the only release where the 'db-migrate' command is able to convert an old store.db file to the new scheme. Changes in more detail: * Added the 'report-junit' command to generate JUnit XML result files. The output has been verified to work within Jenkins. * Switched to results files specific to their corresponding test suite run. The unified store.db file is now gone: 'kyua test' creates a new results file for every invocation under ~/.kyua/store/ and the 'kyua report*' commands are able to locate the latest file for a corresponding test suite automatically. * The 'db-migrate' command takes an old store.db file and generates one results file for every previously-recorded action, later deleting the store.db file. * The '--action' flag has been removed from all commands that accepted it. This has been superseded by the tests results files. * The '--store' flag that many commands took has been renamed to '--results-file' in line with the semantical changes. * The 'db-exec' command no longer creates an empty database when none is found. This command is now intended to run only over existing files.
2014-08-08 16:30:24 +02:00
HOMEPAGE= https://github.com/jmmv/kyua/
COMMENT= Testing framework for infrastructure software
LICENSE= modified-bsd
CONFLICTS= kyua-atf-compat-[0-9]* kyua-cli-[0-9]* kyua-testers-[0-9]*
PKG_DESTDIR_SUPPORT= user-destdir
GNU_CONFIGURE= yes
USE_LANGUAGES= c c++
Update to 0.6: Experimental version released on February 22nd, 2013. * Issue 36: Changed 'kyua help' to not fail when the configuration file is bogus. Help should always work. * Issue 37: Simplified the syntax() calls in configuration and Kyuafile files to only specify the requested version instead of also the format name. The format name is implied by the file being loaded, so there is no use in the caller having to specify it. The version number of these file formats has been bumped to 2. * Issue 39: Added per-test-case metadata values to the HTML reports. * Issue 40: Rewrote the documentation as manual pages and removed the previous GNU Info document. * Issue 47: Started using the independent testers in the kyua-testers package to run the test cases. Kyua does not implement the logic to invoke test cases any more, which provides for better modularity, extensibility and robustness. * Issue 57: Added support to specify arbitrary metadata properties for test programs right from the Kyuafile. This is to make plain test programs more versatile, by allowing them to specify any of the requirements (allowed architectures, required files, etc.) supported by Kyua. * Reduced automatic screen line wrapping of messages to the 'help' command and the output of tables by 'db-exec'. Wrapping any other messages (specially anything going to stderr) was very annoying because it prevented natural copy/pasting of text. * Increased the granularity of the error codes returned by kyua(1) to denote different error conditions. This avoids the overload of '1' to indicate both "expected" errors from specific subcommands and unexpected errors caused by the internals of the code. The manual now correctly explain how the exit codes behave on a command basis. * Optimized the database schema to make report generation almost instantaneous. * Bumped the database schema to 2. The database now records the metadata of both test programs and test cases generically, without knowledge of their interface. * Added the 'db-migrate' command to provide a mechanism to upgrade a database with an old schema to the current schema. * Removed the GDB build-time configuration variable. This is now part of the kyua-testers package. * Rewrote the Kyuafile parsing code in C++, which results in a much simpler implementation. As a side-effect, this gets rid of the external Lua files required by 'kyua', which in turn make the tool self-contained. * Added caching of various configure test results (particularly in those tests that need to execute a test program) so that cross-compilers can predefine the results of the tests without having to run the executables.
2013-02-23 04:37:40 +01:00
USE_TOOLS= pkg-config
PKG_OPTIONS_VAR= PKG_OPTIONS.kyua
Update to 0.4. Other than the upgrade itself, this also adds a new 'tests' option to the package to indicate whether the Kyua-specific tests should be built or not. I do not recommend disabling their build, but not specifiying the 'tests' option cuts down the build time significantly. The major changes since 0.3 are: * Added the 'report-html' command to generate HTML reports of the execution of any recorded action. * Changed the '--output' flag of the 'report' command to only take a path to the target file, not its format. Different formats are better supported by implementing different subcommands, as the options they may receive will vary from format to format. * Added a '--with-atf' flag to the configure script to control whether the ATF tests get built or not. May be useful for packaging systems that do not have ATF in them yet. Disabling ATF also cuts down the build time of Kyua significantly, but with the obvious drawbacks. * Grouped 'kyua' subcommands by topic both in the output of 'help' and in the documentation. In general, the user needs to be aware of commands that rely on a current project and those commands that rely purely on the database to generate reports. * Made 'help' print the descriptions of options and commands properly tabulated. * Changed most informational messages to automatically wrap on screen boundaries. * Rewrote the configuration file parsing module for extensibility. This will allow future versions of Kyua to provide additional user-facing options in the configuration file. No syntax changes have been made, so existing configuration files (version 1) will continue to be parsed without problems. There is one little exception though: all variables under the top-level 'test_suites' tree must be declared as strings. Similarly, the '-v' and '--variable' flags to the command line must now carry a 'test_suites.' prefix when referencing any variables under such tree.
2012-06-07 03:13:58 +02:00
PKG_SUPPORTED_OPTIONS= tests
PKG_SUGGESTED_OPTIONS= tests
CONFIGURE_ARGS+= KYUA_CONFSUBDIR=
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --without-doxygen
PKG_SYSCONFSUBDIR= kyua
Update to 0.4. Other than the upgrade itself, this also adds a new 'tests' option to the package to indicate whether the Kyua-specific tests should be built or not. I do not recommend disabling their build, but not specifiying the 'tests' option cuts down the build time significantly. The major changes since 0.3 are: * Added the 'report-html' command to generate HTML reports of the execution of any recorded action. * Changed the '--output' flag of the 'report' command to only take a path to the target file, not its format. Different formats are better supported by implementing different subcommands, as the options they may receive will vary from format to format. * Added a '--with-atf' flag to the configure script to control whether the ATF tests get built or not. May be useful for packaging systems that do not have ATF in them yet. Disabling ATF also cuts down the build time of Kyua significantly, but with the obvious drawbacks. * Grouped 'kyua' subcommands by topic both in the output of 'help' and in the documentation. In general, the user needs to be aware of commands that rely on a current project and those commands that rely purely on the database to generate reports. * Made 'help' print the descriptions of options and commands properly tabulated. * Changed most informational messages to automatically wrap on screen boundaries. * Rewrote the configuration file parsing module for extensibility. This will allow future versions of Kyua to provide additional user-facing options in the configuration file. No syntax changes have been made, so existing configuration files (version 1) will continue to be parsed without problems. There is one little exception though: all variables under the top-level 'test_suites' tree must be declared as strings. Similarly, the '-v' and '--variable' flags to the command line must now carry a 'test_suites.' prefix when referencing any variables under such tree.
2012-06-07 03:13:58 +02:00
.include "../../mk/bsd.options.mk"
2016-12-31 10:39:31 +01:00
.if !empty(PKG_OPTIONS:Mtests)
. include "../../devel/atf/buildlink3.mk"
Update to 0.4. Other than the upgrade itself, this also adds a new 'tests' option to the package to indicate whether the Kyua-specific tests should be built or not. I do not recommend disabling their build, but not specifiying the 'tests' option cuts down the build time significantly. The major changes since 0.3 are: * Added the 'report-html' command to generate HTML reports of the execution of any recorded action. * Changed the '--output' flag of the 'report' command to only take a path to the target file, not its format. Different formats are better supported by implementing different subcommands, as the options they may receive will vary from format to format. * Added a '--with-atf' flag to the configure script to control whether the ATF tests get built or not. May be useful for packaging systems that do not have ATF in them yet. Disabling ATF also cuts down the build time of Kyua significantly, but with the obvious drawbacks. * Grouped 'kyua' subcommands by topic both in the output of 'help' and in the documentation. In general, the user needs to be aware of commands that rely on a current project and those commands that rely purely on the database to generate reports. * Made 'help' print the descriptions of options and commands properly tabulated. * Changed most informational messages to automatically wrap on screen boundaries. * Rewrote the configuration file parsing module for extensibility. This will allow future versions of Kyua to provide additional user-facing options in the configuration file. No syntax changes have been made, so existing configuration files (version 1) will continue to be parsed without problems. There is one little exception though: all variables under the top-level 'test_suites' tree must be declared as strings. Similarly, the '-v' and '--variable' flags to the command line must now carry a 'test_suites.' prefix when referencing any variables under such tree.
2012-06-07 03:13:58 +02:00
CONFIGURE_ARGS+= --with-atf
PLIST_SUBST+= TESTS=
post-install: post-install-tests
Update to 0.4. Other than the upgrade itself, this also adds a new 'tests' option to the package to indicate whether the Kyua-specific tests should be built or not. I do not recommend disabling their build, but not specifiying the 'tests' option cuts down the build time significantly. The major changes since 0.3 are: * Added the 'report-html' command to generate HTML reports of the execution of any recorded action. * Changed the '--output' flag of the 'report' command to only take a path to the target file, not its format. Different formats are better supported by implementing different subcommands, as the options they may receive will vary from format to format. * Added a '--with-atf' flag to the configure script to control whether the ATF tests get built or not. May be useful for packaging systems that do not have ATF in them yet. Disabling ATF also cuts down the build time of Kyua significantly, but with the obvious drawbacks. * Grouped 'kyua' subcommands by topic both in the output of 'help' and in the documentation. In general, the user needs to be aware of commands that rely on a current project and those commands that rely purely on the database to generate reports. * Made 'help' print the descriptions of options and commands properly tabulated. * Changed most informational messages to automatically wrap on screen boundaries. * Rewrote the configuration file parsing module for extensibility. This will allow future versions of Kyua to provide additional user-facing options in the configuration file. No syntax changes have been made, so existing configuration files (version 1) will continue to be parsed without problems. There is one little exception though: all variables under the top-level 'test_suites' tree must be declared as strings. Similarly, the '-v' and '--variable' flags to the command line must now carry a 'test_suites.' prefix when referencing any variables under such tree.
2012-06-07 03:13:58 +02:00
.else
CONFIGURE_ARGS+= --without-atf
PLIST_SUBST+= TESTS="@comment "
Update to 0.4. Other than the upgrade itself, this also adds a new 'tests' option to the package to indicate whether the Kyua-specific tests should be built or not. I do not recommend disabling their build, but not specifiying the 'tests' option cuts down the build time significantly. The major changes since 0.3 are: * Added the 'report-html' command to generate HTML reports of the execution of any recorded action. * Changed the '--output' flag of the 'report' command to only take a path to the target file, not its format. Different formats are better supported by implementing different subcommands, as the options they may receive will vary from format to format. * Added a '--with-atf' flag to the configure script to control whether the ATF tests get built or not. May be useful for packaging systems that do not have ATF in them yet. Disabling ATF also cuts down the build time of Kyua significantly, but with the obvious drawbacks. * Grouped 'kyua' subcommands by topic both in the output of 'help' and in the documentation. In general, the user needs to be aware of commands that rely on a current project and those commands that rely purely on the database to generate reports. * Made 'help' print the descriptions of options and commands properly tabulated. * Changed most informational messages to automatically wrap on screen boundaries. * Rewrote the configuration file parsing module for extensibility. This will allow future versions of Kyua to provide additional user-facing options in the configuration file. No syntax changes have been made, so existing configuration files (version 1) will continue to be parsed without problems. There is one little exception though: all variables under the top-level 'test_suites' tree must be declared as strings. Similarly, the '-v' and '--variable' flags to the command line must now carry a 'test_suites.' prefix when referencing any variables under such tree.
2012-06-07 03:13:58 +02:00
.endif
PRINT_PLIST_AWK+= { sub("^tests/", "$${TESTS}tests/"); }
Update to 0.4. Other than the upgrade itself, this also adds a new 'tests' option to the package to indicate whether the Kyua-specific tests should be built or not. I do not recommend disabling their build, but not specifiying the 'tests' option cuts down the build time significantly. The major changes since 0.3 are: * Added the 'report-html' command to generate HTML reports of the execution of any recorded action. * Changed the '--output' flag of the 'report' command to only take a path to the target file, not its format. Different formats are better supported by implementing different subcommands, as the options they may receive will vary from format to format. * Added a '--with-atf' flag to the configure script to control whether the ATF tests get built or not. May be useful for packaging systems that do not have ATF in them yet. Disabling ATF also cuts down the build time of Kyua significantly, but with the obvious drawbacks. * Grouped 'kyua' subcommands by topic both in the output of 'help' and in the documentation. In general, the user needs to be aware of commands that rely on a current project and those commands that rely purely on the database to generate reports. * Made 'help' print the descriptions of options and commands properly tabulated. * Changed most informational messages to automatically wrap on screen boundaries. * Rewrote the configuration file parsing module for extensibility. This will allow future versions of Kyua to provide additional user-facing options in the configuration file. No syntax changes have been made, so existing configuration files (version 1) will continue to be parsed without problems. There is one little exception though: all variables under the top-level 'test_suites' tree must be declared as strings. Similarly, the '-v' and '--variable' flags to the command line must now carry a 'test_suites.' prefix when referencing any variables under such tree.
2012-06-07 03:13:58 +02:00
.PHONY: post-install-tests
post-install-tests:
Update to 0.4. Other than the upgrade itself, this also adds a new 'tests' option to the package to indicate whether the Kyua-specific tests should be built or not. I do not recommend disabling their build, but not specifiying the 'tests' option cuts down the build time significantly. The major changes since 0.3 are: * Added the 'report-html' command to generate HTML reports of the execution of any recorded action. * Changed the '--output' flag of the 'report' command to only take a path to the target file, not its format. Different formats are better supported by implementing different subcommands, as the options they may receive will vary from format to format. * Added a '--with-atf' flag to the configure script to control whether the ATF tests get built or not. May be useful for packaging systems that do not have ATF in them yet. Disabling ATF also cuts down the build time of Kyua significantly, but with the obvious drawbacks. * Grouped 'kyua' subcommands by topic both in the output of 'help' and in the documentation. In general, the user needs to be aware of commands that rely on a current project and those commands that rely purely on the database to generate reports. * Made 'help' print the descriptions of options and commands properly tabulated. * Changed most informational messages to automatically wrap on screen boundaries. * Rewrote the configuration file parsing module for extensibility. This will allow future versions of Kyua to provide additional user-facing options in the configuration file. No syntax changes have been made, so existing configuration files (version 1) will continue to be parsed without problems. There is one little exception though: all variables under the top-level 'test_suites' tree must be declared as strings. Similarly, the '-v' and '--variable' flags to the command line must now carry a 'test_suites.' prefix when referencing any variables under such tree.
2012-06-07 03:13:58 +02:00
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/tests
${INSTALL_DATA} ${WRKSRC}/examples/Kyuafile.top \
${DESTDIR}${PREFIX}/tests/Kyuafile
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../devel/lutok/buildlink3.mk"
.include "../../lang/lua/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"