Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/kyua-atf-compat/dist Initial import of kyua-atf...



details:   https://anonhg.NetBSD.org/src/rev/056b14972cf7
branches:  trunk
changeset: 785121:056b14972cf7
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Mon Feb 25 00:17:26 2013 +0000

description:
Initial import of kyua-atf-compat, version 0.1:

This is the last component of the import of Kyua and its build will be
guarded by the MKKYUA knob.  core@ has approved this import.

Description:

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.

This module, kyua-atf-compat, provides tools to ease the transition from
ATF to Kyua.  In particular, this includes a tool to convert Atffile
files to Kyuafile files in an automated manner, and drop-in replacement
wrappers for both atf-run and atf-report.

diffstat:

 external/bsd/kyua-atf-compat/dist/AUTHORS            |    1 +
 external/bsd/kyua-atf-compat/dist/COPYING            |   27 ++
 external/bsd/kyua-atf-compat/dist/Kyuafile           |    7 +
 external/bsd/kyua-atf-compat/dist/NEWS               |   12 +
 external/bsd/kyua-atf-compat/dist/README             |   22 +
 external/bsd/kyua-atf-compat/dist/atf-report.1       |  173 +++++++++++++
 external/bsd/kyua-atf-compat/dist/atf-report.sh      |  191 ++++++++++++++
 external/bsd/kyua-atf-compat/dist/atf-report_test.sh |  250 +++++++++++++++++++
 external/bsd/kyua-atf-compat/dist/atf-run.1          |  203 +++++++++++++++
 external/bsd/kyua-atf-compat/dist/atf-run.sh         |  197 ++++++++++++++
 external/bsd/kyua-atf-compat/dist/atf-run_test.sh    |  233 +++++++++++++++++
 external/bsd/kyua-atf-compat/dist/atf2kyua.1         |   64 ++++
 external/bsd/kyua-atf-compat/dist/atf2kyua.sh        |  181 +++++++++++++
 external/bsd/kyua-atf-compat/dist/atf2kyua_test.sh   |  246 ++++++++++++++++++
 external/bsd/kyua-atf-compat/dist/helpers.sh         |   77 +++++
 external/bsd/kyua-atf-compat/dist/lib.subr           |  134 ++++++++++
 external/bsd/kyua-atf-compat/dist/tests_lib.subr     |   98 +++++++
 17 files changed, 2116 insertions(+), 0 deletions(-)

diffs (truncated from 2184 to 300 lines):

