Skip to content

Commit

Permalink
Update devel/kyua to 0.12:
Browse files Browse the repository at this point in the history
**Released on November 22nd, 2015.**

This is a huge release and marks a major milestone for Kyua as it finally
implements a long-standing feature request: the ability to execute test
cases in parallel.  This is a big deal because test cases are rarely
CPU-bound: running them in parallel yields much faster execution times for
large test suites, allowing faster iteration of changes during development.

As an example: the FreeBSD test suite as of this date contains 3285 test
cases.  With sequential execution, a full test suite run takes around 12
minutes to complete, whereas on a 4-core machine with a high level of
parallelism it takes a little over 1 minute.

Implementing parallel execution required rewriting most of Kyua's core and
partly explains explains why there has not been a new release for over a
year.  The current implementation is purely subprocess-based, which works
but has some limitations and has resulted in a core that is really complex
and difficult to understand.  Future versions will investigate the use of
threads instead for a simplified programming model and additional
parallelization possibilities.

* Issue #2: Implemented support to execute test cases in parallel when
  invoking `kyua test`.  Parallel execution is *only* enabled when the new
  `parallelism` configuration variable is set to a value greater than `1`.
  The default behavior is still to run tests sequentially because some test
  suites contain test cases with side-effects that might fail when run in
  parallel.  To resolve this, the new metadata property `is_exclusive` can
  be set to `true` on a test basis to indicate that the test must be run on
  its own.

* Known regression: Running `kyua debug` on a TAP-based test program does
  not currently report the output in real time.  The output will only be
  displayed once the test program completes.  This is a shortcoming of
  the new parallel execution engine and will be resolved.

* Removed the external C-based testers code in favor of the new built-in
  implementations.  The new approach feels significantly faster than the
  previous one.

* Fixed the handling of relative paths in the `fs.*` functions available
  in `Kyuafile`s.  All paths are now resolved relative to the location of
  the caller `Kyuafile`.  `Kyuafile.top` has been updated with these
  changes and you should update custom copies of this file with the new
  version.

* Changed temporary directory creation to always grant search
  permissions on temporary directories.  This is to prevent potential
  problems when running Kyua as root and executing test cases that require
  dropping privileges (as they may later be unable to use absolute paths
  that point inside their work directory).

* The cleanup of work directories does not longer attempt to deal with
  mount points.  If a test case mounts a file system and forgets to unmount
  it, the mount point will be left behind.  It is now the responsibility of
  the test case to clean after itself.  The reasons for this change are
  simplicity and clarity: there are many more things that a test case can
  do that have side-effects on the system and Kyua cannot protect against
  them all, so it is better to just have the test undo anything it might
  have done.

* Improved `kyua report --verbose` to properly handle environment
  variables with continuation lines in them, and fixed the integration
  tests for this command to avoid false negatives.

* Changed the configuration file format to accept the definition of
  unknown variables without declaring them local.  The syntax version
  number remains at 2.  This is to allow configuration files for newer Kyua
  versions to work on older Kyua versions, as there is no reason to forbid
  this.

* Fixed stacktrace gathering with FreeBSD's ancient version of GDB.
  GDB 6.1.1 (circa 2004) does not have the `-ex` flag so we need to
  generate a temporary GDB script and feed it to GDB with `-x` instead.

* Issue #136: Fixed the XML escaping in the JUnit output so that
  non-printable characters are properly handled when they appear in the
  process's stdout or stderr.

* Issue #141: Improved reporting of errors triggered by sqlite3.  In
  particular, all error messages are now tagged with their corresponding
  database filename and, if they are API-level errors, the name of the
  sqlite3 function that caused them.

* Issue #144: Improved documentation on the support for custom properties
  in the test metadata.

* Converted the `INSTALL`, `NEWS`, and `README` distribution documents to
  Markdown for better formatting online.
  • Loading branch information
jmmv committed Nov 23, 2015
1 parent 16cf135 commit 1d84f1e
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 50 deletions.
25 changes: 14 additions & 11 deletions devel/kyua/DESCR
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
Kyua (pronounced Q.A.) is a testing framework for both developers and
users. Kyua is different from most other testing frameworks in that it
puts the end user experience before anything else. There are multiple
reasons for users to run the tests themselves, and Kyua ensures that
they can do so in the most convenient way.
Kyua is a testing framework for infrastructure software, originally
designed to equip BSD-based operating systems with a test suite. This
means that Kyua is lightweight and simple, and that Kyua integrates well
with various build systems and continuous integration frameworks.

At the moment, Kyua is focused on implementing a solid foundation and a
powerful command-line tool to run tests implemented with the Automated
Testing Framework (ATF). Later on, Kyua will also provide a set of
language bindings (C, C++ and shell, at the least) to ease the
implementation of test cases in a variety of programming languages.
Kyua features an expressive test suite definition language, a safe
runtime engine for test suites and a powerful report generation engine.

In effect, Kyua is intended to be a replacement for ATF.
Kyua is for both developers and users, from the developer applying a
simple fix to a library to the system administrator deploying a new
release on a production machine.