diff -r 9528835566bc -r 056b14972cf7 external/bsd/kyua-atf-compat/dist/AUTHORS
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/dist/AUTHORS Mon Feb 25 00:17:26 2013 +0000
@@ -0,0 +1,1 @@
+* Julio Merino <jmmv%google.com@localhost>
diff -r 9528835566bc -r 056b14972cf7 external/bsd/kyua-atf-compat/dist/COPYING
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/dist/COPYING Mon Feb 25 00:17:26 2013 +0000
@@ -0,0 +1,27 @@
+Copyright 2011, 2012 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.
diff -r 9528835566bc -r 056b14972cf7 external/bsd/kyua-atf-compat/dist/Kyuafile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/dist/Kyuafile        Mon Feb 25 00:17:26 2013 +0000
@@ -0,0 +1,7 @@
+syntax('kyuafile', 1)
+
+test_suite('kyua')
+
+atf_test_program{name='atf-run_test'}
+atf_test_program{name='atf-report_test'}
+atf_test_program{name='atf2kyua_test'}
diff -r 9528835566bc -r 056b14972cf7 external/bsd/kyua-atf-compat/dist/NEWS
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/dist/NEWS    Mon Feb 25 00:17:26 2013 +0000
@@ -0,0 +1,12 @@
+Changes in version 0.1
+======================
+
+Experimental version released on June 10th, 2012.
+
+This is the first public release of the kyua-atf-compat package.
+
+This first release is paired with the 0.16 release of ATF, which
+disables the build of atf-run and atf-report by default.  The goal
+of this package is, then, to provide compatibility utilities for
+these disabled tools but using Kyua as the backend for the execution
+of the tests.
diff -r 9528835566bc -r 056b14972cf7 external/bsd/kyua-atf-compat/dist/README
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/dist/README  Mon Feb 25 00:17:26 2013 +0000
@@ -0,0 +1,22 @@
+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.
+
+This module, kyua-atf-compat, provides tools to ease the transition from
+ATF to Kyua.  In particular, this includes a tool to convert Atffile
+files to Kyuafile files in an automated manner, and drop-in replacement
+wrappers for both atf-run and atf-report.
+
+For further information on the contents of this distribution file,
+please refer to the following other documents:
+
+* AUTHORS: List of authors and contributors to this project.
+* COPYING: License information.
+* INSTALL: Compilation and installation instructions.
+* NEWS: List of major changes between formal releases.
+
+For general project information, please visit:
+
+    http://code.google.com/p/kyua/
diff -r 9528835566bc -r 056b14972cf7 external/bsd/kyua-atf-compat/dist/atf-report.1
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/dist/atf-report.1    Mon Feb 25 00:17:26 2013 +0000
@@ -0,0 +1,173 @@
+.\" Copyright 2012 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.
+.Dd June 16, 2012
+.Dt ATF-REPORT 1
+.Os
+.Sh NAME
+.Nm atf-report
+.Nd Kyua-based implementation of the deprecated atf-report
+.Sh SYNOPSIS
+.Nm
+.Op Fl o Ar fmt1:path1 Op .. Fl o Ar fmtN:pathN
+.Sh DESCRIPTION
+.Em DISCLAIMER :
+This version of
+.Nm
+provides a reimplementation of ATF's reporting engine built on top of Kyua.
+This is a transitional script and should only be considered a helper to
+migrate away from ATF.
+Therefore, this version of
+.Nm
+mimics the
+.Em behavior
+of the original
+.Nm
+but
+.Em NOT
+the specific output of the command.
+The output of this implementation is significantly different as that of the
+original one.
+Please migrate to using
+.Sq kyua test
+as soon as feasible.
+See the
+.Sx Migration path
+section below for further details.
+.Pp
+.Nm
+reads the output of
+.Nm atf-run
+and transforms it to different formats.
+Some of these are user-friendly and others are machine-parseable, which
+opens a wide range of possibilities to analyze the results of a test
+suite's execution.
+See
+.Sx Output formats
+below for more details on which these formats are.
+.Pp
+In the first synopsis form,
+.Nm
+reads the output of
+.Nm atf-run
+through its standard input and, if no
+.Fl o
+option is given, prints a user-friendly report on its standard
+output using the
+.Sq ticker
+format.
+If the
+.Fl o
+option is provided, it specifies the output format to use and its
+destination.
+.Pp
+The following options are available:
+.Bl -tag -width XoXfmtXpathXX
+.It Fl o Ar fmt:path
+Adds a new output format.
+.Ar fmt
+is one of the formats described later on in
+.Sx Output formats .
+.Ar path
+specifies where the report will be written to.
+Depending on the chosen format, this may refer to a single file or to
+a directory.
+For those formats that write to a single file, specifying a
+.Sq -
+as the path will redirect the report to the standard output.
+.El
+.Ss Output formats
+The following output formats are allowed:
+.Bl -tag -width tickerXX
+.It ticker
+A user-friendly report that shows the progress of the test suite's
+execution as it operates.
+This type of report should always be redirected to a virtual terminal,
+not a file, as it may use control sequences that will make the output
+unreadable in regular files.
+.It html
+A multi-file HTML report.
+The specified output file will be a symlink into a directory containing
+all the other support files for the HTML report.
+.Pp
+This format was not originally supported by
+.Nm ,
+but is the right name for the compatibility
+.Sq xml
+support.
+.It xml
+A compatibility name for
+.Sq html .
+The original
+.Nm
+was only able to generate XML reports and relied on tools like
+.Xr xsltproc 1
+to convert them to HTML.
+The process was quite convoluted and inconvenient.
+Kyua, on the other hand, is only able to create HTML reports at the
+moment.
+.El
+.Pp
+.Ss Migration path
+Moving from
+.Nm
+to
+.Sq kyua report
+is rather simple.
+.Pp
+The most important thing to understand during the transition is that
+.Sq kyua test
+stores the output of the execution in a database and does not print a
+machine-parseable log to its stdout.
+Instead,
+.Sq kyua report
+is used as a second step to extract reports from the database for any
+previously executed test.
+.Pp
+The following examples show how to convert some common
+.Nm
+invocations to their corresponding
+.Sq kyua report
+ones.
+Because
+.Nm
+has always been tied to
+.Xr atf-run 1 ,
+these examples also mention the latter.
+.Bd -literal -offset indent
+### Run all tests, with a summary at the end.
+$ atf-run | atf-report
+$ kyua test && kyua report
+
+### Generate a HTML report.
+$ atf-run | atf-report -o xml:report.xml
+  ... plus some complex file manipulation and xsltproc magic ...
+$ kyua test && kyua report-html -o path/to/report/
+.Ed
+.Sh SEE ALSO
+.Xr kyua 1 ,
+.Xr atf-run 1
diff -r 9528835566bc -r 056b14972cf7 external/bsd/kyua-atf-compat/dist/atf-report.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/kyua-atf-compat/dist/atf-report.sh   Mon Feb 25 00:17:26 2013 +0000
@@ -0,0 +1,191 @@
+#! __SH__
+# Copyright 2012 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 atf-report.sh



Home | Main Index | Thread Index | Old Index