Kyua is able to execute test programs written with a plethora of testing
libraries and languages. The library of choice is ATF, for which Kyua
was originally designed, but simple, framework-less test programs and
TAP-compliant test programs can also be executed through Kyua.
5 changes: 2 additions & 3 deletions devel/kyua/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# $NetBSD: Makefile,v 1.7 2015/10/10 01:58:05 ryoon Exp $
# $NetBSD: Makefile,v 1.8 2015/11/23 03:39:14 jmmv Exp $

DISTNAME= kyua-0.11
PKGREVISION= 1
DISTNAME= kyua-0.12
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=jmmv/kyua/releases/download/${DISTNAME}/}

Expand Down
58 changes: 27 additions & 31 deletions devel/kyua/PLIST
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
@comment $NetBSD: PLIST,v 1.2 2015/10/01 15:17:32 prlw1 Exp $
@comment $NetBSD: PLIST,v 1.3 2015/11/23 03:39:14 jmmv Exp $
bin/kyua
libexec/kyua-atf-tester
libexec/kyua-plain-tester
libexec/kyua-tap-tester
man/man1/kyua-about.1
man/man1/kyua-config.1
man/man1/kyua-db-exec.1
Expand All @@ -18,9 +15,10 @@ man/man1/kyua.1
man/man5/kyua.conf.5
man/man5/kyuafile.5
share/doc/kyua/AUTHORS
share/doc/kyua/COPYING
share/doc/kyua/NEWS
share/doc/kyua/README
share/doc/kyua/CONTRIBUTING.md
share/doc/kyua/CONTRIBUTORS
share/doc/kyua/LICENSE
share/doc/kyua/NEWS.md
share/kyua/examples/Kyuafile.top
share/kyua/examples/kyua.conf
share/kyua/misc/context.html
Expand Down Expand Up @@ -53,15 +51,22 @@ ${TESTS}tests/kyua/drivers/list_tests_test
${TESTS}tests/kyua/drivers/report_junit_test
${TESTS}tests/kyua/drivers/scan_results_test
${TESTS}tests/kyua/engine/Kyuafile
${TESTS}tests/kyua/engine/atf_helpers
${TESTS}tests/kyua/engine/atf_list_test
${TESTS}tests/kyua/engine/atf_result_test
${TESTS}tests/kyua/engine/atf_test
${TESTS}tests/kyua/engine/config_test
${TESTS}tests/kyua/engine/exceptions_test
${TESTS}tests/kyua/engine/filters_test
${TESTS}tests/kyua/engine/kyuafile_test
${TESTS}tests/kyua/engine/plain_helpers
${TESTS}tests/kyua/engine/plain_test
${TESTS}tests/kyua/engine/requirements_test
${TESTS}tests/kyua/engine/runner_test
${TESTS}tests/kyua/engine/test_case_atf_helpers
${TESTS}tests/kyua/engine/test_case_plain_helpers
${TESTS}tests/kyua/engine/testers_test
${TESTS}tests/kyua/engine/scanner_test
${TESTS}tests/kyua/engine/scheduler_test
${TESTS}tests/kyua/engine/tap_helpers
${TESTS}tests/kyua/engine/tap_parser_test
${TESTS}tests/kyua/engine/tap_test
${TESTS}tests/kyua/examples/Kyuafile
${TESTS}tests/kyua/examples/syntax_test
${TESTS}tests/kyua/integration/Kyuafile
Expand All @@ -80,10 +85,12 @@ ${TESTS}tests/kyua/integration/global_test
${TESTS}tests/kyua/integration/helpers/bad_test_program
${TESTS}tests/kyua/integration/helpers/bogus_test_cases
${TESTS}tests/kyua/integration/helpers/config
${TESTS}tests/kyua/integration/helpers/dump_env
${TESTS}tests/kyua/integration/helpers/expect_all_pass
${TESTS}tests/kyua/integration/helpers/expect_some_fail
${TESTS}tests/kyua/integration/helpers/interrupts
${TESTS}tests/kyua/integration/helpers/metadata
${TESTS}tests/kyua/integration/helpers/race
${TESTS}tests/kyua/integration/helpers/simple_all_pass
${TESTS}tests/kyua/integration/helpers/simple_some_fail
${TESTS}tests/kyua/model/Kyuafile
Expand Down Expand Up @@ -113,25 +120,6 @@ ${TESTS}tests/kyua/store/testdata_v3_4.sql
${TESTS}tests/kyua/store/transaction_test
${TESTS}tests/kyua/store/write_backend_test
${TESTS}tests/kyua/store/write_transaction_test
${TESTS}tests/kyua/testers/Kyuafile
${TESTS}tests/kyua/testers/atf_helpers
${TESTS}tests/kyua/testers/atf_inttest
${TESTS}tests/kyua/testers/atf_list_test
${TESTS}tests/kyua/testers/atf_result_test
${TESTS}tests/kyua/testers/cli_test
${TESTS}tests/kyua/testers/env_test
${TESTS}tests/kyua/testers/error_test
${TESTS}tests/kyua/testers/fs_test
${TESTS}tests/kyua/testers/plain_helpers
${TESTS}tests/kyua/testers/plain_inttest
${TESTS}tests/kyua/testers/result_test
${TESTS}tests/kyua/testers/run_test
${TESTS}tests/kyua/testers/stacktrace_helper
${TESTS}tests/kyua/testers/stacktrace_test
${TESTS}tests/kyua/testers/tap_helpers
${TESTS}tests/kyua/testers/tap_inttest
${TESTS}tests/kyua/testers/tap_parser_test
${TESTS}tests/kyua/testers/text_test
${TESTS}tests/kyua/utils/Kyuafile
${TESTS}tests/kyua/utils/auto_array_test
${TESTS}tests/kyua/utils/cmdline/Kyuafile
Expand All @@ -157,6 +145,7 @@ ${TESTS}tests/kyua/utils/format/exceptions_test
${TESTS}tests/kyua/utils/format/formatter_test
${TESTS}tests/kyua/utils/fs/Kyuafile
${TESTS}tests/kyua/utils/fs/auto_cleaners_test
${TESTS}tests/kyua/utils/fs/directory_test
${TESTS}tests/kyua/utils/fs/exceptions_test
${TESTS}tests/kyua/utils/fs/lua_module_test
${TESTS}tests/kyua/utils/fs/operations_test
Expand All @@ -169,28 +158,35 @@ ${TESTS}tests/kyua/utils/optional_test
${TESTS}tests/kyua/utils/passwd_test
${TESTS}tests/kyua/utils/process/Kyuafile
${TESTS}tests/kyua/utils/process/child_test
${TESTS}tests/kyua/utils/process/deadline_killer_test
${TESTS}tests/kyua/utils/process/exceptions_test
${TESTS}tests/kyua/utils/process/executor_test
${TESTS}tests/kyua/utils/process/fdstream_test
${TESTS}tests/kyua/utils/process/helpers
${TESTS}tests/kyua/utils/process/isolation_test
${TESTS}tests/kyua/utils/process/operations_test
${TESTS}tests/kyua/utils/process/status_test
${TESTS}tests/kyua/utils/process/systembuf_test
${TESTS}tests/kyua/utils/releaser_test
${TESTS}tests/kyua/utils/sanity_test
${TESTS}tests/kyua/utils/signals/Kyuafile
${TESTS}tests/kyua/utils/signals/exceptions_test
${TESTS}tests/kyua/utils/signals/interrupts_test
${TESTS}tests/kyua/utils/signals/misc_test
${TESTS}tests/kyua/utils/signals/programmer_test
${TESTS}tests/kyua/utils/signals/timer_test
${TESTS}tests/kyua/utils/sqlite/Kyuafile
${TESTS}tests/kyua/utils/sqlite/c_gate_test
${TESTS}tests/kyua/utils/sqlite/database_test
${TESTS}tests/kyua/utils/sqlite/exceptions_test
${TESTS}tests/kyua/utils/sqlite/statement_test
${TESTS}tests/kyua/utils/sqlite/transaction_test
${TESTS}tests/kyua/utils/stacktrace_helper
${TESTS}tests/kyua/utils/stacktrace_test
${TESTS}tests/kyua/utils/stream_test
${TESTS}tests/kyua/utils/text/Kyuafile
${TESTS}tests/kyua/utils/text/exceptions_test
${TESTS}tests/kyua/utils/text/operations_test
${TESTS}tests/kyua/utils/text/regex_test
${TESTS}tests/kyua/utils/text/table_test
${TESTS}tests/kyua/utils/text/templates_test
${TESTS}tests/kyua/utils/units_test
10 changes: 5 additions & 5 deletions devel/kyua/distinfo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.3 2015/11/03 03:27:37 agc Exp $
$NetBSD: distinfo,v 1.4 2015/11/23 03:39:14 jmmv Exp $

SHA1 (kyua-0.11.tar.gz) = ba4b822c7157bf9b3478717fc3ff9bb9883d7a8f
RMD160 (kyua-0.11.tar.gz) = 4b7b7b21eafc53f54bfefaae57dbfa0dceb27586
SHA512 (kyua-0.11.tar.gz) = aee8f7f91d3a84e6e27a83c306f69627499d8127030eca521414b6c9a5834f920b6b750f6ae378216065ad745d05fa809436d0dcc08f209dd6874b29785cdcbb
Size (kyua-0.11.tar.gz) = 611865 bytes
SHA1 (kyua-0.12.tar.gz) = 72225fb836d23060f3a77fc9d8753bd70e3796a8
RMD160 (kyua-0.12.tar.gz) = a05c5a35e8a6b7f7e4b629faeb9578205389247d
SHA512 (kyua-0.12.tar.gz) = ab4b2905629ef733a51f090c7197297636a972b4a0668891e2b23f8601fd5818f1962103d6d957f8e9c2bf07ed6eea652c168c79bc1bd5fde0abb65f4f46deb2
Size (kyua-0.12.tar.gz) = 663129 bytes

0 comments on commit 1d84f1e

Please sign in to comment.