]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] update to atf 0.17
authorEvan Hunt <each@isc.org>
Thu, 12 Sep 2013 23:18:26 +0000 (16:18 -0700)
committerEvan Hunt <each@isc.org>
Thu, 12 Sep 2013 23:18:26 +0000 (16:18 -0700)
3648. [test] Updated the ATF test framework to version 0.17.
[RT #25627]

265 files changed:
CHANGES
configure
configure.in
unit/README
unit/atf-src/AUTHORS
unit/atf-src/Atffile
unit/atf-src/COPYING
unit/atf-src/INSTALL
unit/atf-src/Kyuafile [new file with mode: 0644]
unit/atf-src/Makefile.am
unit/atf-src/Makefile.in
unit/atf-src/NEWS
unit/atf-src/TODO [new file with mode: 0644]
unit/atf-src/aclocal.m4
unit/atf-src/admin/Makefile.am.inc
unit/atf-src/admin/check-install.sh [deleted file]
unit/atf-src/admin/check-style-c.awk
unit/atf-src/admin/check-style-common.awk
unit/atf-src/admin/check-style-cpp.awk
unit/atf-src/admin/check-style-man.awk
unit/atf-src/admin/check-style-shell.awk
unit/atf-src/admin/check-style.sh
unit/atf-src/admin/compile
unit/atf-src/admin/depcomp
unit/atf-src/admin/install-sh
unit/atf-src/admin/ltmain.sh
unit/atf-src/admin/missing
unit/atf-src/atf-c++.hpp
unit/atf-src/atf-c++/Kyuafile [new file with mode: 0644]
unit/atf-src/atf-c++/Makefile.am.inc
unit/atf-src/atf-c++/atf-c++-api.3
unit/atf-src/atf-c++/atf-c++.m4 [new file with mode: 0644]
unit/atf-src/atf-c++/check.cpp
unit/atf-src/atf-c++/check.hpp
unit/atf-src/atf-c++/check_test.cpp
unit/atf-src/atf-c++/config.cpp
unit/atf-src/atf-c++/config.hpp
unit/atf-src/atf-c++/config_test.cpp
unit/atf-src/atf-c++/detail/Atffile
unit/atf-src/atf-c++/detail/Kyuafile [new file with mode: 0644]
unit/atf-src/atf-c++/detail/Makefile.am.inc
unit/atf-src/atf-c++/detail/application.cpp
unit/atf-src/atf-c++/detail/application.hpp
unit/atf-src/atf-c++/detail/application_test.cpp
unit/atf-src/atf-c++/detail/auto_array.hpp [new file with mode: 0644]
unit/atf-src/atf-c++/detail/auto_array_test.cpp [new file with mode: 0644]
unit/atf-src/atf-c++/detail/env.cpp
unit/atf-src/atf-c++/detail/env.hpp
unit/atf-src/atf-c++/detail/env_test.cpp
unit/atf-src/atf-c++/detail/exceptions.cpp
unit/atf-src/atf-c++/detail/exceptions.hpp
unit/atf-src/atf-c++/detail/exceptions_test.cpp
unit/atf-src/atf-c++/detail/expand.cpp
unit/atf-src/atf-c++/detail/expand.hpp
unit/atf-src/atf-c++/detail/expand_test.cpp
unit/atf-src/atf-c++/detail/fs.cpp
unit/atf-src/atf-c++/detail/fs.hpp
unit/atf-src/atf-c++/detail/fs_test.cpp
unit/atf-src/atf-c++/detail/parser.cpp
unit/atf-src/atf-c++/detail/parser.hpp
unit/atf-src/atf-c++/detail/parser_test.cpp
unit/atf-src/atf-c++/detail/process.cpp
unit/atf-src/atf-c++/detail/process.hpp
unit/atf-src/atf-c++/detail/process_test.cpp
unit/atf-src/atf-c++/detail/sanity.hpp
unit/atf-src/atf-c++/detail/test_helpers.cpp
unit/atf-src/atf-c++/detail/test_helpers.hpp
unit/atf-src/atf-c++/detail/text.cpp
unit/atf-src/atf-c++/detail/text.hpp
unit/atf-src/atf-c++/detail/text_test.cpp
unit/atf-src/atf-c++/detail/ui.cpp
unit/atf-src/atf-c++/detail/ui.hpp
unit/atf-src/atf-c++/macros.hpp
unit/atf-src/atf-c++/macros_hpp_test.cpp
unit/atf-src/atf-c++/macros_test.cpp
unit/atf-src/atf-c++/noncopyable.hpp [new file with mode: 0644]
unit/atf-src/atf-c++/pkg_config_test.sh
unit/atf-src/atf-c++/tests.cpp
unit/atf-src/atf-c++/tests.hpp
unit/atf-src/atf-c++/tests_test.cpp
unit/atf-src/atf-c++/unused_test.cpp [new file with mode: 0644]
unit/atf-src/atf-c++/utils.cpp [new file with mode: 0644]
unit/atf-src/atf-c++/utils.hpp
unit/atf-src/atf-c++/utils_test.cpp
unit/atf-src/atf-c.h
unit/atf-src/atf-c/Atffile
unit/atf-src/atf-c/Kyuafile [new file with mode: 0644]
unit/atf-src/atf-c/Makefile.am.inc
unit/atf-src/atf-c/atf-c-api.3
unit/atf-src/atf-c/atf-c.m4 [new file with mode: 0644]
unit/atf-src/atf-c/atf-common.m4 [new file with mode: 0644]
unit/atf-src/atf-c/atf_c_test.c
unit/atf-src/atf-c/check.c
unit/atf-src/atf-c/check.h
unit/atf-src/atf-c/check_test.c
unit/atf-src/atf-c/config.c
unit/atf-src/atf-c/config_test.c
unit/atf-src/atf-c/defs.h.in
unit/atf-src/atf-c/detail/Atffile
unit/atf-src/atf-c/detail/Kyuafile [new file with mode: 0644]
unit/atf-src/atf-c/detail/Makefile.am.inc
unit/atf-src/atf-c/detail/dynstr.c
unit/atf-src/atf-c/detail/dynstr.h
unit/atf-src/atf-c/detail/dynstr_test.c
unit/atf-src/atf-c/detail/env.c
unit/atf-src/atf-c/detail/env_test.c
unit/atf-src/atf-c/detail/fs.c
unit/atf-src/atf-c/detail/fs.h
unit/atf-src/atf-c/detail/fs_test.c
unit/atf-src/atf-c/detail/list.c
unit/atf-src/atf-c/detail/list.h
unit/atf-src/atf-c/detail/list_test.c
unit/atf-src/atf-c/detail/map.c
unit/atf-src/atf-c/detail/map.h
unit/atf-src/atf-c/detail/map_test.c
unit/atf-src/atf-c/detail/process.c
unit/atf-src/atf-c/detail/process.h
unit/atf-src/atf-c/detail/process_helpers.c
unit/atf-src/atf-c/detail/process_test.c
unit/atf-src/atf-c/detail/sanity_test.c
unit/atf-src/atf-c/detail/test_helpers.c
unit/atf-src/atf-c/detail/test_helpers.h
unit/atf-src/atf-c/detail/test_helpers_test.c [deleted file]
unit/atf-src/atf-c/detail/text.c
unit/atf-src/atf-c/detail/text.h
unit/atf-src/atf-c/detail/text_test.c
unit/atf-src/atf-c/detail/tp_main.c
unit/atf-src/atf-c/detail/user.c
unit/atf-src/atf-c/detail/user.h
unit/atf-src/atf-c/detail/user_test.c
unit/atf-src/atf-c/error.c
unit/atf-src/atf-c/error.h
unit/atf-src/atf-c/error_test.c
unit/atf-src/atf-c/macros.h
unit/atf-src/atf-c/macros_h_test.c
unit/atf-src/atf-c/macros_test.c
unit/atf-src/atf-c/pkg_config_test.sh
unit/atf-src/atf-c/tc.c
unit/atf-src/atf-c/tc.h
unit/atf-src/atf-c/tc_test.c
unit/atf-src/atf-c/tp.c
unit/atf-src/atf-c/tp.h
unit/atf-src/atf-c/tp_test.c
unit/atf-src/atf-c/unused_test.c [new file with mode: 0644]
unit/atf-src/atf-c/utils.c
unit/atf-src/atf-c/utils.h
unit/atf-src/atf-c/utils_test.c
unit/atf-src/atf-config/Kyuafile [new file with mode: 0644]
unit/atf-src/atf-config/Makefile.am.inc
unit/atf-src/atf-config/atf-config.1
unit/atf-src/atf-config/atf-config.cpp
unit/atf-src/atf-config/integration_test.sh
unit/atf-src/atf-report/Kyuafile [new file with mode: 0644]
unit/atf-src/atf-report/Makefile.am.inc
unit/atf-src/atf-report/atf-report.1
unit/atf-src/atf-report/atf-report.cpp
unit/atf-src/atf-report/fail_helper.cpp
unit/atf-src/atf-report/integration_test.sh
unit/atf-src/atf-report/misc_helpers.cpp
unit/atf-src/atf-report/pass_helper.cpp
unit/atf-src/atf-report/reader.cpp
unit/atf-src/atf-report/reader.hpp
unit/atf-src/atf-report/reader_test.cpp
unit/atf-src/atf-report/tests-results.css
unit/atf-src/atf-report/tests-results.dtd
unit/atf-src/atf-report/tests-results.xsl
unit/atf-src/atf-run/Kyuafile [new file with mode: 0644]
unit/atf-src/atf-run/Makefile.am.inc
unit/atf-src/atf-run/atf-run.1
unit/atf-src/atf-run/atf-run.cpp
unit/atf-src/atf-run/atffile.cpp
unit/atf-src/atf-run/atffile.hpp
unit/atf-src/atf-run/atffile_test.cpp
unit/atf-src/atf-run/config.cpp
unit/atf-src/atf-run/config_test.cpp
unit/atf-src/atf-run/fs.cpp
unit/atf-src/atf-run/fs.hpp
unit/atf-src/atf-run/fs_test.cpp
unit/atf-src/atf-run/integration_test.sh
unit/atf-src/atf-run/io.cpp
unit/atf-src/atf-run/io.hpp
unit/atf-src/atf-run/io_test.cpp
unit/atf-src/atf-run/misc_helpers.cpp
unit/atf-src/atf-run/pass_helper.cpp
unit/atf-src/atf-run/requirements.cpp
unit/atf-src/atf-run/requirements_test.cpp
unit/atf-src/atf-run/several_tcs_helper.c
unit/atf-src/atf-run/share/atf-run.hooks
unit/atf-src/atf-run/signals.cpp
unit/atf-src/atf-run/signals.hpp
unit/atf-src/atf-run/signals_test.cpp
unit/atf-src/atf-run/test-program.cpp
unit/atf-src/atf-run/test_program_test.cpp
unit/atf-src/atf-run/timer.cpp
unit/atf-src/atf-run/timer.hpp
unit/atf-src/atf-run/user.cpp
unit/atf-src/atf-run/user.hpp
unit/atf-src/atf-run/user_test.cpp
unit/atf-src/atf-run/zero_tcs_helper.c
unit/atf-src/atf-sh/Kyuafile [new file with mode: 0644]
unit/atf-src/atf-sh/Makefile.am.inc
unit/atf-src/atf-sh/atf-check.1
unit/atf-src/atf-sh/atf-check.cpp
unit/atf-src/atf-sh/atf-check_test.sh
unit/atf-src/atf-sh/atf-sh-api.3
unit/atf-src/atf-sh/atf-sh.cpp
unit/atf-src/atf-sh/atf-sh.m4 [new file with mode: 0644]
unit/atf-src/atf-sh/atf-sh.pc.in [new file with mode: 0644]
unit/atf-src/atf-sh/atf_check_test.sh
unit/atf-src/atf-sh/config_test.sh
unit/atf-src/atf-sh/libatf-sh.subr
unit/atf-src/atf-sh/misc_helpers.sh
unit/atf-src/atf-sh/normalize_test.sh
unit/atf-src/atf-sh/tc_test.sh
unit/atf-src/atf-sh/tp_test.sh
unit/atf-src/atf-version/Makefile.am.inc
unit/atf-src/atf-version/atf-version.1
unit/atf-src/atf-version/atf-version.cpp
unit/atf-src/atf-version/generate-revision.sh
unit/atf-src/bootstrap/Makefile.am.inc
unit/atf-src/bootstrap/h_app_empty.cpp
unit/atf-src/bootstrap/h_app_opts_args.cpp
unit/atf-src/bootstrap/h_tp_atf_check_sh.sh
unit/atf-src/bootstrap/h_tp_basic_cpp.cpp
unit/atf-src/bootstrap/h_tp_basic_sh.sh
unit/atf-src/bootstrap/package.m4
unit/atf-src/bootstrap/t_application_help.at
unit/atf-src/bootstrap/t_application_opts_args.at
unit/atf-src/bootstrap/t_atf_config.at
unit/atf-src/bootstrap/t_atf_run.at
unit/atf-src/bootstrap/t_subr_atf_check.at
unit/atf-src/bootstrap/t_test_program_compare.at
unit/atf-src/bootstrap/t_test_program_filter.at
unit/atf-src/bootstrap/t_test_program_list.at
unit/atf-src/bootstrap/t_test_program_run.at
unit/atf-src/bootstrap/testsuite
unit/atf-src/bootstrap/testsuite.at
unit/atf-src/configure
unit/atf-src/configure.ac
unit/atf-src/doc/Makefile.am.inc
unit/atf-src/doc/atf-formats.5
unit/atf-src/doc/atf-test-case.4
unit/atf-src/doc/atf-test-program.1
unit/atf-src/doc/atf.7.in
unit/atf-src/m4/compiler-flags.m4
unit/atf-src/m4/cxx-std-funcs.m4
unit/atf-src/m4/developer-mode.m4
unit/atf-src/m4/module-application.m4
unit/atf-src/m4/module-defs.m4
unit/atf-src/m4/module-env.m4
unit/atf-src/m4/module-fs.m4
unit/atf-src/m4/module-sanity.m4
unit/atf-src/m4/module-signals.m4
unit/atf-src/test-programs/Atffile
unit/atf-src/test-programs/Kyuafile [new file with mode: 0644]
unit/atf-src/test-programs/Makefile.am.inc
unit/atf-src/test-programs/c_helpers.c
unit/atf-src/test-programs/config_test.sh
unit/atf-src/test-programs/cpp_helpers.cpp
unit/atf-src/test-programs/expect_test.sh
unit/atf-src/test-programs/fork_test.sh [deleted file]
unit/atf-src/test-programs/meta_data_test.sh
unit/atf-src/test-programs/result_test.sh
unit/atf-src/test-programs/sh_helpers.sh
unit/atf-src/test-programs/srcdir_test.sh

diff --git a/CHANGES b/CHANGES
index 660fce114067794cee7e9c074413664bd37c8b01..ec747302d78cadd7dbcc6b5ee898f44719df6f1b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3648.  [test]          Updated the ATF test framework to version 0.17.
+                       [RT #25627]
+
 3647.  [bug]           Address a race condition when shutting down a zone.
                        [RT #34750]
 
index 39432490a8e4b137f02bedbf6bba77c58c90d322..d7a550fabd1e88dccaa7a2ab707e666c916bac50 100755 (executable)
--- a/configure
+++ b/configure
@@ -23235,7 +23235,7 @@ fi
                 /*) ;;
                 *) srcdir="../../$srcdir";;
                 esac
-                ${SHELL} "${srcdir}${srcdir:+/unit/atf-src/}./configure" MISSING=: --prefix $atfdir;
+                ${SHELL} "${srcdir}${srcdir:+/unit/atf-src/}./configure" --enable-tools --disable-shared MISSING=: --prefix $atfdir;
                )  ;;
     "chmod":C) chmod a+x isc-config.sh doc/doxygen/doxygen-input-filter ;;
 
index 0e886368129662b4ef14e0759bb7780d105b30f3..1b8bfd30dfb87e37a101ef795c5db93915cd0acb 100644 (file)
@@ -3393,7 +3393,7 @@ if test "$atf" = yes; then
                 /*) ;;
                 *) srcdir="../../$srcdir";;
                 esac
-                ${SHELL} "${srcdir}${srcdir:+/unit/atf-src/}./configure" MISSING=: --prefix $atfdir;
+                ${SHELL} "${srcdir}${srcdir:+/unit/atf-src/}./configure" --enable-tools --disable-shared MISSING=: --prefix $atfdir;
                ) ],
                [atfdir=`pwd`/unit/atf])
        AC_MSG_RESULT(building ATF from bind9/unit/atf-src)
index cb192ba5a02b663a6ed025037794f9717aed399e..35edf4cfed0c5861634a3163cfa8c98591354d2e 100644 (file)
@@ -1,2 +1,21 @@
 These unit tests for BIND 9 are based on the NetBSD Automated Test Framework 
-release 0.12.
+release 0.17.
+
+To build an external copy of ATF for use by BIND 9:
+
+  $ cd atf-src
+  $ configure --prefix=<prefix> --enable-tools --disable-shared
+  $ make
+  $ make install
+
+Subsequently, specify the ATF prefix when building BIND 9:
+
+  $ configure --with-atf=<prefix>
+
+ATF can also be built automatically during the BIND 9 build,
+by specifying --with-atf without an argument:
+
+  $ configure --with-atf
+
+This causes BIND 9 to build ATF in the atf-src directory and
+link to it directly.
index 28e7b7e92396a728cedede23e68722da56a058d1..a46576630f975e2fc0d9ce8b85d24f8b52f3245c 100644 (file)
@@ -20,6 +20,11 @@ Authors and contributors                        Automated Testing Framework
   initial version of the atf-check utility and started the addition of the
   ATF_REQUIRE family of macros in the C interface.
 
+* Paul Goyette <pgoyette@NetBSD.org>
+
+  Implemented timestamping of test programs and test cases so that
+  atf-report can provide timings for their execution.
+
 
 ===========================================================================
 vim: filetype=text:textwidth=75:expandtab:shiftwidth=2:softtabstop=2
index db80352c646ae01247be582771193a164ad9952f..9306a6c089f428bb31d7b960d48d631033b8c461 100644 (file)
@@ -6,6 +6,7 @@ tp: atf-c
 tp: atf-c++
 tp: atf-sh
 tp: test-programs
-tp: atf-config
-tp: atf-report
-tp: atf-run
+
+tp-glob: atf-config*
+tp-glob: atf-report*
+tp-glob: atf-run*
index 4edd0c74f65801fd30b9bf96ef0bc6b4938f6d72..6552cc35f7d4bdcda2dd28e47d912daeccffeef4 100644 (file)
@@ -5,7 +5,7 @@ Redistribution terms                            Automated Testing Framework
 License
 *******
 
-Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 The NetBSD Foundation, Inc.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -31,6 +31,36 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.
 
 
+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.
+
+
 Relicensed code
 ***************
 
index 29dad55678782dcebe979cb520952e26d51a09c7..29eb48f6cdea8890fb35581ce3cff4e0e6b4fe5b 100644 (file)
@@ -40,16 +40,7 @@ To build and use ATF successfully you need:
 * A make(1) utility.
 
 If you are building ATF from the code on the repository, you will also need
-the following tools.  The versions listed here are the ones used to build
-the files bundled in the last formal release, but these are not strictly
-required.  Newer ones will most likely work and, maybe, some slightly older
-ones:
-
-* GNU autoconf 2.68
-
-* GNU automake 1.11.1
-
-* GNU libtool 2.2.6b
+to have GNU autoconf, automake and libtool installed.
 
 
 Regenerating the build system
@@ -186,26 +177,35 @@ script:
   and work directories for test cases.  This is just a default and can be
   overriden at run time.
 
+* GDB
+  Possible values: empty, absolute path to GNU GDB.
+  Default: empty.
+
+  Specifies the path to the GNU GDB binary that atf-run will use to gather
+  a stack trace of a crashing test program.  If empty, the configure script
+  will try to find a suitable binary for you.
+
 The following flags are specific to ATF's 'configure' script:
 
 * --enable-developer
   Possible values: yes, no
-  Default: Depends on the version number.  Stable versions define this to
-  'no' while all others have it set to 'yes'.
+  Default: 'yes' in Git HEAD builds; 'no' in formal releases.
+
+  Enables several features useful for development, such as the inclusion
+  of debugging symbols in all objects or the enforcement of compilation
+  warnings.
 
-  Enables several features useful for development, such as the inclusion of
-  debugging symbols in all objects or the enabling of warnings during
-  compilation.
+  The compiler will be executed with an exhaustive collection of warning
+  detection features regardless of the value of this flag.  However, such
+  warnings are only fatal when --enable-developer is 'yes'.
 
-* --enable-unstable-shared
+* --enable-tools
   Possible values: yes, no
   Default: no.
 
-  Forces the building of shared libraries in addition to static ones.  The
-  build of shared libraries is currently disabled because their ABIs and
-  APIs are unstable and subject to change.  This flag is provided for
-  development purposes only and will be removed once the libraries are
-  stable enough.
+  Enables the build of the deprecated atf-config, atf-report, atf-run
+  and atf-version tools.  atf-report and atf-run have been superseded by
+  Kyua, and atf-config and atf-version are unnecessary.
 
 
 Post-installation steps
diff --git a/unit/atf-src/Kyuafile b/unit/atf-src/Kyuafile
new file mode 100644 (file)
index 0000000..54084cd
--- /dev/null
@@ -0,0 +1,18 @@
+syntax("kyuafile", 1)
+
+test_suite("atf")
+
+include("atf-c/Kyuafile")
+include("atf-c++/Kyuafile")
+include("atf-sh/Kyuafile")
+include("test-programs/Kyuafile")
+
+if fs.exists("atf-config/Kyuafile") then
+   include("atf-config/Kyuafile")
+end
+if fs.exists("atf-report/Kyuafile") then
+   include("atf-report/Kyuafile")
+end
+if fs.exists("atf-run/Kyuafile") then
+   include("atf-run/Kyuafile")
+end
index 3eebe61aa8af28fc43169fd999029ecf974a03ba..d5cee966eb97a3f7e8267a713d5b858edfbe18d8 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -27,6 +27,7 @@
 # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
+atf_aclocal_DATA =
 BUILT_SOURCES =
 CLEANFILES =
 EXTRA_DIST =
@@ -38,21 +39,27 @@ libexec_PROGRAMS =
 man_MANS =
 noinst_DATA =
 noinst_LTLIBRARIES =
+INSTALLCHECK_TARGETS =
+PHONY_TARGETS =
 
 ACLOCAL_AMFLAGS = -I m4
+AM_DISTCHECK_CONFIGURE_FLAGS = --enable-tools
 
 include admin/Makefile.am.inc
 include atf-c/Makefile.am.inc
 include atf-c++/Makefile.am.inc
-include atf-config/Makefile.am.inc
-include atf-report/Makefile.am.inc
-include atf-run/Makefile.am.inc
 include atf-sh/Makefile.am.inc
-include atf-version/Makefile.am.inc
 include bootstrap/Makefile.am.inc
 include doc/Makefile.am.inc
 include test-programs/Makefile.am.inc
 
+if ENABLE_TOOLS
+include atf-report/Makefile.am.inc
+include atf-config/Makefile.am.inc
+include atf-run/Makefile.am.inc
+include atf-version/Makefile.am.inc
+endif
+
 #
 # Top-level distfile documents.
 #
@@ -69,10 +76,11 @@ TESTS_ENVIRONMENT = PATH=$(prefix)/bin:$${PATH} \
                     PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig
 
 testsdir = $(exec_prefix)/tests
-pkgtestsdir = $(testsdir)/atf
+pkgtestsdir = $(testsdir)/$(PACKAGE)
 
-installcheck-local: installcheck-atf
-.PHONY: installcheck-atf
+if ENABLE_TOOLS
+INSTALLCHECK_TARGETS += installcheck-atf
+PHONY_TARGETS += installcheck-atf
 installcheck-atf:
        logfile=$$(pwd)/installcheck.log; \
        fifofile=$$(pwd)/installcheck.fifo; \
@@ -89,8 +97,23 @@ installcheck-atf:
             "installcheck.log; exit was $${res}"; \
        test $${res} -eq 0
 CLEANFILES += installcheck.fifo installcheck.log
-
-pkgtests_DATA = Atffile
+endif
+
+PHONY_TARGETS += installcheck-kyua
+if HAVE_KYUA
+if !ENABLE_TOOLS
+INSTALLCHECK_TARGETS += installcheck-kyua
+endif
+installcheck-kyua:
+       cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) $(KYUA) test
+endif
+
+installcheck-local: $(INSTALLCHECK_TARGETS)
+
+pkgtests_DATA = Kyuafile
+if ENABLE_TOOLS
+pkgtests_DATA += Atffile
+endif
 EXTRA_DIST += $(pkgtests_DATA)
 
 BUILD_SH_TP = \
@@ -103,19 +126,29 @@ BUILD_SH_TP = \
 # Custom targets.
 #
 
-.PHONY:        depend
-depend:
-
-.PHONY: clean-all
+dist-hook: forbid-dist
+if ENABLE_TOOLS
+forbid-dist:
+       @true
+else
+forbid-dist:
+       @echo "Sorry; cannot make dist without the tools enabled."
+       @echo "Please reconfigure with --enable-tools."
+       @false
+endif
+
+PHONY_TARGETS += clean-all
 clean-all:
-       MTN="$(MTN)" $(SH) $(srcdir)/admin/clean-all.sh
+       GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh
 
-.PHONY: release
+PHONY_TARGETS += release
 release:
        $(SH) $(srcdir)/admin/release.sh $(PACKAGE_VERSION) $(DIST_ARCHIVES)
 
-.PHONY: release-test
+PHONY_TARGETS += release-test
 release-test:
        $(SH) $(srcdir)/admin/release-test.sh $(DIST_ARCHIVES)
 
+.PHONY: $(PHONY_TARGETS)
+
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
index f9a937d86ddb46afa8105606fe3dd39f098bc03d..6463b4f1c0c1b928b5a26c6a8467bd7448c0672c 100644 (file)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -17,7 +17,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -46,7 +46,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -75,7 +75,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -443,9 +461,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-bin_PROGRAMS = atf-config/atf-config$(EXEEXT) \
-       atf-report/atf-report$(EXEEXT) atf-run/atf-run$(EXEEXT) \
-       atf-sh/atf-sh$(EXEEXT) atf-version/atf-version$(EXEEXT)
+bin_PROGRAMS = atf-sh/atf-sh$(EXEEXT) $(am__EXEEXT_1)
 libexec_PROGRAMS = atf-sh/atf-check$(EXEEXT)
 DIST_COMMON = README $(am__configure_deps) $(atf_c_HEADERS) \
        $(atf_c___HEADERS) $(dist_man_MANS) $(include_HEADERS) \
@@ -463,10 +479,13 @@ DIST_COMMON = README $(am__configure_deps) $(atf_c_HEADERS) \
        $(srcdir)/bootstrap/Makefile.am.inc \
        $(srcdir)/doc/Makefile.am.inc \
        $(srcdir)/test-programs/Makefile.am.inc \
-       $(top_srcdir)/atf-c/defs.h.in $(top_srcdir)/configure AUTHORS \
-       COPYING INSTALL NEWS admin/compile admin/config.guess \
-       admin/config.sub admin/depcomp admin/install-sh \
-       admin/ltmain.sh admin/missing
+       $(top_srcdir)/admin/compile $(top_srcdir)/admin/config.guess \
+       $(top_srcdir)/admin/config.sub $(top_srcdir)/admin/depcomp \
+       $(top_srcdir)/admin/install-sh $(top_srcdir)/admin/ltmain.sh \
+       $(top_srcdir)/admin/missing $(top_srcdir)/atf-c/defs.h.in \
+       $(top_srcdir)/configure AUTHORS COPYING INSTALL NEWS TODO \
+       admin/compile admin/config.guess admin/config.sub \
+       admin/depcomp admin/install-sh admin/ltmain.sh admin/missing
 tests_atf_c_PROGRAMS = atf-c/atf_c_test$(EXEEXT) \
        atf-c/build_test$(EXEEXT) atf-c/check_test$(EXEEXT) \
        atf-c/config_test$(EXEEXT) atf-c/error_test$(EXEEXT) \
@@ -474,7 +493,6 @@ tests_atf_c_PROGRAMS = atf-c/atf_c_test$(EXEEXT) \
        atf-c/tp_test$(EXEEXT) atf-c/utils_test$(EXEEXT)
 tests_atf_c_detail_PROGRAMS = atf-c/detail/dynstr_test$(EXEEXT) \
        atf-c/detail/env_test$(EXEEXT) atf-c/detail/fs_test$(EXEEXT) \
-       atf-c/detail/test_helpers_test$(EXEEXT) \
        atf-c/detail/list_test$(EXEEXT) atf-c/detail/map_test$(EXEEXT) \
        atf-c/detail/process_helpers$(EXEEXT) \
        atf-c/detail/process_test$(EXEEXT) \
@@ -487,6 +505,7 @@ tests_atf_c___PROGRAMS = atf-c++/atf_c++_test$(EXEEXT) \
        atf-c++/tests_test$(EXEEXT) atf-c++/utils_test$(EXEEXT)
 tests_atf_c___detail_PROGRAMS =  \
        atf-c++/detail/application_test$(EXEEXT) \
+       atf-c++/detail/auto_array_test$(EXEEXT) \
        atf-c++/detail/env_test$(EXEEXT) \
        atf-c++/detail/exceptions_test$(EXEEXT) \
        atf-c++/detail/expand_test$(EXEEXT) \
@@ -496,26 +515,62 @@ tests_atf_c___detail_PROGRAMS =  \
        atf-c++/detail/sanity_test$(EXEEXT) \
        atf-c++/detail/text_test$(EXEEXT) \
        atf-c++/detail/ui_test$(EXEEXT)
-tests_atf_report_PROGRAMS = atf-report/fail_helper$(EXEEXT) \
-       atf-report/misc_helpers$(EXEEXT) \
-       atf-report/pass_helper$(EXEEXT) \
-       atf-report/reader_test$(EXEEXT)
-tests_atf_run_PROGRAMS = atf-run/atffile_test$(EXEEXT) \
-       atf-run/bad_metadata_helper$(EXEEXT) \
-       atf-run/config_test$(EXEEXT) atf-run/expect_helpers$(EXEEXT) \
-       atf-run/fs_test$(EXEEXT) atf-run/io_test$(EXEEXT) \
-       atf-run/misc_helpers$(EXEEXT) atf-run/pass_helper$(EXEEXT) \
-       atf-run/several_tcs_helper$(EXEEXT) \
-       atf-run/requirements_test$(EXEEXT) \
-       atf-run/signals_test$(EXEEXT) \
-       atf-run/test_program_test$(EXEEXT) atf-run/user_test$(EXEEXT) \
-       atf-run/zero_tcs_helper$(EXEEXT)
 check_PROGRAMS = bootstrap/h_app_empty$(EXEEXT) \
        bootstrap/h_app_opts_args$(EXEEXT) \
        bootstrap/h_tp_basic_c$(EXEEXT) \
        bootstrap/h_tp_basic_cpp$(EXEEXT)
+@ENABLE_TOOLS_TRUE@am__append_1 = doc/atf.7
+@ENABLE_TOOLS_TRUE@am__append_2 = doc/atf.7
+@ENABLE_TOOLS_TRUE@am__append_3 = doc/atf.7.in
+@ENABLE_TOOLS_TRUE@am__append_4 = doc/atf-formats.5 \
+@ENABLE_TOOLS_TRUE@    atf-report/atf-report.1 \
+@ENABLE_TOOLS_TRUE@    atf-config/atf-config.1 atf-run/atf-run.1 \
+@ENABLE_TOOLS_TRUE@    atf-version/atf-version.1
 tests_test_programs_PROGRAMS = test-programs/c_helpers$(EXEEXT) \
        test-programs/cpp_helpers$(EXEEXT)
+@ENABLE_TOOLS_TRUE@am__append_5 = atf-report/atf-report \
+@ENABLE_TOOLS_TRUE@    atf-config/atf-config atf-run/atf-run \
+@ENABLE_TOOLS_TRUE@    atf-version/atf-version
+@ENABLE_TOOLS_TRUE@am__append_6 = $(css_DATA) $(dtd_DATA) $(xsl_DATA) \
+@ENABLE_TOOLS_TRUE@    $(tests_atf_report_DATA) \
+@ENABLE_TOOLS_TRUE@    atf-report/integration_test.sh \
+@ENABLE_TOOLS_TRUE@    $(tests_atf_config_DATA) \
+@ENABLE_TOOLS_TRUE@    atf-config/integration_test.sh \
+@ENABLE_TOOLS_TRUE@    $(tests_atf_run_DATA) \
+@ENABLE_TOOLS_TRUE@    atf-run/integration_test.sh $(hooks_DATA) \
+@ENABLE_TOOLS_TRUE@    $(eg_DATA) atf-version/generate-revision.sh
+@ENABLE_TOOLS_TRUE@tests_atf_report_PROGRAMS =  \
+@ENABLE_TOOLS_TRUE@    atf-report/fail_helper$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-report/misc_helpers$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-report/pass_helper$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-report/reader_test$(EXEEXT)
+@ENABLE_TOOLS_TRUE@am__append_7 = atf-report/integration_test \
+@ENABLE_TOOLS_TRUE@    atf-config/integration_test \
+@ENABLE_TOOLS_TRUE@    atf-run/integration_test \
+@ENABLE_TOOLS_TRUE@    atf-version/revision.h \
+@ENABLE_TOOLS_TRUE@    atf-version/revision.h.stamp \
+@ENABLE_TOOLS_TRUE@    installcheck.fifo installcheck.log
+@ENABLE_TOOLS_TRUE@tests_atf_run_PROGRAMS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/atffile_test$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/bad_metadata_helper$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/config_test$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/expect_helpers$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/fs_test$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/io_test$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/misc_helpers$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/pass_helper$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/several_tcs_helper$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/requirements_test$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/signals_test$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/test_program_test$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/user_test$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/zero_tcs_helper$(EXEEXT)
+@ENABLE_TOOLS_TRUE@am__append_8 = atf-version/revision.h
+@ENABLE_TOOLS_TRUE@am__append_9 = atf-version/revision.h.stamp \
+@ENABLE_TOOLS_TRUE@    installcheck-atf
+@ENABLE_TOOLS_TRUE@am__append_10 = installcheck-atf
+@ENABLE_TOOLS_FALSE@@HAVE_KYUA_TRUE@am__append_11 = installcheck-kyua
+@ENABLE_TOOLS_TRUE@am__append_12 = Atffile
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler-flags.m4 \
@@ -536,12 +591,34 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = bconfig.h
 CONFIG_CLEAN_FILES = atf-c/defs.h
+CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
        "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(tests_atf_cdir)" \
        "$(DESTDIR)$(tests_atf_c__dir)" \
@@ -557,12 +634,14 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
        "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(man1dir)" \
        "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" \
        "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" \
+       "$(DESTDIR)$(atf_aclocaldir)" \
        "$(DESTDIR)$(atf_c__dirpkgconfigdir)" \
        "$(DESTDIR)$(atf_cpkgconfigdir)" "$(DESTDIR)$(atf_shdir)" \
-       "$(DESTDIR)$(cssdir)" "$(DESTDIR)$(docdir)" \
-       "$(DESTDIR)$(dtddir)" "$(DESTDIR)$(egdir)" \
-       "$(DESTDIR)$(hooksdir)" "$(DESTDIR)$(pkgtestsdir)" \
-       "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" \
+       "$(DESTDIR)$(atf_shpkgconfigdir)" "$(DESTDIR)$(cssdir)" \
+       "$(DESTDIR)$(docdir)" "$(DESTDIR)$(dtddir)" \
+       "$(DESTDIR)$(egdir)" "$(DESTDIR)$(hooksdir)" \
+       "$(DESTDIR)$(pkgtestsdir)" "$(DESTDIR)$(tests_atf_cdir)" \
+       "$(DESTDIR)$(tests_atf_c__dir)" \
        "$(DESTDIR)$(tests_atf_c___detaildir)" \
        "$(DESTDIR)$(tests_atf_c_detaildir)" \
        "$(DESTDIR)$(tests_atf_configdir)" \
@@ -571,7 +650,6 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
        "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(xsldir)" \
        "$(DESTDIR)$(atf_cdir)" "$(DESTDIR)$(atf_c__dir)" \
        "$(DESTDIR)$(includedir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
 atf_c___detail_libtest_helpers_la_LIBADD =
 am__dirstamp = $(am__leading_dot)dirstamp
@@ -586,13 +664,16 @@ atf_c_detail_libtest_helpers_la_OBJECTS =  \
        $(am_atf_c_detail_libtest_helpers_la_OBJECTS)
 libatf_c___la_DEPENDENCIES = libatf-c.la
 am_libatf_c___la_OBJECTS = atf-c++/build.lo atf-c++/check.lo \
-       atf-c++/config.lo atf-c++/tests.lo \
+       atf-c++/config.lo atf-c++/tests.lo atf-c++/utils.lo \
        atf-c++/detail/application.lo atf-c++/detail/env.lo \
        atf-c++/detail/exceptions.lo atf-c++/detail/expand.lo \
        atf-c++/detail/fs.lo atf-c++/detail/parser.lo \
        atf-c++/detail/process.lo atf-c++/detail/text.lo \
        atf-c++/detail/ui.lo
 libatf_c___la_OBJECTS = $(am_libatf_c___la_OBJECTS)
+libatf_c___la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+       $(CXXFLAGS) $(libatf_c___la_LDFLAGS) $(LDFLAGS) -o $@
 libatf_c_la_LIBADD =
 am_libatf_c_la_OBJECTS = atf-c/libatf_c_la-build.lo \
        atf-c/libatf_c_la-check.lo atf-c/libatf_c_la-config.lo \
@@ -610,15 +691,13 @@ am_libatf_c_la_OBJECTS = atf-c/libatf_c_la-build.lo \
 nodist_libatf_c_la_OBJECTS =
 libatf_c_la_OBJECTS = $(am_libatf_c_la_OBJECTS) \
        $(nodist_libatf_c_la_OBJECTS)
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-tests_atf_cPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-tests_atf_c__PROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-tests_atf_c___detailPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-tests_atf_c_detailPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-tests_atf_reportPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-tests_atf_runPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-tests_test_programsPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+libatf_c_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(libatf_c_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_TOOLS_TRUE@am__EXEEXT_1 = atf-report/atf-report$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-config/atf-config$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf-run$(EXEEXT) \
+@ENABLE_TOOLS_TRUE@    atf-version/atf-version$(EXEEXT)
 PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(tests_atf_c_PROGRAMS) \
        $(tests_atf_c___PROGRAMS) $(tests_atf_c___detail_PROGRAMS) \
        $(tests_atf_c_detail_PROGRAMS) $(tests_atf_report_PROGRAMS) \
@@ -626,87 +705,93 @@ PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(tests_atf_c_PROGRAMS) \
 am_atf_c___atf_c___test_OBJECTS = atf-c++/atf_c++_test.$(OBJEXT)
 atf_c___atf_c___test_OBJECTS = $(am_atf_c___atf_c___test_OBJECTS)
 atf_c___atf_c___test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \
-       libatf-c++.la
+       $(ATF_CXX_LIBS)
 am_atf_c___build_test_OBJECTS = atf-c++/build_test.$(OBJEXT)
 atf_c___build_test_OBJECTS = $(am_atf_c___build_test_OBJECTS)
 atf_c___build_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \
-       libatf-c++.la
+       $(ATF_CXX_LIBS)
 am_atf_c___check_test_OBJECTS = atf-c++/check_test.$(OBJEXT)
 atf_c___check_test_OBJECTS = $(am_atf_c___check_test_OBJECTS)
 atf_c___check_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \
-       libatf-c++.la
+       $(ATF_CXX_LIBS)
 am_atf_c___config_test_OBJECTS = atf-c++/config_test.$(OBJEXT)
 atf_c___config_test_OBJECTS = $(am_atf_c___config_test_OBJECTS)
 atf_c___config_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \
-       libatf-c++.la
+       $(ATF_CXX_LIBS)
 am_atf_c___detail_application_test_OBJECTS =  \
        atf-c++/detail/application_test.$(OBJEXT)
 atf_c___detail_application_test_OBJECTS =  \
        $(am_atf_c___detail_application_test_OBJECTS)
 atf_c___detail_application_test_DEPENDENCIES =  \
-       atf-c++/detail/libtest_helpers.la libatf-c++.la
+       atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
+am_atf_c___detail_auto_array_test_OBJECTS =  \
+       atf-c++/detail/auto_array_test.$(OBJEXT)
+atf_c___detail_auto_array_test_OBJECTS =  \
+       $(am_atf_c___detail_auto_array_test_OBJECTS)
+atf_c___detail_auto_array_test_DEPENDENCIES =  \
+       atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 am_atf_c___detail_env_test_OBJECTS =  \
        atf-c++/detail/env_test.$(OBJEXT)
 atf_c___detail_env_test_OBJECTS =  \
        $(am_atf_c___detail_env_test_OBJECTS)
 atf_c___detail_env_test_DEPENDENCIES =  \
-       atf-c++/detail/libtest_helpers.la libatf-c++.la
+       atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 am_atf_c___detail_exceptions_test_OBJECTS =  \
        atf-c++/detail/exceptions_test.$(OBJEXT)
 atf_c___detail_exceptions_test_OBJECTS =  \
        $(am_atf_c___detail_exceptions_test_OBJECTS)
 atf_c___detail_exceptions_test_DEPENDENCIES =  \
-       atf-c++/detail/libtest_helpers.la libatf-c++.la
+       atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 am_atf_c___detail_expand_test_OBJECTS =  \
        atf-c++/detail/expand_test.$(OBJEXT)
 atf_c___detail_expand_test_OBJECTS =  \
        $(am_atf_c___detail_expand_test_OBJECTS)
 atf_c___detail_expand_test_DEPENDENCIES =  \
-       atf-c++/detail/libtest_helpers.la libatf-c++.la
+       atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 am_atf_c___detail_fs_test_OBJECTS = atf-c++/detail/fs_test.$(OBJEXT)
 atf_c___detail_fs_test_OBJECTS = $(am_atf_c___detail_fs_test_OBJECTS)
 atf_c___detail_fs_test_DEPENDENCIES =  \
-       atf-c++/detail/libtest_helpers.la libatf-c++.la
+       atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 am_atf_c___detail_parser_test_OBJECTS =  \
        atf-c++/detail/parser_test.$(OBJEXT)
 atf_c___detail_parser_test_OBJECTS =  \
        $(am_atf_c___detail_parser_test_OBJECTS)
 atf_c___detail_parser_test_DEPENDENCIES =  \
-       atf-c++/detail/libtest_helpers.la libatf-c++.la
+       atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 am_atf_c___detail_process_test_OBJECTS =  \
        atf-c++/detail/process_test.$(OBJEXT)
 atf_c___detail_process_test_OBJECTS =  \
        $(am_atf_c___detail_process_test_OBJECTS)
 atf_c___detail_process_test_DEPENDENCIES =  \
-       atf-c++/detail/libtest_helpers.la libatf-c++.la
+       atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 am_atf_c___detail_sanity_test_OBJECTS =  \
        atf-c++/detail/sanity_test.$(OBJEXT)
 atf_c___detail_sanity_test_OBJECTS =  \
        $(am_atf_c___detail_sanity_test_OBJECTS)
 atf_c___detail_sanity_test_DEPENDENCIES =  \
-       atf-c++/detail/libtest_helpers.la libatf-c++.la
+       atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 am_atf_c___detail_text_test_OBJECTS =  \
        atf-c++/detail/text_test.$(OBJEXT)
 atf_c___detail_text_test_OBJECTS =  \
        $(am_atf_c___detail_text_test_OBJECTS)
 atf_c___detail_text_test_DEPENDENCIES =  \
-       atf-c++/detail/libtest_helpers.la libatf-c++.la
+       atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 am_atf_c___detail_ui_test_OBJECTS = atf-c++/detail/ui_test.$(OBJEXT)
 atf_c___detail_ui_test_OBJECTS = $(am_atf_c___detail_ui_test_OBJECTS)
 atf_c___detail_ui_test_DEPENDENCIES =  \
-       atf-c++/detail/libtest_helpers.la libatf-c++.la
+       atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 am_atf_c___macros_test_OBJECTS = atf-c++/macros_test.$(OBJEXT)
 atf_c___macros_test_OBJECTS = $(am_atf_c___macros_test_OBJECTS)
 atf_c___macros_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \
-       libatf-c++.la
+       $(ATF_CXX_LIBS)
 am_atf_c___tests_test_OBJECTS = atf-c++/tests_test.$(OBJEXT)
 atf_c___tests_test_OBJECTS = $(am_atf_c___tests_test_OBJECTS)
 atf_c___tests_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \
-       libatf-c++.la
+       $(ATF_CXX_LIBS)
 am_atf_c___utils_test_OBJECTS = atf-c++/utils_test.$(OBJEXT)
 atf_c___utils_test_OBJECTS = $(am_atf_c___utils_test_OBJECTS)
 atf_c___utils_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \
-       libatf-c++.la
+       $(ATF_CXX_LIBS)
 am_atf_c_atf_c_test_OBJECTS = atf-c/atf_c_test.$(OBJEXT)
 atf_c_atf_c_test_OBJECTS = $(am_atf_c_atf_c_test_OBJECTS)
 atf_c_atf_c_test_DEPENDENCIES = atf-c/detail/libtest_helpers.la \
@@ -762,12 +847,6 @@ atf_c_detail_sanity_test_OBJECTS =  \
        $(am_atf_c_detail_sanity_test_OBJECTS)
 atf_c_detail_sanity_test_DEPENDENCIES =  \
        atf-c/detail/libtest_helpers.la libatf-c.la
-am_atf_c_detail_test_helpers_test_OBJECTS =  \
-       atf-c/detail/test_helpers_test.$(OBJEXT)
-atf_c_detail_test_helpers_test_OBJECTS =  \
-       $(am_atf_c_detail_test_helpers_test_OBJECTS)
-atf_c_detail_test_helpers_test_DEPENDENCIES =  \
-       atf-c/detail/libtest_helpers.la libatf-c.la
 am_atf_c_detail_text_test_OBJECTS = atf-c/detail/text_test.$(OBJEXT)
 atf_c_detail_text_test_OBJECTS = $(am_atf_c_detail_text_test_OBJECTS)
 atf_c_detail_text_test_DEPENDENCIES = atf-c/detail/libtest_helpers.la \
@@ -796,131 +875,206 @@ am_atf_c_utils_test_OBJECTS = atf-c/utils_test.$(OBJEXT)
 atf_c_utils_test_OBJECTS = $(am_atf_c_utils_test_OBJECTS)
 atf_c_utils_test_DEPENDENCIES = atf-c/detail/libtest_helpers.la \
        libatf-c.la
-am_atf_config_atf_config_OBJECTS = atf-config/atf-config.$(OBJEXT)
+am__atf_config_atf_config_SOURCES_DIST = atf-config/atf-config.cpp
+@ENABLE_TOOLS_TRUE@am_atf_config_atf_config_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-config/atf-config.$(OBJEXT)
 atf_config_atf_config_OBJECTS = $(am_atf_config_atf_config_OBJECTS)
-atf_config_atf_config_DEPENDENCIES = libatf-c++.la
-am_atf_report_atf_report_OBJECTS = atf-report/atf-report.$(OBJEXT) \
-       atf-report/reader.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_config_atf_config_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_report_atf_report_SOURCES_DIST = atf-report/atf-report.cpp \
+       atf-report/reader.cpp atf-report/reader.hpp
+@ENABLE_TOOLS_TRUE@am_atf_report_atf_report_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-report/atf-report.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-report/reader.$(OBJEXT)
 atf_report_atf_report_OBJECTS = $(am_atf_report_atf_report_OBJECTS)
-atf_report_atf_report_DEPENDENCIES = libatf-c++.la
-am_atf_report_fail_helper_OBJECTS = atf-report/fail_helper.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_report_atf_report_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_report_fail_helper_SOURCES_DIST = atf-report/fail_helper.cpp
+@ENABLE_TOOLS_TRUE@am_atf_report_fail_helper_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-report/fail_helper.$(OBJEXT)
 atf_report_fail_helper_OBJECTS = $(am_atf_report_fail_helper_OBJECTS)
-atf_report_fail_helper_DEPENDENCIES = libatf-c++.la
-am_atf_report_misc_helpers_OBJECTS =  \
-       atf-report/misc_helpers.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_report_fail_helper_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_report_misc_helpers_SOURCES_DIST =  \
+       atf-report/misc_helpers.cpp
+@ENABLE_TOOLS_TRUE@am_atf_report_misc_helpers_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-report/misc_helpers.$(OBJEXT)
 atf_report_misc_helpers_OBJECTS =  \
        $(am_atf_report_misc_helpers_OBJECTS)
-atf_report_misc_helpers_DEPENDENCIES = libatf-c++.la
-am_atf_report_pass_helper_OBJECTS = atf-report/pass_helper.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_report_misc_helpers_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_report_pass_helper_SOURCES_DIST = atf-report/pass_helper.cpp
+@ENABLE_TOOLS_TRUE@am_atf_report_pass_helper_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-report/pass_helper.$(OBJEXT)
 atf_report_pass_helper_OBJECTS = $(am_atf_report_pass_helper_OBJECTS)
-atf_report_pass_helper_DEPENDENCIES = libatf-c++.la
-am_atf_report_reader_test_OBJECTS =  \
-       atf-report/atf_report_reader_test-reader_test.$(OBJEXT) \
-       atf-report/atf_report_reader_test-reader.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_report_pass_helper_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_report_reader_test_SOURCES_DIST = atf-report/reader_test.cpp \
+       atf-report/reader.cpp
+@ENABLE_TOOLS_TRUE@am_atf_report_reader_test_OBJECTS = atf-report/atf_report_reader_test-reader_test.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-report/atf_report_reader_test-reader.$(OBJEXT)
 atf_report_reader_test_OBJECTS = $(am_atf_report_reader_test_OBJECTS)
-atf_report_reader_test_DEPENDENCIES =  \
-       atf-c++/detail/libtest_helpers.la libatf-c++.la
-am_atf_run_atf_run_OBJECTS = atf-run/atf-run.$(OBJEXT) \
-       atf-run/atffile.$(OBJEXT) atf-run/config.$(OBJEXT) \
-       atf-run/fs.$(OBJEXT) atf-run/io.$(OBJEXT) \
-       atf-run/requirements.$(OBJEXT) atf-run/signals.$(OBJEXT) \
-       atf-run/test-program.$(OBJEXT) atf-run/timer.$(OBJEXT) \
-       atf-run/user.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_report_reader_test_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    atf-c++/detail/libtest_helpers.la \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_run_atf_run_SOURCES_DIST = atf-run/atf-run.cpp \
+       atf-run/atffile.cpp atf-run/atffile.hpp atf-run/config.cpp \
+       atf-run/config.hpp atf-run/fs.cpp atf-run/fs.hpp \
+       atf-run/io.cpp atf-run/io.hpp atf-run/requirements.cpp \
+       atf-run/requirements.hpp atf-run/signals.cpp \
+       atf-run/signals.hpp atf-run/test-program.cpp \
+       atf-run/test-program.hpp atf-run/timer.cpp atf-run/timer.hpp \
+       atf-run/user.cpp atf-run/user.hpp
+@ENABLE_TOOLS_TRUE@am_atf_run_atf_run_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_atf_run-atf-run.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_atf_run-atffile.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_atf_run-config.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_atf_run-fs.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_atf_run-io.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_atf_run-requirements.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_atf_run-signals.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_atf_run-test-program.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_atf_run-timer.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_atf_run-user.$(OBJEXT)
 atf_run_atf_run_OBJECTS = $(am_atf_run_atf_run_OBJECTS)
-atf_run_atf_run_DEPENDENCIES = libatf-c++.la
-am_atf_run_atffile_test_OBJECTS =  \
-       atf-run/atf_run_atffile_test-atffile_test.$(OBJEXT) \
-       atf-run/atf_run_atffile_test-atffile.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_atf_run_DEPENDENCIES = $(ATF_CXX_LIBS)
+am__atf_run_atffile_test_SOURCES_DIST = atf-run/atffile_test.cpp \
+       atf-run/atffile.cpp
+@ENABLE_TOOLS_TRUE@am_atf_run_atffile_test_OBJECTS = atf-run/atf_run_atffile_test-atffile_test.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_atffile_test-atffile.$(OBJEXT)
 atf_run_atffile_test_OBJECTS = $(am_atf_run_atffile_test_OBJECTS)
-atf_run_atffile_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \
-       libatf-c++.la
-am_atf_run_bad_metadata_helper_OBJECTS =  \
-       atf-run/bad_metadata_helper.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_atffile_test_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    atf-c++/detail/libtest_helpers.la \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_run_bad_metadata_helper_SOURCES_DIST =  \
+       atf-run/bad_metadata_helper.c
+@ENABLE_TOOLS_TRUE@am_atf_run_bad_metadata_helper_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/bad_metadata_helper.$(OBJEXT)
 atf_run_bad_metadata_helper_OBJECTS =  \
        $(am_atf_run_bad_metadata_helper_OBJECTS)
-atf_run_bad_metadata_helper_DEPENDENCIES = libatf-c.la
-am_atf_run_config_test_OBJECTS =  \
-       atf-run/atf_run_config_test-config_test.$(OBJEXT) \
-       atf-run/atf_run_config_test-config.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_bad_metadata_helper_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    libatf-c.la
+am__atf_run_config_test_SOURCES_DIST = atf-run/config_test.cpp \
+       atf-run/config.cpp
+@ENABLE_TOOLS_TRUE@am_atf_run_config_test_OBJECTS = atf-run/atf_run_config_test-config_test.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_config_test-config.$(OBJEXT)
 atf_run_config_test_OBJECTS = $(am_atf_run_config_test_OBJECTS)
-atf_run_config_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \
-       libatf-c++.la
-am_atf_run_expect_helpers_OBJECTS = atf-run/expect_helpers.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_config_test_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    atf-c++/detail/libtest_helpers.la \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_run_expect_helpers_SOURCES_DIST = atf-run/expect_helpers.c
+@ENABLE_TOOLS_TRUE@am_atf_run_expect_helpers_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/expect_helpers.$(OBJEXT)
 atf_run_expect_helpers_OBJECTS = $(am_atf_run_expect_helpers_OBJECTS)
-atf_run_expect_helpers_DEPENDENCIES = libatf-c.la
-am_atf_run_fs_test_OBJECTS = atf-run/fs_test.$(OBJEXT) \
-       atf-run/fs.$(OBJEXT) atf-run/user.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_expect_helpers_DEPENDENCIES = libatf-c.la
+am__atf_run_fs_test_SOURCES_DIST = atf-run/fs_test.cpp atf-run/fs.cpp \
+       atf-run/user.cpp
+@ENABLE_TOOLS_TRUE@am_atf_run_fs_test_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/fs_test.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/fs.$(OBJEXT) atf-run/user.$(OBJEXT)
 atf_run_fs_test_OBJECTS = $(am_atf_run_fs_test_OBJECTS)
-atf_run_fs_test_DEPENDENCIES = libatf-c++.la
-am_atf_run_io_test_OBJECTS = atf-run/io_test.$(OBJEXT) \
-       atf-run/io.$(OBJEXT) atf-run/signals.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_fs_test_DEPENDENCIES = $(ATF_CXX_LIBS)
+am__atf_run_io_test_SOURCES_DIST = atf-run/io_test.cpp atf-run/io.cpp \
+       atf-run/signals.cpp
+@ENABLE_TOOLS_TRUE@am_atf_run_io_test_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/io_test.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/io.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/signals.$(OBJEXT)
 atf_run_io_test_OBJECTS = $(am_atf_run_io_test_OBJECTS)
-atf_run_io_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \
-       libatf-c++.la
-am_atf_run_misc_helpers_OBJECTS = atf-run/misc_helpers.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_io_test_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    atf-c++/detail/libtest_helpers.la \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_run_misc_helpers_SOURCES_DIST = atf-run/misc_helpers.cpp
+@ENABLE_TOOLS_TRUE@am_atf_run_misc_helpers_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/misc_helpers.$(OBJEXT)
 atf_run_misc_helpers_OBJECTS = $(am_atf_run_misc_helpers_OBJECTS)
-atf_run_misc_helpers_DEPENDENCIES = libatf-c++.la
-am_atf_run_pass_helper_OBJECTS = atf-run/pass_helper.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_misc_helpers_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_run_pass_helper_SOURCES_DIST = atf-run/pass_helper.cpp
+@ENABLE_TOOLS_TRUE@am_atf_run_pass_helper_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/pass_helper.$(OBJEXT)
 atf_run_pass_helper_OBJECTS = $(am_atf_run_pass_helper_OBJECTS)
-atf_run_pass_helper_DEPENDENCIES = libatf-c++.la
-am_atf_run_requirements_test_OBJECTS =  \
-       atf-run/requirements_test.$(OBJEXT) \
-       atf-run/requirements.$(OBJEXT) atf-run/user.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_pass_helper_DEPENDENCIES = $(ATF_CXX_LIBS)
+am__atf_run_requirements_test_SOURCES_DIST =  \
+       atf-run/requirements_test.cpp atf-run/requirements.cpp \
+       atf-run/user.cpp
+@ENABLE_TOOLS_TRUE@am_atf_run_requirements_test_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/requirements_test.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/requirements.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/user.$(OBJEXT)
 atf_run_requirements_test_OBJECTS =  \
        $(am_atf_run_requirements_test_OBJECTS)
-atf_run_requirements_test_DEPENDENCIES = libatf-c++.la
-am_atf_run_several_tcs_helper_OBJECTS =  \
-       atf-run/several_tcs_helper.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_requirements_test_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_run_several_tcs_helper_SOURCES_DIST =  \
+       atf-run/several_tcs_helper.c
+@ENABLE_TOOLS_TRUE@am_atf_run_several_tcs_helper_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/several_tcs_helper.$(OBJEXT)
 atf_run_several_tcs_helper_OBJECTS =  \
        $(am_atf_run_several_tcs_helper_OBJECTS)
-atf_run_several_tcs_helper_DEPENDENCIES = libatf-c.la
-am_atf_run_signals_test_OBJECTS = atf-run/signals_test.$(OBJEXT) \
-       atf-run/signals.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_several_tcs_helper_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    libatf-c.la
+am__atf_run_signals_test_SOURCES_DIST = atf-run/signals_test.cpp \
+       atf-run/signals.cpp
+@ENABLE_TOOLS_TRUE@am_atf_run_signals_test_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/signals_test.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/signals.$(OBJEXT)
 atf_run_signals_test_OBJECTS = $(am_atf_run_signals_test_OBJECTS)
-atf_run_signals_test_DEPENDENCIES = libatf-c++.la
-am_atf_run_test_program_test_OBJECTS =  \
-       atf-run/atf_run_test_program_test-test_program_test.$(OBJEXT) \
-       atf-run/atf_run_test_program_test-fs.$(OBJEXT) \
-       atf-run/atf_run_test_program_test-io.$(OBJEXT) \
-       atf-run/atf_run_test_program_test-requirements.$(OBJEXT) \
-       atf-run/atf_run_test_program_test-signals.$(OBJEXT) \
-       atf-run/atf_run_test_program_test-test-program.$(OBJEXT) \
-       atf-run/atf_run_test_program_test-timer.$(OBJEXT) \
-       atf-run/atf_run_test_program_test-user.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_signals_test_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_run_test_program_test_SOURCES_DIST =  \
+       atf-run/test_program_test.cpp atf-run/fs.cpp atf-run/io.cpp \
+       atf-run/requirements.cpp atf-run/signals.cpp \
+       atf-run/test-program.cpp atf-run/timer.cpp atf-run/user.cpp
+@ENABLE_TOOLS_TRUE@am_atf_run_test_program_test_OBJECTS = atf-run/atf_run_test_program_test-test_program_test.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_test_program_test-fs.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_test_program_test-io.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_test_program_test-requirements.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_test_program_test-signals.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_test_program_test-test-program.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_test_program_test-timer.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/atf_run_test_program_test-user.$(OBJEXT)
 atf_run_test_program_test_OBJECTS =  \
        $(am_atf_run_test_program_test_OBJECTS)
-atf_run_test_program_test_DEPENDENCIES =  \
-       atf-c++/detail/libtest_helpers.la libatf-c++.la
-am_atf_run_user_test_OBJECTS = atf-run/user_test.$(OBJEXT) \
-       atf-run/user.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_test_program_test_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    atf-c++/detail/libtest_helpers.la \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
+am__atf_run_user_test_SOURCES_DIST = atf-run/user_test.cpp \
+       atf-run/user.cpp
+@ENABLE_TOOLS_TRUE@am_atf_run_user_test_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/user_test.$(OBJEXT) \
+@ENABLE_TOOLS_TRUE@    atf-run/user.$(OBJEXT)
 atf_run_user_test_OBJECTS = $(am_atf_run_user_test_OBJECTS)
-atf_run_user_test_DEPENDENCIES = libatf-c++.la
-am_atf_run_zero_tcs_helper_OBJECTS =  \
-       atf-run/zero_tcs_helper.$(OBJEXT)
+@ENABLE_TOOLS_TRUE@atf_run_user_test_DEPENDENCIES = $(ATF_CXX_LIBS)
+am__atf_run_zero_tcs_helper_SOURCES_DIST = atf-run/zero_tcs_helper.c
+@ENABLE_TOOLS_TRUE@am_atf_run_zero_tcs_helper_OBJECTS =  \
+@ENABLE_TOOLS_TRUE@    atf-run/zero_tcs_helper.$(OBJEXT)
 atf_run_zero_tcs_helper_OBJECTS =  \
        $(am_atf_run_zero_tcs_helper_OBJECTS)
-atf_run_zero_tcs_helper_DEPENDENCIES = libatf-c.la
+@ENABLE_TOOLS_TRUE@atf_run_zero_tcs_helper_DEPENDENCIES = libatf-c.la
 am_atf_sh_atf_check_OBJECTS = atf-sh/atf-check.$(OBJEXT)
 atf_sh_atf_check_OBJECTS = $(am_atf_sh_atf_check_OBJECTS)
-atf_sh_atf_check_DEPENDENCIES = libatf-c++.la
+atf_sh_atf_check_DEPENDENCIES = $(ATF_CXX_LIBS)
 am_atf_sh_atf_sh_OBJECTS = atf-sh/atf-sh.$(OBJEXT)
 atf_sh_atf_sh_OBJECTS = $(am_atf_sh_atf_sh_OBJECTS)
-atf_sh_atf_sh_DEPENDENCIES = libatf-c++.la
-am_atf_version_atf_version_OBJECTS =  \
-       atf-version/atf_version_atf_version-atf-version.$(OBJEXT)
+atf_sh_atf_sh_DEPENDENCIES = $(ATF_CXX_LIBS)
+am__atf_version_atf_version_SOURCES_DIST =  \
+       atf-version/atf-version.cpp
+@ENABLE_TOOLS_TRUE@am_atf_version_atf_version_OBJECTS = atf-version/atf_version_atf_version-atf-version.$(OBJEXT)
 nodist_atf_version_atf_version_OBJECTS =
 atf_version_atf_version_OBJECTS =  \
        $(am_atf_version_atf_version_OBJECTS) \
        $(nodist_atf_version_atf_version_OBJECTS)
-atf_version_atf_version_DEPENDENCIES = libatf-c++.la
+@ENABLE_TOOLS_TRUE@atf_version_atf_version_DEPENDENCIES =  \
+@ENABLE_TOOLS_TRUE@    $(ATF_CXX_LIBS)
 am_bootstrap_h_app_empty_OBJECTS = bootstrap/h_app_empty.$(OBJEXT)
 bootstrap_h_app_empty_OBJECTS = $(am_bootstrap_h_app_empty_OBJECTS)
-bootstrap_h_app_empty_DEPENDENCIES = libatf-c++.la
+bootstrap_h_app_empty_DEPENDENCIES = $(ATF_CXX_LIBS)
 am_bootstrap_h_app_opts_args_OBJECTS =  \
        bootstrap/h_app_opts_args.$(OBJEXT)
 bootstrap_h_app_opts_args_OBJECTS =  \
        $(am_bootstrap_h_app_opts_args_OBJECTS)
-bootstrap_h_app_opts_args_DEPENDENCIES = libatf-c++.la
+bootstrap_h_app_opts_args_DEPENDENCIES = $(ATF_CXX_LIBS)
 am_bootstrap_h_tp_basic_c_OBJECTS = bootstrap/h_tp_basic_c.$(OBJEXT)
 bootstrap_h_tp_basic_c_OBJECTS = $(am_bootstrap_h_tp_basic_c_OBJECTS)
 bootstrap_h_tp_basic_c_DEPENDENCIES = libatf-c.la
@@ -928,7 +1082,7 @@ am_bootstrap_h_tp_basic_cpp_OBJECTS =  \
        bootstrap/h_tp_basic_cpp.$(OBJEXT)
 bootstrap_h_tp_basic_cpp_OBJECTS =  \
        $(am_bootstrap_h_tp_basic_cpp_OBJECTS)
-bootstrap_h_tp_basic_cpp_DEPENDENCIES = libatf-c++.la
+bootstrap_h_tp_basic_cpp_DEPENDENCIES = $(ATF_CXX_LIBS)
 am_test_programs_c_helpers_OBJECTS =  \
        test-programs/c_helpers.$(OBJEXT)
 test_programs_c_helpers_OBJECTS =  \
@@ -938,14 +1092,7 @@ am_test_programs_cpp_helpers_OBJECTS =  \
        test-programs/cpp_helpers.$(OBJEXT)
 test_programs_cpp_helpers_OBJECTS =  \
        $(am_test_programs_cpp_helpers_OBJECTS)
-test_programs_cpp_helpers_DEPENDENCIES = libatf-c++.la
-tests_atf_cSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-tests_atf_c__SCRIPT_INSTALL = $(INSTALL_SCRIPT)
-tests_atf_configSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-tests_atf_reportSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-tests_atf_runSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-tests_atf_shSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-tests_test_programsSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+test_programs_cpp_helpers_DEPENDENCIES = $(ATF_CXX_LIBS)
 SCRIPTS = $(tests_atf_c_SCRIPTS) $(tests_atf_c___SCRIPTS) \
        $(tests_atf_config_SCRIPTS) $(tests_atf_report_SCRIPTS) \
        $(tests_atf_run_SCRIPTS) $(tests_atf_sh_SCRIPTS) \
@@ -953,6 +1100,7 @@ SCRIPTS = $(tests_atf_c_SCRIPTS) $(tests_atf_c___SCRIPTS) \
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/admin/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
@@ -978,6 +1126,7 @@ SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \
        $(atf_c___build_test_SOURCES) $(atf_c___check_test_SOURCES) \
        $(atf_c___config_test_SOURCES) \
        $(atf_c___detail_application_test_SOURCES) \
+       $(atf_c___detail_auto_array_test_SOURCES) \
        $(atf_c___detail_env_test_SOURCES) \
        $(atf_c___detail_exceptions_test_SOURCES) \
        $(atf_c___detail_expand_test_SOURCES) \
@@ -999,7 +1148,6 @@ SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \
        $(atf_c_detail_process_helpers_SOURCES) \
        $(atf_c_detail_process_test_SOURCES) \
        $(atf_c_detail_sanity_test_SOURCES) \
-       $(atf_c_detail_test_helpers_test_SOURCES) \
        $(atf_c_detail_text_test_SOURCES) \
        $(atf_c_detail_user_test_SOURCES) $(atf_c_error_test_SOURCES) \
        $(atf_c_macros_test_SOURCES) $(atf_c_tc_test_SOURCES) \
@@ -1036,6 +1184,7 @@ DIST_SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \
        $(atf_c___atf_c___test_SOURCES) $(atf_c___build_test_SOURCES) \
        $(atf_c___check_test_SOURCES) $(atf_c___config_test_SOURCES) \
        $(atf_c___detail_application_test_SOURCES) \
+       $(atf_c___detail_auto_array_test_SOURCES) \
        $(atf_c___detail_env_test_SOURCES) \
        $(atf_c___detail_exceptions_test_SOURCES) \
        $(atf_c___detail_expand_test_SOURCES) \
@@ -1057,36 +1206,44 @@ DIST_SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \
        $(atf_c_detail_process_helpers_SOURCES) \
        $(atf_c_detail_process_test_SOURCES) \
        $(atf_c_detail_sanity_test_SOURCES) \
-       $(atf_c_detail_test_helpers_test_SOURCES) \
        $(atf_c_detail_text_test_SOURCES) \
        $(atf_c_detail_user_test_SOURCES) $(atf_c_error_test_SOURCES) \
        $(atf_c_macros_test_SOURCES) $(atf_c_tc_test_SOURCES) \
        $(atf_c_tp_test_SOURCES) $(atf_c_utils_test_SOURCES) \
-       $(atf_config_atf_config_SOURCES) \
-       $(atf_report_atf_report_SOURCES) \
-       $(atf_report_fail_helper_SOURCES) \
-       $(atf_report_misc_helpers_SOURCES) \
-       $(atf_report_pass_helper_SOURCES) \
-       $(atf_report_reader_test_SOURCES) $(atf_run_atf_run_SOURCES) \
-       $(atf_run_atffile_test_SOURCES) \
-       $(atf_run_bad_metadata_helper_SOURCES) \
-       $(atf_run_config_test_SOURCES) \
-       $(atf_run_expect_helpers_SOURCES) $(atf_run_fs_test_SOURCES) \
-       $(atf_run_io_test_SOURCES) $(atf_run_misc_helpers_SOURCES) \
-       $(atf_run_pass_helper_SOURCES) \
-       $(atf_run_requirements_test_SOURCES) \
-       $(atf_run_several_tcs_helper_SOURCES) \
-       $(atf_run_signals_test_SOURCES) \
-       $(atf_run_test_program_test_SOURCES) \
-       $(atf_run_user_test_SOURCES) \
-       $(atf_run_zero_tcs_helper_SOURCES) $(atf_sh_atf_check_SOURCES) \
-       $(atf_sh_atf_sh_SOURCES) $(atf_version_atf_version_SOURCES) \
+       $(am__atf_config_atf_config_SOURCES_DIST) \
+       $(am__atf_report_atf_report_SOURCES_DIST) \
+       $(am__atf_report_fail_helper_SOURCES_DIST) \
+       $(am__atf_report_misc_helpers_SOURCES_DIST) \
+       $(am__atf_report_pass_helper_SOURCES_DIST) \
+       $(am__atf_report_reader_test_SOURCES_DIST) \
+       $(am__atf_run_atf_run_SOURCES_DIST) \
+       $(am__atf_run_atffile_test_SOURCES_DIST) \
+       $(am__atf_run_bad_metadata_helper_SOURCES_DIST) \
+       $(am__atf_run_config_test_SOURCES_DIST) \
+       $(am__atf_run_expect_helpers_SOURCES_DIST) \
+       $(am__atf_run_fs_test_SOURCES_DIST) \
+       $(am__atf_run_io_test_SOURCES_DIST) \
+       $(am__atf_run_misc_helpers_SOURCES_DIST) \
+       $(am__atf_run_pass_helper_SOURCES_DIST) \
+       $(am__atf_run_requirements_test_SOURCES_DIST) \
+       $(am__atf_run_several_tcs_helper_SOURCES_DIST) \
+       $(am__atf_run_signals_test_SOURCES_DIST) \
+       $(am__atf_run_test_program_test_SOURCES_DIST) \
+       $(am__atf_run_user_test_SOURCES_DIST) \
+       $(am__atf_run_zero_tcs_helper_SOURCES_DIST) \
+       $(atf_sh_atf_check_SOURCES) $(atf_sh_atf_sh_SOURCES) \
+       $(am__atf_version_atf_version_SOURCES_DIST) \
        $(bootstrap_h_app_empty_SOURCES) \
        $(bootstrap_h_app_opts_args_SOURCES) \
        $(bootstrap_h_tp_basic_c_SOURCES) \
        $(bootstrap_h_tp_basic_cpp_SOURCES) \
        $(test_programs_c_helpers_SOURCES) \
        $(test_programs_cpp_helpers_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 man1dir = $(mandir)/man1
 man3dir = $(mandir)/man3
 man4dir = $(mandir)/man4
@@ -1094,49 +1251,35 @@ man5dir = $(mandir)/man5
 man7dir = $(mandir)/man7
 NROFF = nroff
 MANS = $(dist_man_MANS) $(man_MANS)
-atf_c__dirpkgconfigDATA_INSTALL = $(INSTALL_DATA)
-atf_cpkgconfigDATA_INSTALL = $(INSTALL_DATA)
-atf_shDATA_INSTALL = $(INSTALL_DATA)
-cssDATA_INSTALL = $(INSTALL_DATA)
-docDATA_INSTALL = $(INSTALL_DATA)
-dtdDATA_INSTALL = $(INSTALL_DATA)
-egDATA_INSTALL = $(INSTALL_DATA)
-hooksDATA_INSTALL = $(INSTALL_DATA)
-pkgtestsDATA_INSTALL = $(INSTALL_DATA)
-tests_atf_cDATA_INSTALL = $(INSTALL_DATA)
-tests_atf_c__DATA_INSTALL = $(INSTALL_DATA)
-tests_atf_c___detailDATA_INSTALL = $(INSTALL_DATA)
-tests_atf_c_detailDATA_INSTALL = $(INSTALL_DATA)
-tests_atf_configDATA_INSTALL = $(INSTALL_DATA)
-tests_atf_reportDATA_INSTALL = $(INSTALL_DATA)
-tests_atf_runDATA_INSTALL = $(INSTALL_DATA)
-tests_atf_shDATA_INSTALL = $(INSTALL_DATA)
-tests_test_programsDATA_INSTALL = $(INSTALL_DATA)
-xslDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(atf_c__dirpkgconfig_DATA) $(atf_cpkgconfig_DATA) \
-       $(atf_sh_DATA) $(css_DATA) $(doc_DATA) $(dtd_DATA) $(eg_DATA) \
-       $(hooks_DATA) $(noinst_DATA) $(pkgtests_DATA) \
-       $(tests_atf_c_DATA) $(tests_atf_c___DATA) \
-       $(tests_atf_c___detail_DATA) $(tests_atf_c_detail_DATA) \
-       $(tests_atf_config_DATA) $(tests_atf_report_DATA) \
-       $(tests_atf_run_DATA) $(tests_atf_sh_DATA) \
-       $(tests_test_programs_DATA) $(xsl_DATA)
-atf_cHEADERS_INSTALL = $(INSTALL_HEADER)
-atf_c__HEADERS_INSTALL = $(INSTALL_HEADER)
-includeHEADERS_INSTALL = $(INSTALL_HEADER)
+DATA = $(atf_aclocal_DATA) $(atf_c__dirpkgconfig_DATA) \
+       $(atf_cpkgconfig_DATA) $(atf_sh_DATA) $(atf_shpkgconfig_DATA) \
+       $(css_DATA) $(doc_DATA) $(dtd_DATA) $(eg_DATA) $(hooks_DATA) \
+       $(noinst_DATA) $(pkgtests_DATA) $(tests_atf_c_DATA) \
+       $(tests_atf_c___DATA) $(tests_atf_c___detail_DATA) \
+       $(tests_atf_c_detail_DATA) $(tests_atf_config_DATA) \
+       $(tests_atf_report_DATA) $(tests_atf_run_DATA) \
+       $(tests_atf_sh_DATA) $(tests_test_programs_DATA) $(xsl_DATA)
 HEADERS = $(atf_c_HEADERS) $(atf_c___HEADERS) $(include_HEADERS)
 ETAGS = etags
 CTAGS = ctags
+CSCOPE = cscope
+AM_RECURSIVE_TARGETS = cscope
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
 distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -1150,7 +1293,9 @@ ATF_BUILD_CXXFLAGS = @ATF_BUILD_CXXFLAGS@
 ATF_CONFSUBDIR = @ATF_CONFSUBDIR@
 ATF_SHELL = @ATF_SHELL@
 ATF_WORKDIR = @ATF_WORKDIR@
+ATTRIBUTE_FORMAT_PRINTF = @ATTRIBUTE_FORMAT_PRINTF@
 ATTRIBUTE_NORETURN = @ATTRIBUTE_NORETURN@
+ATTRIBUTE_UNUSED = @ATTRIBUTE_UNUSED@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
@@ -1173,14 +1318,18 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_TOOLS = @ENABLE_TOOLS@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
+GDB = @GDB@
+GIT = @GIT@
 GREP = @GREP@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KYUA = @KYUA@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
@@ -1191,7 +1340,6 @@ LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
-MTN = @MTN@
 NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
@@ -1224,6 +1372,7 @@ am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
 am__tar = @am__tar@
 am__untar = @am__untar@
+atf_aclocaldir = @atf_aclocaldir@
 atf_arch = @atf_arch@
 atf_confdir = @atf_confdir@
 atf_cssdir = @atf_cssdir@
@@ -1278,58 +1427,56 @@ target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-BUILT_SOURCES = atf-version/revision.h
+atf_aclocal_DATA = atf-c/atf-common.m4 atf-c/atf-c.m4 \
+       atf-c++/atf-c++.m4 atf-sh/atf-sh.m4
+BUILT_SOURCES = $(am__append_8)
 CLEANFILES = atf-c/atf-c.pc atf-c/pkg_config_test atf-c++/atf-c++.pc \
-       atf-c++/pkg_config_test atf-config/integration_test \
-       atf-report/integration_test atf-run/integration_test \
-       atf-sh/misc_helpers atf-sh/atf_check_test \
-       atf-sh/atf-check_test atf-sh/config_test \
+       atf-c++/pkg_config_test atf-sh/atf-sh.pc atf-sh/misc_helpers \
+       atf-sh/atf_check_test atf-sh/atf-check_test atf-sh/config_test \
        atf-sh/integration_test atf-sh/normalize_test atf-sh/tc_test \
-       atf-sh/tp_test atf-version/revision.h \
-       atf-version/revision.h.stamp bootstrap/h_tp_basic_sh \
+       atf-sh/tp_test bootstrap/h_tp_basic_sh \
        bootstrap/h_tp_atf_check_sh bootstrap/h_tp_fail \
-       bootstrap/h_tp_pass doc/atf.7 test-programs/sh_helpers \
+       bootstrap/h_tp_pass $(am__append_2) test-programs/sh_helpers \
        test-programs/config_test test-programs/expect_test \
-       test-programs/fork_test test-programs/meta_data_test \
-       test-programs/result_test test-programs/srcdir_test \
-       installcheck.fifo installcheck.log
-EXTRA_DIST = admin/check-install.sh admin/check-style-common.awk \
-       admin/check-style-c.awk admin/check-style-cpp.awk \
-       admin/check-style-man.awk admin/check-style-shell.awk \
-       admin/check-style.sh atf-c/atf-c.pc.in $(tests_atf_c_DATA) \
-       atf-c/pkg_config_test.sh $(tests_atf_c_detail_DATA) \
+       test-programs/meta_data_test test-programs/result_test \
+       test-programs/srcdir_test $(am__append_7)
+EXTRA_DIST = admin/check-style-common.awk admin/check-style-c.awk \
+       admin/check-style-cpp.awk admin/check-style-man.awk \
+       admin/check-style-shell.awk admin/check-style.sh \
+       atf-c/atf-common.m4 atf-c/atf-c.m4 atf-c/atf-c.pc.in \
+       $(tests_atf_c_DATA) atf-c/pkg_config_test.sh \
+       $(tests_atf_c_detail_DATA) atf-c++/atf-c++.m4 \
        atf-c++/atf-c++.pc.in $(tests_atf_c___DATA) \
        atf-c++/pkg_config_test.sh $(tests_atf_c___detail_DATA) \
-       $(tests_atf_config_DATA) atf-config/integration_test.sh \
-       $(css_DATA) $(dtd_DATA) $(xsl_DATA) $(tests_atf_report_DATA) \
-       atf-report/integration_test.sh $(tests_atf_run_DATA) \
-       atf-run/integration_test.sh $(hooks_DATA) $(eg_DATA) \
-       $(atf_sh_DATA) $(tests_atf_sh_DATA) atf-sh/misc_helpers.sh \
+       $(atf_sh_DATA) atf-sh/atf-sh.m4 atf-sh/atf-sh.pc.in \
+       $(tests_atf_sh_DATA) atf-sh/misc_helpers.sh \
        atf-sh/atf_check_test.sh atf-sh/atf-check_test.sh \
        atf-sh/config_test.sh atf-sh/integration_test.sh \
        atf-sh/normalize_test.sh atf-sh/tc_test.sh atf-sh/tp_test.sh \
-       atf-version/generate-revision.sh bootstrap/h_tp_basic_sh.sh \
-       bootstrap/h_tp_atf_check_sh.sh bootstrap/h_tp_fail.sh \
-       bootstrap/h_tp_pass.sh bootstrap/testsuite \
-       bootstrap/package.m4 bootstrap/testsuite.at $(testsuite_incs) \
-       doc/atf.7.in $(tests_test_programs_DATA) \
-       test-programs/common.sh test-programs/sh_helpers.sh \
-       test-programs/config_test.sh test-programs/expect_test.sh \
-       test-programs/fork_test.sh test-programs/meta_data_test.sh \
+       bootstrap/h_tp_basic_sh.sh bootstrap/h_tp_atf_check_sh.sh \
+       bootstrap/h_tp_fail.sh bootstrap/h_tp_pass.sh \
+       bootstrap/testsuite bootstrap/package.m4 \
+       bootstrap/testsuite.at $(testsuite_incs) $(am__append_3) \
+       $(tests_test_programs_DATA) test-programs/common.sh \
+       test-programs/sh_helpers.sh test-programs/config_test.sh \
+       test-programs/expect_test.sh test-programs/meta_data_test.sh \
        test-programs/result_test.sh test-programs/srcdir_test.sh \
-       $(doc_DATA) INSTALL README $(pkgtests_DATA)
+       $(am__append_6) $(doc_DATA) INSTALL README $(pkgtests_DATA)
 dist_man_MANS = atf-c/atf-c-api.3 atf-c++/atf-c++-api.3 \
-       atf-config/atf-config.1 atf-report/atf-report.1 \
-       atf-run/atf-run.1 atf-sh/atf-check.1 atf-sh/atf-sh.1 \
-       atf-sh/atf-sh-api.3 atf-version/atf-version.1 \
-       doc/atf-formats.5 doc/atf-test-case.4 doc/atf-test-program.1
+       atf-sh/atf-check.1 atf-sh/atf-sh.1 atf-sh/atf-sh-api.3 \
+       doc/atf-test-case.4 doc/atf-test-program.1 $(am__append_4)
 include_HEADERS = atf-c.h atf-c++.hpp
 lib_LTLIBRARIES = libatf-c.la libatf-c++.la
-man_MANS = doc/atf.7
+man_MANS = $(am__append_1)
 noinst_DATA = INSTALL README
 noinst_LTLIBRARIES = atf-c/detail/libtest_helpers.la \
        atf-c++/detail/libtest_helpers.la
+INSTALLCHECK_TARGETS = installcheck-bootstrap $(am__append_10) \
+       $(am__append_11)
+PHONY_TARGETS = check-style installcheck-bootstrap $(am__append_9) \
+       installcheck-kyua clean-all release release-test
 ACLOCAL_AMFLAGS = -I m4
+AM_DISTCHECK_CONFIGURE_FLAGS = --enable-tools
 libatf_c_la_SOURCES = atf-c/build.c atf-c/build.h atf-c/check.c \
        atf-c/check.h atf-c/config.c atf-c/config.h atf-c/error.c \
        atf-c/error.h atf-c/error_fwd.h atf-c/macros.h atf-c/tc.c \
@@ -1360,6 +1507,7 @@ libatf_c_la_CPPFLAGS = "-DATF_ARCH=\"$(atf_arch)\"" \
                        "-DATF_WORKDIR=\"$(ATF_WORKDIR)\"" \
                        -I$(srcdir)/atf-c
 
+libatf_c_la_LDFLAGS = -version-info 0:0:0
 atf_c_HEADERS = atf-c/build.h \
                 atf-c/check.h \
                 atf-c/config.h \
@@ -1375,7 +1523,9 @@ atf_cdir = $(includedir)/atf-c
 atf_cpkgconfigdir = $(atf_pkgconfigdir)
 atf_cpkgconfig_DATA = atf-c/atf-c.pc
 tests_atf_c_DATA = atf-c/Atffile \
-                   atf-c/macros_h_test.c
+                   atf-c/Kyuafile \
+                   atf-c/macros_h_test.c \
+                   atf-c/unused_test.c
 
 tests_atf_cdir = $(pkgtestsdir)/atf-c
 atf_c_atf_c_test_SOURCES = atf-c/atf_c_test.c
@@ -1397,7 +1547,9 @@ atf_c_tp_test_SOURCES = atf-c/tp_test.c
 atf_c_tp_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
 atf_c_utils_test_SOURCES = atf-c/utils_test.c atf-c/h_build.h
 atf_c_utils_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
-tests_atf_c_detail_DATA = atf-c/detail/Atffile
+tests_atf_c_detail_DATA = atf-c/detail/Atffile \
+                          atf-c/detail/Kyuafile
+
 tests_atf_c_detaildir = $(pkgtestsdir)/atf-c/detail
 atf_c_detail_libtest_helpers_la_SOURCES = atf-c/detail/test_helpers.c \
                                           atf-c/detail/test_helpers.h
@@ -1409,10 +1561,6 @@ atf_c_detail_env_test_SOURCES = atf-c/detail/env_test.c
 atf_c_detail_env_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
 atf_c_detail_fs_test_SOURCES = atf-c/detail/fs_test.c
 atf_c_detail_fs_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
-atf_c_detail_test_helpers_test_SOURCES = atf-c/detail/test_helpers_test.c
-atf_c_detail_test_helpers_test_LDADD = atf-c/detail/libtest_helpers.la \
-                                       libatf-c.la
-
 atf_c_detail_list_test_SOURCES = atf-c/detail/list_test.c
 atf_c_detail_list_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
 atf_c_detail_map_test_SOURCES = atf-c/detail/map_test.c
@@ -1426,12 +1574,14 @@ atf_c_detail_text_test_SOURCES = atf-c/detail/text_test.c
 atf_c_detail_text_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
 atf_c_detail_user_test_SOURCES = atf-c/detail/user_test.c
 atf_c_detail_user_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
+ATF_CXX_LIBS = libatf-c++.la libatf-c.la
 libatf_c___la_LIBADD = libatf-c.la
 libatf_c___la_SOURCES = atf-c++/build.cpp atf-c++/build.hpp \
        atf-c++/check.cpp atf-c++/check.hpp atf-c++/config.cpp \
-       atf-c++/config.hpp atf-c++/macros.hpp atf-c++/tests.cpp \
-       atf-c++/tests.hpp atf-c++/utils.hpp \
-       atf-c++/detail/application.cpp atf-c++/detail/application.hpp \
+       atf-c++/config.hpp atf-c++/macros.hpp atf-c++/noncopyable.hpp \
+       atf-c++/tests.cpp atf-c++/tests.hpp atf-c++/utils.cpp \
+       atf-c++/utils.hpp atf-c++/detail/application.cpp \
+       atf-c++/detail/application.hpp atf-c++/detail/auto_array.hpp \
        atf-c++/detail/env.cpp atf-c++/detail/env.hpp \
        atf-c++/detail/exceptions.cpp atf-c++/detail/exceptions.hpp \
        atf-c++/detail/expand.cpp atf-c++/detail/expand.hpp \
@@ -1441,10 +1591,12 @@ libatf_c___la_SOURCES = atf-c++/build.cpp atf-c++/build.hpp \
        atf-c++/detail/sanity.hpp atf-c++/detail/text.cpp \
        atf-c++/detail/text.hpp atf-c++/detail/ui.cpp \
        atf-c++/detail/ui.hpp
+libatf_c___la_LDFLAGS = -version-info 0:0:0
 atf_c___HEADERS = atf-c++/build.hpp \
                   atf-c++/check.hpp \
                   atf-c++/config.hpp \
                   atf-c++/macros.hpp \
+                  atf-c++/noncopyable.hpp \
                   atf-c++/tests.hpp \
                   atf-c++/utils.hpp
 
@@ -1452,183 +1604,79 @@ atf_c__dir = $(includedir)/atf-c++
 atf_c__dirpkgconfigdir = $(atf_pkgconfigdir)
 atf_c__dirpkgconfig_DATA = atf-c++/atf-c++.pc
 tests_atf_c___DATA = atf-c++/Atffile \
-                   atf-c++/macros_hpp_test.cpp
+                     atf-c++/Kyuafile \
+                     atf-c++/macros_hpp_test.cpp \
+                     atf-c++/unused_test.cpp
 
 tests_atf_c__dir = $(pkgtestsdir)/atf-c++
 atf_c___atf_c___test_SOURCES = atf-c++/atf_c++_test.cpp
-atf_c___atf_c___test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___atf_c___test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___build_test_SOURCES = atf-c++/build_test.cpp atf-c/h_build.h
-atf_c___build_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___build_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___check_test_SOURCES = atf-c++/check_test.cpp
-atf_c___check_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___check_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___config_test_SOURCES = atf-c++/config_test.cpp
-atf_c___config_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___config_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___macros_test_SOURCES = atf-c++/macros_test.cpp
-atf_c___macros_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___macros_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 tests_atf_c___SCRIPTS = atf-c++/pkg_config_test
 atf_c___tests_test_SOURCES = atf-c++/tests_test.cpp
-atf_c___tests_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___tests_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___utils_test_SOURCES = atf-c++/utils_test.cpp
-atf_c___utils_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-tests_atf_c___detail_DATA = atf-c++/detail/Atffile
+atf_c___utils_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
+tests_atf_c___detail_DATA = atf-c++/detail/Atffile \
+                            atf-c++/detail/Kyuafile
+
 tests_atf_c___detaildir = $(pkgtestsdir)/atf-c++/detail
 atf_c___detail_libtest_helpers_la_SOURCES = atf-c++/detail/test_helpers.cpp \
                                             atf-c++/detail/test_helpers.hpp
 
 atf_c___detail_application_test_SOURCES = atf-c++/detail/application_test.cpp
-atf_c___detail_application_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_application_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
+atf_c___detail_auto_array_test_SOURCES = atf-c++/detail/auto_array_test.cpp
+atf_c___detail_auto_array_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___detail_env_test_SOURCES = atf-c++/detail/env_test.cpp
-atf_c___detail_env_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_env_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___detail_exceptions_test_SOURCES = atf-c++/detail/exceptions_test.cpp
-atf_c___detail_exceptions_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_exceptions_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___detail_expand_test_SOURCES = atf-c++/detail/expand_test.cpp
-atf_c___detail_expand_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_expand_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___detail_fs_test_SOURCES = atf-c++/detail/fs_test.cpp
-atf_c___detail_fs_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_fs_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___detail_parser_test_SOURCES = atf-c++/detail/parser_test.cpp
-atf_c___detail_parser_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_parser_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___detail_process_test_SOURCES = atf-c++/detail/process_test.cpp
-atf_c___detail_process_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_process_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___detail_sanity_test_SOURCES = atf-c++/detail/sanity_test.cpp
-atf_c___detail_sanity_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_sanity_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___detail_text_test_SOURCES = atf-c++/detail/text_test.cpp
-atf_c___detail_text_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_text_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_c___detail_ui_test_SOURCES = atf-c++/detail/ui_test.cpp
-atf_c___detail_ui_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-atf_config_atf_config_SOURCES = atf-config/atf-config.cpp
-atf_config_atf_config_LDADD = libatf-c++.la
-tests_atf_config_DATA = atf-config/Atffile
-tests_atf_configdir = $(pkgtestsdir)/atf-config
-tests_atf_config_SCRIPTS = atf-config/integration_test
-atf_report_atf_report_SOURCES = atf-report/atf-report.cpp \
-                                atf-report/reader.cpp \
-                                atf-report/reader.hpp
-
-atf_report_atf_report_LDADD = libatf-c++.la
-cssdir = $(atf_cssdir)
-css_DATA = atf-report/tests-results.css
-dtddir = $(atf_dtddir)
-dtd_DATA = atf-report/tests-results.dtd
-xsldir = $(atf_xsldir)
-xsl_DATA = atf-report/tests-results.xsl
-tests_atf_report_DATA = atf-report/Atffile
-tests_atf_reportdir = $(pkgtestsdir)/atf-report
-atf_report_fail_helper_SOURCES = atf-report/fail_helper.cpp
-atf_report_fail_helper_LDADD = libatf-c++.la
-atf_report_misc_helpers_SOURCES = atf-report/misc_helpers.cpp
-atf_report_misc_helpers_LDADD = libatf-c++.la
-atf_report_pass_helper_SOURCES = atf-report/pass_helper.cpp
-atf_report_pass_helper_LDADD = libatf-c++.la
-tests_atf_report_SCRIPTS = atf-report/integration_test
-atf_report_reader_test_SOURCES = atf-report/reader_test.cpp \
-                                 atf-report/reader.cpp
-
-atf_report_reader_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail
-atf_report_reader_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-atf_run_atf_run_SOURCES = atf-run/atf-run.cpp \
-                          atf-run/atffile.cpp \
-                          atf-run/atffile.hpp \
-                          atf-run/config.cpp \
-                          atf-run/config.hpp \
-                          atf-run/fs.cpp \
-                          atf-run/fs.hpp \
-                          atf-run/io.cpp \
-                          atf-run/io.hpp \
-                          atf-run/requirements.cpp \
-                          atf-run/requirements.hpp \
-                          atf-run/signals.cpp \
-                          atf-run/signals.hpp \
-                          atf-run/test-program.cpp \
-                          atf-run/test-program.hpp \
-                          atf-run/timer.cpp \
-                          atf-run/timer.hpp \
-                          atf-run/user.cpp \
-                          atf-run/user.hpp
-
-atf_run_atf_run_LDADD = libatf-c++.la
-tests_atf_run_DATA = atf-run/Atffile
-tests_atf_rundir = $(pkgtestsdir)/atf-run
-atf_run_atffile_test_SOURCES = atf-run/atffile_test.cpp \
-                               atf-run/atffile.cpp
-
-atf_run_atffile_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail
-atf_run_atffile_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-atf_run_bad_metadata_helper_SOURCES = atf-run/bad_metadata_helper.c
-atf_run_bad_metadata_helper_LDADD = libatf-c.la
-atf_run_config_test_SOURCES = atf-run/config_test.cpp \
-                              atf-run/config.cpp
-
-atf_run_config_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail
-atf_run_config_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-atf_run_expect_helpers_SOURCES = atf-run/expect_helpers.c
-atf_run_expect_helpers_LDADD = libatf-c.la
-atf_run_fs_test_SOURCES = atf-run/fs_test.cpp \
-                          atf-run/fs.cpp \
-                          atf-run/user.cpp
-
-atf_run_fs_test_LDADD = libatf-c++.la
-atf_run_io_test_SOURCES = atf-run/io_test.cpp \
-                          atf-run/io.cpp \
-                          atf-run/signals.cpp
-
-atf_run_io_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-atf_run_misc_helpers_SOURCES = atf-run/misc_helpers.cpp
-atf_run_misc_helpers_LDADD = libatf-c++.la
-atf_run_pass_helper_SOURCES = atf-run/pass_helper.cpp
-atf_run_pass_helper_LDADD = libatf-c++.la
-atf_run_several_tcs_helper_SOURCES = atf-run/several_tcs_helper.c
-atf_run_several_tcs_helper_LDADD = libatf-c.la
-atf_run_requirements_test_SOURCES = atf-run/requirements_test.cpp \
-                                    atf-run/requirements.cpp \
-                                    atf-run/user.cpp
-
-atf_run_requirements_test_LDADD = libatf-c++.la
-atf_run_signals_test_SOURCES = atf-run/signals_test.cpp atf-run/signals.cpp
-atf_run_signals_test_LDADD = libatf-c++.la
-atf_run_test_program_test_SOURCES = atf-run/test_program_test.cpp \
-                                    atf-run/fs.cpp \
-                                    atf-run/io.cpp \
-                                    atf-run/requirements.cpp \
-                                    atf-run/signals.cpp \
-                                    atf-run/test-program.cpp \
-                                    atf-run/timer.cpp \
-                                    atf-run/user.cpp
-
-atf_run_test_program_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail
-atf_run_test_program_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-atf_run_user_test_SOURCES = atf-run/user_test.cpp atf-run/user.cpp
-atf_run_user_test_LDADD = libatf-c++.la
-atf_run_zero_tcs_helper_SOURCES = atf-run/zero_tcs_helper.c
-atf_run_zero_tcs_helper_LDADD = libatf-c.la
-tests_atf_run_SCRIPTS = atf-run/integration_test
-hooksdir = $(pkgdatadir)
-hooks_DATA = atf-run/share/atf-run.hooks
-egdir = $(atf_egdir)
-eg_DATA = atf-run/sample/atf-run.hooks atf-run/sample/common.conf
+atf_c___detail_ui_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 atf_sh_atf_check_SOURCES = atf-sh/atf-check.cpp
-atf_sh_atf_check_LDADD = libatf-c++.la
+atf_sh_atf_check_LDADD = $(ATF_CXX_LIBS)
 atf_sh_atf_sh_SOURCES = atf-sh/atf-sh.cpp
-atf_sh_atf_sh_LDADD = libatf-c++.la
+atf_sh_atf_sh_LDADD = $(ATF_CXX_LIBS)
 atf_sh_DATA = atf-sh/libatf-sh.subr
 atf_shdir = $(pkgdatadir)
-tests_atf_sh_DATA = atf-sh/Atffile
+atf_shpkgconfigdir = $(atf_pkgconfigdir)
+atf_shpkgconfig_DATA = atf-sh/atf-sh.pc
+tests_atf_sh_DATA = atf-sh/Atffile \
+                    atf-sh/Kyuafile
+
 tests_atf_shdir = $(pkgtestsdir)/atf-sh
 tests_atf_sh_SCRIPTS = atf-sh/misc_helpers atf-sh/atf_check_test \
        atf-sh/atf-check_test atf-sh/config_test \
        atf-sh/integration_test atf-sh/normalize_test atf-sh/tc_test \
        atf-sh/tp_test
-atf_version_atf_version_SOURCES = atf-version/atf-version.cpp
-nodist_atf_version_atf_version_SOURCES = atf-version/revision.h
-atf_version_atf_version_CPPFLAGS = -Iatf-version
-atf_version_atf_version_LDADD = libatf-c++.la
 bootstrap_h_app_empty_SOURCES = bootstrap/h_app_empty.cpp
-bootstrap_h_app_empty_LDADD = libatf-c++.la
+bootstrap_h_app_empty_LDADD = $(ATF_CXX_LIBS)
 bootstrap_h_app_opts_args_SOURCES = bootstrap/h_app_opts_args.cpp
-bootstrap_h_app_opts_args_LDADD = libatf-c++.la
+bootstrap_h_app_opts_args_LDADD = $(ATF_CXX_LIBS)
 bootstrap_h_tp_basic_c_SOURCES = bootstrap/h_tp_basic_c.c
 bootstrap_h_tp_basic_c_LDADD = libatf-c.la
 bootstrap_h_tp_basic_cpp_SOURCES = bootstrap/h_tp_basic_cpp.cpp
-bootstrap_h_tp_basic_cpp_LDADD = libatf-c++.la
+bootstrap_h_tp_basic_cpp_LDADD = $(ATF_CXX_LIBS)
 check_SCRIPTS = bootstrap/h_tp_basic_sh bootstrap/h_tp_atf_check_sh \
        bootstrap/h_tp_fail bootstrap/h_tp_pass
 DISTCLEANFILES = \
@@ -1646,17 +1694,141 @@ testsuite_incs = $(srcdir)/bootstrap/t_application_help.at \
                $(srcdir)/bootstrap/t_test_program_list.at \
                $(srcdir)/bootstrap/t_test_program_run.at
 
-tests_test_programs_DATA = test-programs/Atffile
+tests_test_programs_DATA = test-programs/Atffile \
+                           test-programs/Kyuafile
+
 tests_test_programsdir = $(pkgtestsdir)/test-programs
 test_programs_c_helpers_SOURCES = test-programs/c_helpers.c
 test_programs_c_helpers_LDADD = libatf-c.la
 test_programs_cpp_helpers_SOURCES = test-programs/cpp_helpers.cpp
-test_programs_cpp_helpers_LDADD = libatf-c++.la
+test_programs_cpp_helpers_LDADD = $(ATF_CXX_LIBS)
 common_sh = $(srcdir)/test-programs/common.sh
 tests_test_programs_SCRIPTS = test-programs/sh_helpers \
        test-programs/config_test test-programs/expect_test \
-       test-programs/fork_test test-programs/meta_data_test \
-       test-programs/result_test test-programs/srcdir_test
+       test-programs/meta_data_test test-programs/result_test \
+       test-programs/srcdir_test
+@ENABLE_TOOLS_TRUE@atf_report_atf_report_SOURCES = atf-report/atf-report.cpp \
+@ENABLE_TOOLS_TRUE@                                atf-report/reader.cpp \
+@ENABLE_TOOLS_TRUE@                                atf-report/reader.hpp
+
+@ENABLE_TOOLS_TRUE@atf_report_atf_report_LDADD = $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@cssdir = $(atf_cssdir)
+@ENABLE_TOOLS_TRUE@css_DATA = atf-report/tests-results.css
+@ENABLE_TOOLS_TRUE@dtddir = $(atf_dtddir)
+@ENABLE_TOOLS_TRUE@dtd_DATA = atf-report/tests-results.dtd
+@ENABLE_TOOLS_TRUE@xsldir = $(atf_xsldir)
+@ENABLE_TOOLS_TRUE@xsl_DATA = atf-report/tests-results.xsl
+@ENABLE_TOOLS_TRUE@tests_atf_report_DATA = atf-report/Atffile \
+@ENABLE_TOOLS_TRUE@                        atf-report/Kyuafile
+
+@ENABLE_TOOLS_TRUE@tests_atf_reportdir = $(pkgtestsdir)/atf-report
+@ENABLE_TOOLS_TRUE@atf_report_fail_helper_SOURCES = atf-report/fail_helper.cpp
+@ENABLE_TOOLS_TRUE@atf_report_fail_helper_LDADD = $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_report_misc_helpers_SOURCES = atf-report/misc_helpers.cpp
+@ENABLE_TOOLS_TRUE@atf_report_misc_helpers_LDADD = $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_report_pass_helper_SOURCES = atf-report/pass_helper.cpp
+@ENABLE_TOOLS_TRUE@atf_report_pass_helper_LDADD = $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@tests_atf_report_SCRIPTS = atf-report/integration_test
+@ENABLE_TOOLS_TRUE@atf_report_reader_test_SOURCES = atf-report/reader_test.cpp \
+@ENABLE_TOOLS_TRUE@                                 atf-report/reader.cpp
+
+@ENABLE_TOOLS_TRUE@atf_report_reader_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail
+@ENABLE_TOOLS_TRUE@atf_report_reader_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_config_atf_config_SOURCES = atf-config/atf-config.cpp
+@ENABLE_TOOLS_TRUE@atf_config_atf_config_LDADD = $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@tests_atf_config_DATA = atf-config/Atffile \
+@ENABLE_TOOLS_TRUE@                        atf-config/Kyuafile
+
+@ENABLE_TOOLS_TRUE@tests_atf_configdir = $(pkgtestsdir)/atf-config
+@ENABLE_TOOLS_TRUE@tests_atf_config_SCRIPTS = atf-config/integration_test
+@ENABLE_TOOLS_TRUE@atf_run_atf_run_CPPFLAGS = "-DGDB=\"$(GDB)\""
+@ENABLE_TOOLS_TRUE@atf_run_atf_run_SOURCES = atf-run/atf-run.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/atffile.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/atffile.hpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/config.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/config.hpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/fs.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/fs.hpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/io.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/io.hpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/requirements.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/requirements.hpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/signals.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/signals.hpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/test-program.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/test-program.hpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/timer.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/timer.hpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/user.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/user.hpp
+
+@ENABLE_TOOLS_TRUE@atf_run_atf_run_LDADD = $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@tests_atf_run_DATA = atf-run/Atffile \
+@ENABLE_TOOLS_TRUE@                     atf-run/Kyuafile
+
+@ENABLE_TOOLS_TRUE@tests_atf_rundir = $(pkgtestsdir)/atf-run
+@ENABLE_TOOLS_TRUE@atf_run_atffile_test_SOURCES = atf-run/atffile_test.cpp \
+@ENABLE_TOOLS_TRUE@                               atf-run/atffile.cpp
+
+@ENABLE_TOOLS_TRUE@atf_run_atffile_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail
+@ENABLE_TOOLS_TRUE@atf_run_atffile_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_run_bad_metadata_helper_SOURCES = atf-run/bad_metadata_helper.c
+@ENABLE_TOOLS_TRUE@atf_run_bad_metadata_helper_LDADD = libatf-c.la
+@ENABLE_TOOLS_TRUE@atf_run_config_test_SOURCES = atf-run/config_test.cpp \
+@ENABLE_TOOLS_TRUE@                              atf-run/config.cpp
+
+@ENABLE_TOOLS_TRUE@atf_run_config_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail
+@ENABLE_TOOLS_TRUE@atf_run_config_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_run_expect_helpers_SOURCES = atf-run/expect_helpers.c
+@ENABLE_TOOLS_TRUE@atf_run_expect_helpers_LDADD = libatf-c.la
+@ENABLE_TOOLS_TRUE@atf_run_fs_test_SOURCES = atf-run/fs_test.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/fs.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/user.cpp
+
+@ENABLE_TOOLS_TRUE@atf_run_fs_test_LDADD = $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_run_io_test_SOURCES = atf-run/io_test.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/io.cpp \
+@ENABLE_TOOLS_TRUE@                          atf-run/signals.cpp
+
+@ENABLE_TOOLS_TRUE@atf_run_io_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_run_misc_helpers_SOURCES = atf-run/misc_helpers.cpp
+@ENABLE_TOOLS_TRUE@atf_run_misc_helpers_LDADD = $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_run_pass_helper_SOURCES = atf-run/pass_helper.cpp
+@ENABLE_TOOLS_TRUE@atf_run_pass_helper_LDADD = $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_run_several_tcs_helper_SOURCES = atf-run/several_tcs_helper.c
+@ENABLE_TOOLS_TRUE@atf_run_several_tcs_helper_LDADD = libatf-c.la
+@ENABLE_TOOLS_TRUE@atf_run_requirements_test_SOURCES = atf-run/requirements_test.cpp \
+@ENABLE_TOOLS_TRUE@                                    atf-run/requirements.cpp \
+@ENABLE_TOOLS_TRUE@                                    atf-run/user.cpp
+
+@ENABLE_TOOLS_TRUE@atf_run_requirements_test_LDADD = $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_run_signals_test_SOURCES = atf-run/signals_test.cpp atf-run/signals.cpp
+@ENABLE_TOOLS_TRUE@atf_run_signals_test_LDADD = $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_run_test_program_test_SOURCES = atf-run/test_program_test.cpp \
+@ENABLE_TOOLS_TRUE@                                    atf-run/fs.cpp \
+@ENABLE_TOOLS_TRUE@                                    atf-run/io.cpp \
+@ENABLE_TOOLS_TRUE@                                    atf-run/requirements.cpp \
+@ENABLE_TOOLS_TRUE@                                    atf-run/signals.cpp \
+@ENABLE_TOOLS_TRUE@                                    atf-run/test-program.cpp \
+@ENABLE_TOOLS_TRUE@                                    atf-run/timer.cpp \
+@ENABLE_TOOLS_TRUE@                                    atf-run/user.cpp
+
+@ENABLE_TOOLS_TRUE@atf_run_test_program_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail
+@ENABLE_TOOLS_TRUE@atf_run_test_program_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_run_user_test_SOURCES = atf-run/user_test.cpp atf-run/user.cpp
+@ENABLE_TOOLS_TRUE@atf_run_user_test_LDADD = $(ATF_CXX_LIBS)
+@ENABLE_TOOLS_TRUE@atf_run_zero_tcs_helper_SOURCES = atf-run/zero_tcs_helper.c
+@ENABLE_TOOLS_TRUE@atf_run_zero_tcs_helper_LDADD = libatf-c.la
+@ENABLE_TOOLS_TRUE@tests_atf_run_SCRIPTS = atf-run/integration_test
+@ENABLE_TOOLS_TRUE@hooksdir = $(pkgdatadir)
+@ENABLE_TOOLS_TRUE@hooks_DATA = atf-run/share/atf-run.hooks
+@ENABLE_TOOLS_TRUE@egdir = $(atf_egdir)
+@ENABLE_TOOLS_TRUE@eg_DATA = atf-run/sample/atf-run.hooks \
+@ENABLE_TOOLS_TRUE@    atf-run/sample/common.conf
+@ENABLE_TOOLS_TRUE@atf_version_atf_version_SOURCES = atf-version/atf-version.cpp
+@ENABLE_TOOLS_TRUE@nodist_atf_version_atf_version_SOURCES = atf-version/revision.h
+@ENABLE_TOOLS_TRUE@atf_version_atf_version_CPPFLAGS = -Iatf-version
+@ENABLE_TOOLS_TRUE@atf_version_atf_version_LDADD = $(ATF_CXX_LIBS)
 
 #
 # Top-level distfile documents.
@@ -1670,8 +1842,8 @@ TESTS_ENVIRONMENT = PATH=$(prefix)/bin:$${PATH} \
                     PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig
 
 testsdir = $(exec_prefix)/tests
-pkgtestsdir = $(testsdir)/atf
-pkgtests_DATA = Atffile
+pkgtestsdir = $(testsdir)/$(PACKAGE)
+pkgtests_DATA = Kyuafile $(am__append_12)
 BUILD_SH_TP = \
        echo "Creating $${dst}"; \
        echo "\#! $(bindir)/atf-sh" >$${dst}; \
@@ -1683,21 +1855,21 @@ all: $(BUILT_SOURCES) bconfig.h
 
 .SUFFIXES:
 .SUFFIXES: .c .cpp .lo .o .obj
-am--refresh:
+am--refresh: Makefile
        @:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/admin/Makefile.am.inc $(srcdir)/atf-c/Makefile.am.inc $(srcdir)/atf-c/detail/Makefile.am.inc $(srcdir)/atf-c++/Makefile.am.inc $(srcdir)/atf-c++/detail/Makefile.am.inc $(srcdir)/atf-config/Makefile.am.inc $(srcdir)/atf-report/Makefile.am.inc $(srcdir)/atf-run/Makefile.am.inc $(srcdir)/atf-sh/Makefile.am.inc $(srcdir)/atf-version/Makefile.am.inc $(srcdir)/bootstrap/Makefile.am.inc $(srcdir)/doc/Makefile.am.inc $(srcdir)/test-programs/Makefile.am.inc $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/admin/Makefile.am.inc $(srcdir)/atf-c/Makefile.am.inc $(srcdir)/atf-c/detail/Makefile.am.inc $(srcdir)/atf-c++/Makefile.am.inc $(srcdir)/atf-c++/detail/Makefile.am.inc $(srcdir)/atf-sh/Makefile.am.inc $(srcdir)/bootstrap/Makefile.am.inc $(srcdir)/doc/Makefile.am.inc $(srcdir)/test-programs/Makefile.am.inc $(srcdir)/atf-report/Makefile.am.inc $(srcdir)/atf-config/Makefile.am.inc $(srcdir)/atf-run/Makefile.am.inc $(srcdir)/atf-version/Makefile.am.inc $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
-             cd $(srcdir) && $(AUTOMAKE) --foreign  \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --foreign  Makefile
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --foreign Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -1708,26 +1880,26 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
        esac;
+$(srcdir)/admin/Makefile.am.inc $(srcdir)/atf-c/Makefile.am.inc $(srcdir)/atf-c/detail/Makefile.am.inc $(srcdir)/atf-c++/Makefile.am.inc $(srcdir)/atf-c++/detail/Makefile.am.inc $(srcdir)/atf-sh/Makefile.am.inc $(srcdir)/bootstrap/Makefile.am.inc $(srcdir)/doc/Makefile.am.inc $(srcdir)/test-programs/Makefile.am.inc $(srcdir)/atf-report/Makefile.am.inc $(srcdir)/atf-config/Makefile.am.inc $(srcdir)/atf-run/Makefile.am.inc $(srcdir)/atf-version/Makefile.am.inc:
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        $(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure:  $(am__configure_deps)
-       cd $(srcdir) && $(AUTOCONF)
+       $(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+       $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 
 bconfig.h: stamp-h1
-       @if test ! -f $@; then \
-         rm -f stamp-h1; \
-         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-       else :; fi
+       @if test ! -f $@; then rm -f stamp-h1; else :; fi
+       @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
 
 stamp-h1: $(srcdir)/bconfig.h.in $(top_builddir)/config.status
        @rm -f stamp-h1
        cd $(top_builddir) && $(SHELL) ./config.status bconfig.h
 $(srcdir)/bconfig.h.in:  $(am__configure_deps) 
-       cd $(top_srcdir) && $(AUTOHEADER)
+       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
        rm -f stamp-h1
        touch $@
 
@@ -1737,40 +1909,49 @@ atf-c/defs.h: $(top_builddir)/config.status $(top_srcdir)/atf-c/defs.h.in
        cd $(top_builddir) && $(SHELL) ./config.status $@
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+       list2=; for p in $$list; do \
          if test -f $$p; then \
-           f=$(am__strip_dir) \
-           echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-           $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+           list2="$$list2 $$p"; \
          else :; fi; \
-       done
+       done; \
+       test -z "$$list2" || { \
+         echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+       }
 
 uninstall-libLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         p=$(am__strip_dir) \
-         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+       @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
        done
 
 clean-libLTLIBRARIES:
        -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-         test "$$dir" != "$$p" || dir=.; \
-         echo "rm -f \"$${dir}/so_locations\""; \
-         rm -f "$${dir}/so_locations"; \
-       done
+       @list='$(lib_LTLIBRARIES)'; \
+       locs=`for p in $$list; do echo $$p; done | \
+             sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+             sort -u`; \
+       test -z "$$locs" || { \
+         echo rm -f $${locs}; \
+         rm -f $${locs}; \
+       }
 
 clean-noinstLTLIBRARIES:
        -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-       @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
-         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-         test "$$dir" != "$$p" || dir=.; \
-         echo "rm -f \"$${dir}/so_locations\""; \
-         rm -f "$${dir}/so_locations"; \
-       done
+       @list='$(noinst_LTLIBRARIES)'; \
+       locs=`for p in $$list; do echo $$p; done | \
+             sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+             sort -u`; \
+       test -z "$$locs" || { \
+         echo rm -f $${locs}; \
+         rm -f $${locs}; \
+       }
 atf-c++/detail/$(am__dirstamp):
        @$(MKDIR_P) atf-c++/detail
        @: > atf-c++/detail/$(am__dirstamp)
@@ -1779,7 +1960,7 @@ atf-c++/detail/$(DEPDIR)/$(am__dirstamp):
        @: > atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
 atf-c++/detail/test_helpers.lo: atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c++/detail/libtest_helpers.la: $(atf_c___detail_libtest_helpers_la_OBJECTS) $(atf_c___detail_libtest_helpers_la_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
+atf-c++/detail/libtest_helpers.la: $(atf_c___detail_libtest_helpers_la_OBJECTS) $(atf_c___detail_libtest_helpers_la_DEPENDENCIES) $(EXTRA_atf_c___detail_libtest_helpers_la_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
        $(CXXLINK)  $(atf_c___detail_libtest_helpers_la_OBJECTS) $(atf_c___detail_libtest_helpers_la_LIBADD) $(LIBS)
 atf-c/detail/$(am__dirstamp):
        @$(MKDIR_P) atf-c/detail
@@ -1790,7 +1971,7 @@ atf-c/detail/$(DEPDIR)/$(am__dirstamp):
 atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo:  \
        atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c/detail/libtest_helpers.la: $(atf_c_detail_libtest_helpers_la_OBJECTS) $(atf_c_detail_libtest_helpers_la_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
+atf-c/detail/libtest_helpers.la: $(atf_c_detail_libtest_helpers_la_OBJECTS) $(atf_c_detail_libtest_helpers_la_DEPENDENCIES) $(EXTRA_atf_c_detail_libtest_helpers_la_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
        $(LINK)  $(atf_c_detail_libtest_helpers_la_OBJECTS) $(atf_c_detail_libtest_helpers_la_LIBADD) $(LIBS)
 atf-c++/$(am__dirstamp):
        @$(MKDIR_P) atf-c++
@@ -1806,6 +1987,8 @@ atf-c++/config.lo: atf-c++/$(am__dirstamp) \
        atf-c++/$(DEPDIR)/$(am__dirstamp)
 atf-c++/tests.lo: atf-c++/$(am__dirstamp) \
        atf-c++/$(DEPDIR)/$(am__dirstamp)
+atf-c++/utils.lo: atf-c++/$(am__dirstamp) \
+       atf-c++/$(DEPDIR)/$(am__dirstamp)
 atf-c++/detail/application.lo: atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
 atf-c++/detail/env.lo: atf-c++/detail/$(am__dirstamp) \
@@ -1824,8 +2007,8 @@ atf-c++/detail/text.lo: atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
 atf-c++/detail/ui.lo: atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
-libatf-c++.la: $(libatf_c___la_OBJECTS) $(libatf_c___la_DEPENDENCIES) 
-       $(CXXLINK) -rpath $(libdir) $(libatf_c___la_OBJECTS) $(libatf_c___la_LIBADD) $(LIBS)
+libatf-c++.la: $(libatf_c___la_OBJECTS) $(libatf_c___la_DEPENDENCIES) $(EXTRA_libatf_c___la_DEPENDENCIES) 
+       $(libatf_c___la_LINK) -rpath $(libdir) $(libatf_c___la_OBJECTS) $(libatf_c___la_LIBADD) $(LIBS)
 atf-c/$(am__dirstamp):
        @$(MKDIR_P) atf-c
        @: > atf-c/$(am__dirstamp)
@@ -1866,453 +2049,617 @@ atf-c/detail/libatf_c_la-tp_main.lo: atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
 atf-c/detail/libatf_c_la-user.lo: atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-libatf-c.la: $(libatf_c_la_OBJECTS) $(libatf_c_la_DEPENDENCIES) 
-       $(LINK) -rpath $(libdir) $(libatf_c_la_OBJECTS) $(libatf_c_la_LIBADD) $(LIBS)
+libatf-c.la: $(libatf_c_la_OBJECTS) $(libatf_c_la_DEPENDENCIES) $(EXTRA_libatf_c_la_DEPENDENCIES) 
+       $(libatf_c_la_LINK) -rpath $(libdir) $(libatf_c_la_OBJECTS) $(libatf_c_la_LIBADD) $(LIBS)
 install-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-            || test -f $$p1 \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+       fi; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p || test -f $$p1; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-binPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-         rm -f "$(DESTDIR)$(bindir)/$$f"; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
 
 clean-binPROGRAMS:
-       @list='$(bin_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
+       @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
 
 clean-checkPROGRAMS:
-       @list='$(check_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
+       @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
 install-libexecPROGRAMS: $(libexec_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-            || test -f $$p1 \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
+       fi; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p || test -f $$p1; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-libexecPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
-       done
+       @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
 
 clean-libexecPROGRAMS:
-       @list='$(libexec_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
+       @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
 install-tests_atf_cPROGRAMS: $(tests_atf_c_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_cdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_cdir)"
-       @list='$(tests_atf_c_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-            || test -f $$p1 \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_atf_cPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(tests_atf_cdir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_atf_cPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(tests_atf_cdir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(tests_atf_c_PROGRAMS)'; test -n "$(tests_atf_cdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_cdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_cdir)" || exit 1; \
+       fi; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p || test -f $$p1; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tests_atf_cdir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tests_atf_cdir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-tests_atf_cPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_c_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(tests_atf_cdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_cdir)/$$f"; \
-       done
+       @list='$(tests_atf_c_PROGRAMS)'; test -n "$(tests_atf_cdir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(tests_atf_cdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(tests_atf_cdir)" && rm -f $$files
 
 clean-tests_atf_cPROGRAMS:
-       @list='$(tests_atf_c_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
+       @list='$(tests_atf_c_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
 install-tests_atf_c__PROGRAMS: $(tests_atf_c___PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_c__dir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_c__dir)"
-       @list='$(tests_atf_c___PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-            || test -f $$p1 \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_atf_c__PROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(tests_atf_c__dir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_atf_c__PROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(tests_atf_c__dir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(tests_atf_c___PROGRAMS)'; test -n "$(tests_atf_c__dir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_c__dir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_c__dir)" || exit 1; \
+       fi; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p || test -f $$p1; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tests_atf_c__dir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tests_atf_c__dir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-tests_atf_c__PROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_c___PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(tests_atf_c__dir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_c__dir)/$$f"; \
-       done
+       @list='$(tests_atf_c___PROGRAMS)'; test -n "$(tests_atf_c__dir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(tests_atf_c__dir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(tests_atf_c__dir)" && rm -f $$files
 
 clean-tests_atf_c__PROGRAMS:
-       @list='$(tests_atf_c___PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
+       @list='$(tests_atf_c___PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
 install-tests_atf_c___detailPROGRAMS: $(tests_atf_c___detail_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_c___detaildir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_c___detaildir)"
-       @list='$(tests_atf_c___detail_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-            || test -f $$p1 \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_atf_c___detailPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(tests_atf_c___detaildir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_atf_c___detailPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(tests_atf_c___detaildir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(tests_atf_c___detail_PROGRAMS)'; test -n "$(tests_atf_c___detaildir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_c___detaildir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_c___detaildir)" || exit 1; \
+       fi; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p || test -f $$p1; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tests_atf_c___detaildir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tests_atf_c___detaildir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-tests_atf_c___detailPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_c___detail_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(tests_atf_c___detaildir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_c___detaildir)/$$f"; \
-       done
+       @list='$(tests_atf_c___detail_PROGRAMS)'; test -n "$(tests_atf_c___detaildir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(tests_atf_c___detaildir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(tests_atf_c___detaildir)" && rm -f $$files
 
 clean-tests_atf_c___detailPROGRAMS:
-       @list='$(tests_atf_c___detail_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
+       @list='$(tests_atf_c___detail_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
 install-tests_atf_c_detailPROGRAMS: $(tests_atf_c_detail_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_c_detaildir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_c_detaildir)"
-       @list='$(tests_atf_c_detail_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-            || test -f $$p1 \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_atf_c_detailPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(tests_atf_c_detaildir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_atf_c_detailPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(tests_atf_c_detaildir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(tests_atf_c_detail_PROGRAMS)'; test -n "$(tests_atf_c_detaildir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_c_detaildir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_c_detaildir)" || exit 1; \
+       fi; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p || test -f $$p1; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tests_atf_c_detaildir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tests_atf_c_detaildir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-tests_atf_c_detailPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_c_detail_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(tests_atf_c_detaildir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_c_detaildir)/$$f"; \
-       done
+       @list='$(tests_atf_c_detail_PROGRAMS)'; test -n "$(tests_atf_c_detaildir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(tests_atf_c_detaildir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(tests_atf_c_detaildir)" && rm -f $$files
 
 clean-tests_atf_c_detailPROGRAMS:
-       @list='$(tests_atf_c_detail_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
+       @list='$(tests_atf_c_detail_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
 install-tests_atf_reportPROGRAMS: $(tests_atf_report_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_reportdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_reportdir)"
-       @list='$(tests_atf_report_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-            || test -f $$p1 \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_atf_reportPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(tests_atf_reportdir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_atf_reportPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(tests_atf_reportdir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(tests_atf_report_PROGRAMS)'; test -n "$(tests_atf_reportdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_reportdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_reportdir)" || exit 1; \
+       fi; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p || test -f $$p1; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tests_atf_reportdir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tests_atf_reportdir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-tests_atf_reportPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_report_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(tests_atf_reportdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_reportdir)/$$f"; \
-       done
+       @list='$(tests_atf_report_PROGRAMS)'; test -n "$(tests_atf_reportdir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(tests_atf_reportdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(tests_atf_reportdir)" && rm -f $$files
 
 clean-tests_atf_reportPROGRAMS:
-       @list='$(tests_atf_report_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
+       @list='$(tests_atf_report_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
 install-tests_atf_runPROGRAMS: $(tests_atf_run_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_rundir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_rundir)"
-       @list='$(tests_atf_run_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-            || test -f $$p1 \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_atf_runPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(tests_atf_rundir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_atf_runPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(tests_atf_rundir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(tests_atf_run_PROGRAMS)'; test -n "$(tests_atf_rundir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_rundir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_rundir)" || exit 1; \
+       fi; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p || test -f $$p1; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tests_atf_rundir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tests_atf_rundir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-tests_atf_runPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_run_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(tests_atf_rundir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_rundir)/$$f"; \
-       done
+       @list='$(tests_atf_run_PROGRAMS)'; test -n "$(tests_atf_rundir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(tests_atf_rundir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(tests_atf_rundir)" && rm -f $$files
 
 clean-tests_atf_runPROGRAMS:
-       @list='$(tests_atf_run_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
+       @list='$(tests_atf_run_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
 install-tests_test_programsPROGRAMS: $(tests_test_programs_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_test_programsdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_test_programsdir)"
-       @list='$(tests_test_programs_PROGRAMS)'; for p in $$list; do \
-         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         if test -f $$p \
-            || test -f $$p1 \
-         ; then \
-           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_test_programsPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(tests_test_programsdir)/$$f'"; \
-          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(tests_test_programsPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(tests_test_programsdir)/$$f" || exit 1; \
-         else :; fi; \
-       done
+       @list='$(tests_test_programs_PROGRAMS)'; test -n "$(tests_test_programsdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_test_programsdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_test_programsdir)" || exit 1; \
+       fi; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p || test -f $$p1; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tests_test_programsdir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tests_test_programsdir)$$dir" || exit $$?; \
+           } \
+       ; done
 
 uninstall-tests_test_programsPROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_test_programs_PROGRAMS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-         echo " rm -f '$(DESTDIR)$(tests_test_programsdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_test_programsdir)/$$f"; \
-       done
+       @list='$(tests_test_programs_PROGRAMS)'; test -n "$(tests_test_programsdir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(tests_test_programsdir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(tests_test_programsdir)" && rm -f $$files
 
 clean-tests_test_programsPROGRAMS:
-       @list='$(tests_test_programs_PROGRAMS)'; for p in $$list; do \
-         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-         echo " rm -f $$p $$f"; \
-         rm -f $$p $$f ; \
-       done
+       @list='$(tests_test_programs_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
 atf-c++/atf_c++_test.$(OBJEXT): atf-c++/$(am__dirstamp) \
        atf-c++/$(DEPDIR)/$(am__dirstamp)
-atf-c++/atf_c++_test$(EXEEXT): $(atf_c___atf_c___test_OBJECTS) $(atf_c___atf_c___test_DEPENDENCIES) atf-c++/$(am__dirstamp)
+atf-c++/atf_c++_test$(EXEEXT): $(atf_c___atf_c___test_OBJECTS) $(atf_c___atf_c___test_DEPENDENCIES) $(EXTRA_atf_c___atf_c___test_DEPENDENCIES) atf-c++/$(am__dirstamp)
        @rm -f atf-c++/atf_c++_test$(EXEEXT)
        $(CXXLINK) $(atf_c___atf_c___test_OBJECTS) $(atf_c___atf_c___test_LDADD) $(LIBS)
 atf-c++/build_test.$(OBJEXT): atf-c++/$(am__dirstamp) \
        atf-c++/$(DEPDIR)/$(am__dirstamp)
-atf-c++/build_test$(EXEEXT): $(atf_c___build_test_OBJECTS) $(atf_c___build_test_DEPENDENCIES) atf-c++/$(am__dirstamp)
+atf-c++/build_test$(EXEEXT): $(atf_c___build_test_OBJECTS) $(atf_c___build_test_DEPENDENCIES) $(EXTRA_atf_c___build_test_DEPENDENCIES) atf-c++/$(am__dirstamp)
        @rm -f atf-c++/build_test$(EXEEXT)
        $(CXXLINK) $(atf_c___build_test_OBJECTS) $(atf_c___build_test_LDADD) $(LIBS)
 atf-c++/check_test.$(OBJEXT): atf-c++/$(am__dirstamp) \
        atf-c++/$(DEPDIR)/$(am__dirstamp)
-atf-c++/check_test$(EXEEXT): $(atf_c___check_test_OBJECTS) $(atf_c___check_test_DEPENDENCIES) atf-c++/$(am__dirstamp)
+atf-c++/check_test$(EXEEXT): $(atf_c___check_test_OBJECTS) $(atf_c___check_test_DEPENDENCIES) $(EXTRA_atf_c___check_test_DEPENDENCIES) atf-c++/$(am__dirstamp)
        @rm -f atf-c++/check_test$(EXEEXT)
        $(CXXLINK) $(atf_c___check_test_OBJECTS) $(atf_c___check_test_LDADD) $(LIBS)
 atf-c++/config_test.$(OBJEXT): atf-c++/$(am__dirstamp) \
        atf-c++/$(DEPDIR)/$(am__dirstamp)
-atf-c++/config_test$(EXEEXT): $(atf_c___config_test_OBJECTS) $(atf_c___config_test_DEPENDENCIES) atf-c++/$(am__dirstamp)
+atf-c++/config_test$(EXEEXT): $(atf_c___config_test_OBJECTS) $(atf_c___config_test_DEPENDENCIES) $(EXTRA_atf_c___config_test_DEPENDENCIES) atf-c++/$(am__dirstamp)
        @rm -f atf-c++/config_test$(EXEEXT)
        $(CXXLINK) $(atf_c___config_test_OBJECTS) $(atf_c___config_test_LDADD) $(LIBS)
 atf-c++/detail/application_test.$(OBJEXT):  \
        atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c++/detail/application_test$(EXEEXT): $(atf_c___detail_application_test_OBJECTS) $(atf_c___detail_application_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
+atf-c++/detail/application_test$(EXEEXT): $(atf_c___detail_application_test_OBJECTS) $(atf_c___detail_application_test_DEPENDENCIES) $(EXTRA_atf_c___detail_application_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
        @rm -f atf-c++/detail/application_test$(EXEEXT)
        $(CXXLINK) $(atf_c___detail_application_test_OBJECTS) $(atf_c___detail_application_test_LDADD) $(LIBS)
+atf-c++/detail/auto_array_test.$(OBJEXT):  \
+       atf-c++/detail/$(am__dirstamp) \
+       atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
+atf-c++/detail/auto_array_test$(EXEEXT): $(atf_c___detail_auto_array_test_OBJECTS) $(atf_c___detail_auto_array_test_DEPENDENCIES) $(EXTRA_atf_c___detail_auto_array_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
+       @rm -f atf-c++/detail/auto_array_test$(EXEEXT)
+       $(CXXLINK) $(atf_c___detail_auto_array_test_OBJECTS) $(atf_c___detail_auto_array_test_LDADD) $(LIBS)
 atf-c++/detail/env_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c++/detail/env_test$(EXEEXT): $(atf_c___detail_env_test_OBJECTS) $(atf_c___detail_env_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
+atf-c++/detail/env_test$(EXEEXT): $(atf_c___detail_env_test_OBJECTS) $(atf_c___detail_env_test_DEPENDENCIES) $(EXTRA_atf_c___detail_env_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
        @rm -f atf-c++/detail/env_test$(EXEEXT)
        $(CXXLINK) $(atf_c___detail_env_test_OBJECTS) $(atf_c___detail_env_test_LDADD) $(LIBS)
 atf-c++/detail/exceptions_test.$(OBJEXT):  \
        atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c++/detail/exceptions_test$(EXEEXT): $(atf_c___detail_exceptions_test_OBJECTS) $(atf_c___detail_exceptions_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
+atf-c++/detail/exceptions_test$(EXEEXT): $(atf_c___detail_exceptions_test_OBJECTS) $(atf_c___detail_exceptions_test_DEPENDENCIES) $(EXTRA_atf_c___detail_exceptions_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
        @rm -f atf-c++/detail/exceptions_test$(EXEEXT)
        $(CXXLINK) $(atf_c___detail_exceptions_test_OBJECTS) $(atf_c___detail_exceptions_test_LDADD) $(LIBS)
 atf-c++/detail/expand_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c++/detail/expand_test$(EXEEXT): $(atf_c___detail_expand_test_OBJECTS) $(atf_c___detail_expand_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
+atf-c++/detail/expand_test$(EXEEXT): $(atf_c___detail_expand_test_OBJECTS) $(atf_c___detail_expand_test_DEPENDENCIES) $(EXTRA_atf_c___detail_expand_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
        @rm -f atf-c++/detail/expand_test$(EXEEXT)
        $(CXXLINK) $(atf_c___detail_expand_test_OBJECTS) $(atf_c___detail_expand_test_LDADD) $(LIBS)
 atf-c++/detail/fs_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c++/detail/fs_test$(EXEEXT): $(atf_c___detail_fs_test_OBJECTS) $(atf_c___detail_fs_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
+atf-c++/detail/fs_test$(EXEEXT): $(atf_c___detail_fs_test_OBJECTS) $(atf_c___detail_fs_test_DEPENDENCIES) $(EXTRA_atf_c___detail_fs_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
        @rm -f atf-c++/detail/fs_test$(EXEEXT)
        $(CXXLINK) $(atf_c___detail_fs_test_OBJECTS) $(atf_c___detail_fs_test_LDADD) $(LIBS)
 atf-c++/detail/parser_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c++/detail/parser_test$(EXEEXT): $(atf_c___detail_parser_test_OBJECTS) $(atf_c___detail_parser_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
+atf-c++/detail/parser_test$(EXEEXT): $(atf_c___detail_parser_test_OBJECTS) $(atf_c___detail_parser_test_DEPENDENCIES) $(EXTRA_atf_c___detail_parser_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
        @rm -f atf-c++/detail/parser_test$(EXEEXT)
        $(CXXLINK) $(atf_c___detail_parser_test_OBJECTS) $(atf_c___detail_parser_test_LDADD) $(LIBS)
 atf-c++/detail/process_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c++/detail/process_test$(EXEEXT): $(atf_c___detail_process_test_OBJECTS) $(atf_c___detail_process_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
+atf-c++/detail/process_test$(EXEEXT): $(atf_c___detail_process_test_OBJECTS) $(atf_c___detail_process_test_DEPENDENCIES) $(EXTRA_atf_c___detail_process_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
        @rm -f atf-c++/detail/process_test$(EXEEXT)
        $(CXXLINK) $(atf_c___detail_process_test_OBJECTS) $(atf_c___detail_process_test_LDADD) $(LIBS)
 atf-c++/detail/sanity_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c++/detail/sanity_test$(EXEEXT): $(atf_c___detail_sanity_test_OBJECTS) $(atf_c___detail_sanity_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
+atf-c++/detail/sanity_test$(EXEEXT): $(atf_c___detail_sanity_test_OBJECTS) $(atf_c___detail_sanity_test_DEPENDENCIES) $(EXTRA_atf_c___detail_sanity_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
        @rm -f atf-c++/detail/sanity_test$(EXEEXT)
        $(CXXLINK) $(atf_c___detail_sanity_test_OBJECTS) $(atf_c___detail_sanity_test_LDADD) $(LIBS)
 atf-c++/detail/text_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c++/detail/text_test$(EXEEXT): $(atf_c___detail_text_test_OBJECTS) $(atf_c___detail_text_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
+atf-c++/detail/text_test$(EXEEXT): $(atf_c___detail_text_test_OBJECTS) $(atf_c___detail_text_test_DEPENDENCIES) $(EXTRA_atf_c___detail_text_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
        @rm -f atf-c++/detail/text_test$(EXEEXT)
        $(CXXLINK) $(atf_c___detail_text_test_OBJECTS) $(atf_c___detail_text_test_LDADD) $(LIBS)
 atf-c++/detail/ui_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \
        atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c++/detail/ui_test$(EXEEXT): $(atf_c___detail_ui_test_OBJECTS) $(atf_c___detail_ui_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
+atf-c++/detail/ui_test$(EXEEXT): $(atf_c___detail_ui_test_OBJECTS) $(atf_c___detail_ui_test_DEPENDENCIES) $(EXTRA_atf_c___detail_ui_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp)
        @rm -f atf-c++/detail/ui_test$(EXEEXT)
        $(CXXLINK) $(atf_c___detail_ui_test_OBJECTS) $(atf_c___detail_ui_test_LDADD) $(LIBS)
 atf-c++/macros_test.$(OBJEXT): atf-c++/$(am__dirstamp) \
        atf-c++/$(DEPDIR)/$(am__dirstamp)
-atf-c++/macros_test$(EXEEXT): $(atf_c___macros_test_OBJECTS) $(atf_c___macros_test_DEPENDENCIES) atf-c++/$(am__dirstamp)
+atf-c++/macros_test$(EXEEXT): $(atf_c___macros_test_OBJECTS) $(atf_c___macros_test_DEPENDENCIES) $(EXTRA_atf_c___macros_test_DEPENDENCIES) atf-c++/$(am__dirstamp)
        @rm -f atf-c++/macros_test$(EXEEXT)
        $(CXXLINK) $(atf_c___macros_test_OBJECTS) $(atf_c___macros_test_LDADD) $(LIBS)
 atf-c++/tests_test.$(OBJEXT): atf-c++/$(am__dirstamp) \
        atf-c++/$(DEPDIR)/$(am__dirstamp)
-atf-c++/tests_test$(EXEEXT): $(atf_c___tests_test_OBJECTS) $(atf_c___tests_test_DEPENDENCIES) atf-c++/$(am__dirstamp)
+atf-c++/tests_test$(EXEEXT): $(atf_c___tests_test_OBJECTS) $(atf_c___tests_test_DEPENDENCIES) $(EXTRA_atf_c___tests_test_DEPENDENCIES) atf-c++/$(am__dirstamp)
        @rm -f atf-c++/tests_test$(EXEEXT)
        $(CXXLINK) $(atf_c___tests_test_OBJECTS) $(atf_c___tests_test_LDADD) $(LIBS)
 atf-c++/utils_test.$(OBJEXT): atf-c++/$(am__dirstamp) \
        atf-c++/$(DEPDIR)/$(am__dirstamp)
-atf-c++/utils_test$(EXEEXT): $(atf_c___utils_test_OBJECTS) $(atf_c___utils_test_DEPENDENCIES) atf-c++/$(am__dirstamp)
+atf-c++/utils_test$(EXEEXT): $(atf_c___utils_test_OBJECTS) $(atf_c___utils_test_DEPENDENCIES) $(EXTRA_atf_c___utils_test_DEPENDENCIES) atf-c++/$(am__dirstamp)
        @rm -f atf-c++/utils_test$(EXEEXT)
        $(CXXLINK) $(atf_c___utils_test_OBJECTS) $(atf_c___utils_test_LDADD) $(LIBS)
 atf-c/atf_c_test.$(OBJEXT): atf-c/$(am__dirstamp) \
        atf-c/$(DEPDIR)/$(am__dirstamp)
-atf-c/atf_c_test$(EXEEXT): $(atf_c_atf_c_test_OBJECTS) $(atf_c_atf_c_test_DEPENDENCIES) atf-c/$(am__dirstamp)
+atf-c/atf_c_test$(EXEEXT): $(atf_c_atf_c_test_OBJECTS) $(atf_c_atf_c_test_DEPENDENCIES) $(EXTRA_atf_c_atf_c_test_DEPENDENCIES) atf-c/$(am__dirstamp)
        @rm -f atf-c/atf_c_test$(EXEEXT)
        $(LINK) $(atf_c_atf_c_test_OBJECTS) $(atf_c_atf_c_test_LDADD) $(LIBS)
 atf-c/build_test.$(OBJEXT): atf-c/$(am__dirstamp) \
        atf-c/$(DEPDIR)/$(am__dirstamp)
-atf-c/build_test$(EXEEXT): $(atf_c_build_test_OBJECTS) $(atf_c_build_test_DEPENDENCIES) atf-c/$(am__dirstamp)
+atf-c/build_test$(EXEEXT): $(atf_c_build_test_OBJECTS) $(atf_c_build_test_DEPENDENCIES) $(EXTRA_atf_c_build_test_DEPENDENCIES) atf-c/$(am__dirstamp)
        @rm -f atf-c/build_test$(EXEEXT)
        $(LINK) $(atf_c_build_test_OBJECTS) $(atf_c_build_test_LDADD) $(LIBS)
 atf-c/check_test.$(OBJEXT): atf-c/$(am__dirstamp) \
        atf-c/$(DEPDIR)/$(am__dirstamp)
-atf-c/check_test$(EXEEXT): $(atf_c_check_test_OBJECTS) $(atf_c_check_test_DEPENDENCIES) atf-c/$(am__dirstamp)
+atf-c/check_test$(EXEEXT): $(atf_c_check_test_OBJECTS) $(atf_c_check_test_DEPENDENCIES) $(EXTRA_atf_c_check_test_DEPENDENCIES) atf-c/$(am__dirstamp)
        @rm -f atf-c/check_test$(EXEEXT)
        $(LINK) $(atf_c_check_test_OBJECTS) $(atf_c_check_test_LDADD) $(LIBS)
 atf-c/config_test.$(OBJEXT): atf-c/$(am__dirstamp) \
        atf-c/$(DEPDIR)/$(am__dirstamp)
-atf-c/config_test$(EXEEXT): $(atf_c_config_test_OBJECTS) $(atf_c_config_test_DEPENDENCIES) atf-c/$(am__dirstamp)
+atf-c/config_test$(EXEEXT): $(atf_c_config_test_OBJECTS) $(atf_c_config_test_DEPENDENCIES) $(EXTRA_atf_c_config_test_DEPENDENCIES) atf-c/$(am__dirstamp)
        @rm -f atf-c/config_test$(EXEEXT)
        $(LINK) $(atf_c_config_test_OBJECTS) $(atf_c_config_test_LDADD) $(LIBS)
 atf-c/detail/dynstr_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c/detail/dynstr_test$(EXEEXT): $(atf_c_detail_dynstr_test_OBJECTS) $(atf_c_detail_dynstr_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
+atf-c/detail/dynstr_test$(EXEEXT): $(atf_c_detail_dynstr_test_OBJECTS) $(atf_c_detail_dynstr_test_DEPENDENCIES) $(EXTRA_atf_c_detail_dynstr_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
        @rm -f atf-c/detail/dynstr_test$(EXEEXT)
        $(LINK) $(atf_c_detail_dynstr_test_OBJECTS) $(atf_c_detail_dynstr_test_LDADD) $(LIBS)
 atf-c/detail/env_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c/detail/env_test$(EXEEXT): $(atf_c_detail_env_test_OBJECTS) $(atf_c_detail_env_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
+atf-c/detail/env_test$(EXEEXT): $(atf_c_detail_env_test_OBJECTS) $(atf_c_detail_env_test_DEPENDENCIES) $(EXTRA_atf_c_detail_env_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
        @rm -f atf-c/detail/env_test$(EXEEXT)
        $(LINK) $(atf_c_detail_env_test_OBJECTS) $(atf_c_detail_env_test_LDADD) $(LIBS)
 atf-c/detail/fs_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c/detail/fs_test$(EXEEXT): $(atf_c_detail_fs_test_OBJECTS) $(atf_c_detail_fs_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
+atf-c/detail/fs_test$(EXEEXT): $(atf_c_detail_fs_test_OBJECTS) $(atf_c_detail_fs_test_DEPENDENCIES) $(EXTRA_atf_c_detail_fs_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
        @rm -f atf-c/detail/fs_test$(EXEEXT)
        $(LINK) $(atf_c_detail_fs_test_OBJECTS) $(atf_c_detail_fs_test_LDADD) $(LIBS)
 atf-c/detail/list_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c/detail/list_test$(EXEEXT): $(atf_c_detail_list_test_OBJECTS) $(atf_c_detail_list_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
+atf-c/detail/list_test$(EXEEXT): $(atf_c_detail_list_test_OBJECTS) $(atf_c_detail_list_test_DEPENDENCIES) $(EXTRA_atf_c_detail_list_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
        @rm -f atf-c/detail/list_test$(EXEEXT)
        $(LINK) $(atf_c_detail_list_test_OBJECTS) $(atf_c_detail_list_test_LDADD) $(LIBS)
 atf-c/detail/map_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c/detail/map_test$(EXEEXT): $(atf_c_detail_map_test_OBJECTS) $(atf_c_detail_map_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
+atf-c/detail/map_test$(EXEEXT): $(atf_c_detail_map_test_OBJECTS) $(atf_c_detail_map_test_DEPENDENCIES) $(EXTRA_atf_c_detail_map_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
        @rm -f atf-c/detail/map_test$(EXEEXT)
        $(LINK) $(atf_c_detail_map_test_OBJECTS) $(atf_c_detail_map_test_LDADD) $(LIBS)
 atf-c/detail/process_helpers.$(OBJEXT): atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c/detail/process_helpers$(EXEEXT): $(atf_c_detail_process_helpers_OBJECTS) $(atf_c_detail_process_helpers_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
+atf-c/detail/process_helpers$(EXEEXT): $(atf_c_detail_process_helpers_OBJECTS) $(atf_c_detail_process_helpers_DEPENDENCIES) $(EXTRA_atf_c_detail_process_helpers_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
        @rm -f atf-c/detail/process_helpers$(EXEEXT)
        $(LINK) $(atf_c_detail_process_helpers_OBJECTS) $(atf_c_detail_process_helpers_LDADD) $(LIBS)
 atf-c/detail/process_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c/detail/process_test$(EXEEXT): $(atf_c_detail_process_test_OBJECTS) $(atf_c_detail_process_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
+atf-c/detail/process_test$(EXEEXT): $(atf_c_detail_process_test_OBJECTS) $(atf_c_detail_process_test_DEPENDENCIES) $(EXTRA_atf_c_detail_process_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
        @rm -f atf-c/detail/process_test$(EXEEXT)
        $(LINK) $(atf_c_detail_process_test_OBJECTS) $(atf_c_detail_process_test_LDADD) $(LIBS)
 atf-c/detail/sanity_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c/detail/sanity_test$(EXEEXT): $(atf_c_detail_sanity_test_OBJECTS) $(atf_c_detail_sanity_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
+atf-c/detail/sanity_test$(EXEEXT): $(atf_c_detail_sanity_test_OBJECTS) $(atf_c_detail_sanity_test_DEPENDENCIES) $(EXTRA_atf_c_detail_sanity_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
        @rm -f atf-c/detail/sanity_test$(EXEEXT)
        $(LINK) $(atf_c_detail_sanity_test_OBJECTS) $(atf_c_detail_sanity_test_LDADD) $(LIBS)
-atf-c/detail/test_helpers_test.$(OBJEXT):  \
-       atf-c/detail/$(am__dirstamp) \
-       atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c/detail/test_helpers_test$(EXEEXT): $(atf_c_detail_test_helpers_test_OBJECTS) $(atf_c_detail_test_helpers_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
-       @rm -f atf-c/detail/test_helpers_test$(EXEEXT)
-       $(LINK) $(atf_c_detail_test_helpers_test_OBJECTS) $(atf_c_detail_test_helpers_test_LDADD) $(LIBS)
 atf-c/detail/text_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c/detail/text_test$(EXEEXT): $(atf_c_detail_text_test_OBJECTS) $(atf_c_detail_text_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
+atf-c/detail/text_test$(EXEEXT): $(atf_c_detail_text_test_OBJECTS) $(atf_c_detail_text_test_DEPENDENCIES) $(EXTRA_atf_c_detail_text_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
        @rm -f atf-c/detail/text_test$(EXEEXT)
        $(LINK) $(atf_c_detail_text_test_OBJECTS) $(atf_c_detail_text_test_LDADD) $(LIBS)
 atf-c/detail/user_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \
        atf-c/detail/$(DEPDIR)/$(am__dirstamp)
-atf-c/detail/user_test$(EXEEXT): $(atf_c_detail_user_test_OBJECTS) $(atf_c_detail_user_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
+atf-c/detail/user_test$(EXEEXT): $(atf_c_detail_user_test_OBJECTS) $(atf_c_detail_user_test_DEPENDENCIES) $(EXTRA_atf_c_detail_user_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp)
        @rm -f atf-c/detail/user_test$(EXEEXT)
        $(LINK) $(atf_c_detail_user_test_OBJECTS) $(atf_c_detail_user_test_LDADD) $(LIBS)
 atf-c/error_test.$(OBJEXT): atf-c/$(am__dirstamp) \
        atf-c/$(DEPDIR)/$(am__dirstamp)
-atf-c/error_test$(EXEEXT): $(atf_c_error_test_OBJECTS) $(atf_c_error_test_DEPENDENCIES) atf-c/$(am__dirstamp)
+atf-c/error_test$(EXEEXT): $(atf_c_error_test_OBJECTS) $(atf_c_error_test_DEPENDENCIES) $(EXTRA_atf_c_error_test_DEPENDENCIES) atf-c/$(am__dirstamp)
        @rm -f atf-c/error_test$(EXEEXT)
        $(LINK) $(atf_c_error_test_OBJECTS) $(atf_c_error_test_LDADD) $(LIBS)
 atf-c/macros_test.$(OBJEXT): atf-c/$(am__dirstamp) \
        atf-c/$(DEPDIR)/$(am__dirstamp)
-atf-c/macros_test$(EXEEXT): $(atf_c_macros_test_OBJECTS) $(atf_c_macros_test_DEPENDENCIES) atf-c/$(am__dirstamp)
+atf-c/macros_test$(EXEEXT): $(atf_c_macros_test_OBJECTS) $(atf_c_macros_test_DEPENDENCIES) $(EXTRA_atf_c_macros_test_DEPENDENCIES) atf-c/$(am__dirstamp)
        @rm -f atf-c/macros_test$(EXEEXT)
        $(LINK) $(atf_c_macros_test_OBJECTS) $(atf_c_macros_test_LDADD) $(LIBS)
 atf-c/tc_test.$(OBJEXT): atf-c/$(am__dirstamp) \
        atf-c/$(DEPDIR)/$(am__dirstamp)
-atf-c/tc_test$(EXEEXT): $(atf_c_tc_test_OBJECTS) $(atf_c_tc_test_DEPENDENCIES) atf-c/$(am__dirstamp)
+atf-c/tc_test$(EXEEXT): $(atf_c_tc_test_OBJECTS) $(atf_c_tc_test_DEPENDENCIES) $(EXTRA_atf_c_tc_test_DEPENDENCIES) atf-c/$(am__dirstamp)
        @rm -f atf-c/tc_test$(EXEEXT)
        $(LINK) $(atf_c_tc_test_OBJECTS) $(atf_c_tc_test_LDADD) $(LIBS)
 atf-c/tp_test.$(OBJEXT): atf-c/$(am__dirstamp) \
        atf-c/$(DEPDIR)/$(am__dirstamp)
-atf-c/tp_test$(EXEEXT): $(atf_c_tp_test_OBJECTS) $(atf_c_tp_test_DEPENDENCIES) atf-c/$(am__dirstamp)
+atf-c/tp_test$(EXEEXT): $(atf_c_tp_test_OBJECTS) $(atf_c_tp_test_DEPENDENCIES) $(EXTRA_atf_c_tp_test_DEPENDENCIES) atf-c/$(am__dirstamp)
        @rm -f atf-c/tp_test$(EXEEXT)
        $(LINK) $(atf_c_tp_test_OBJECTS) $(atf_c_tp_test_LDADD) $(LIBS)
 atf-c/utils_test.$(OBJEXT): atf-c/$(am__dirstamp) \
        atf-c/$(DEPDIR)/$(am__dirstamp)
-atf-c/utils_test$(EXEEXT): $(atf_c_utils_test_OBJECTS) $(atf_c_utils_test_DEPENDENCIES) atf-c/$(am__dirstamp)
+atf-c/utils_test$(EXEEXT): $(atf_c_utils_test_OBJECTS) $(atf_c_utils_test_DEPENDENCIES) $(EXTRA_atf_c_utils_test_DEPENDENCIES) atf-c/$(am__dirstamp)
        @rm -f atf-c/utils_test$(EXEEXT)
        $(LINK) $(atf_c_utils_test_OBJECTS) $(atf_c_utils_test_LDADD) $(LIBS)
 atf-config/$(am__dirstamp):
@@ -2323,7 +2670,7 @@ atf-config/$(DEPDIR)/$(am__dirstamp):
        @: > atf-config/$(DEPDIR)/$(am__dirstamp)
 atf-config/atf-config.$(OBJEXT): atf-config/$(am__dirstamp) \
        atf-config/$(DEPDIR)/$(am__dirstamp)
-atf-config/atf-config$(EXEEXT): $(atf_config_atf_config_OBJECTS) $(atf_config_atf_config_DEPENDENCIES) atf-config/$(am__dirstamp)
+atf-config/atf-config$(EXEEXT): $(atf_config_atf_config_OBJECTS) $(atf_config_atf_config_DEPENDENCIES) $(EXTRA_atf_config_atf_config_DEPENDENCIES) atf-config/$(am__dirstamp)
        @rm -f atf-config/atf-config$(EXEEXT)
        $(CXXLINK) $(atf_config_atf_config_OBJECTS) $(atf_config_atf_config_LDADD) $(LIBS)
 atf-report/$(am__dirstamp):
@@ -2336,22 +2683,22 @@ atf-report/atf-report.$(OBJEXT): atf-report/$(am__dirstamp) \
        atf-report/$(DEPDIR)/$(am__dirstamp)
 atf-report/reader.$(OBJEXT): atf-report/$(am__dirstamp) \
        atf-report/$(DEPDIR)/$(am__dirstamp)
-atf-report/atf-report$(EXEEXT): $(atf_report_atf_report_OBJECTS) $(atf_report_atf_report_DEPENDENCIES) atf-report/$(am__dirstamp)
+atf-report/atf-report$(EXEEXT): $(atf_report_atf_report_OBJECTS) $(atf_report_atf_report_DEPENDENCIES) $(EXTRA_atf_report_atf_report_DEPENDENCIES) atf-report/$(am__dirstamp)
        @rm -f atf-report/atf-report$(EXEEXT)
        $(CXXLINK) $(atf_report_atf_report_OBJECTS) $(atf_report_atf_report_LDADD) $(LIBS)
 atf-report/fail_helper.$(OBJEXT): atf-report/$(am__dirstamp) \
        atf-report/$(DEPDIR)/$(am__dirstamp)
-atf-report/fail_helper$(EXEEXT): $(atf_report_fail_helper_OBJECTS) $(atf_report_fail_helper_DEPENDENCIES) atf-report/$(am__dirstamp)
+atf-report/fail_helper$(EXEEXT): $(atf_report_fail_helper_OBJECTS) $(atf_report_fail_helper_DEPENDENCIES) $(EXTRA_atf_report_fail_helper_DEPENDENCIES) atf-report/$(am__dirstamp)
        @rm -f atf-report/fail_helper$(EXEEXT)
        $(CXXLINK) $(atf_report_fail_helper_OBJECTS) $(atf_report_fail_helper_LDADD) $(LIBS)
 atf-report/misc_helpers.$(OBJEXT): atf-report/$(am__dirstamp) \
        atf-report/$(DEPDIR)/$(am__dirstamp)
-atf-report/misc_helpers$(EXEEXT): $(atf_report_misc_helpers_OBJECTS) $(atf_report_misc_helpers_DEPENDENCIES) atf-report/$(am__dirstamp)
+atf-report/misc_helpers$(EXEEXT): $(atf_report_misc_helpers_OBJECTS) $(atf_report_misc_helpers_DEPENDENCIES) $(EXTRA_atf_report_misc_helpers_DEPENDENCIES) atf-report/$(am__dirstamp)
        @rm -f atf-report/misc_helpers$(EXEEXT)
        $(CXXLINK) $(atf_report_misc_helpers_OBJECTS) $(atf_report_misc_helpers_LDADD) $(LIBS)
 atf-report/pass_helper.$(OBJEXT): atf-report/$(am__dirstamp) \
        atf-report/$(DEPDIR)/$(am__dirstamp)
-atf-report/pass_helper$(EXEEXT): $(atf_report_pass_helper_OBJECTS) $(atf_report_pass_helper_DEPENDENCIES) atf-report/$(am__dirstamp)
+atf-report/pass_helper$(EXEEXT): $(atf_report_pass_helper_OBJECTS) $(atf_report_pass_helper_DEPENDENCIES) $(EXTRA_atf_report_pass_helper_DEPENDENCIES) atf-report/$(am__dirstamp)
        @rm -f atf-report/pass_helper$(EXEEXT)
        $(CXXLINK) $(atf_report_pass_helper_OBJECTS) $(atf_report_pass_helper_LDADD) $(LIBS)
 atf-report/atf_report_reader_test-reader_test.$(OBJEXT):  \
@@ -2360,7 +2707,7 @@ atf-report/atf_report_reader_test-reader_test.$(OBJEXT):  \
 atf-report/atf_report_reader_test-reader.$(OBJEXT):  \
        atf-report/$(am__dirstamp) \
        atf-report/$(DEPDIR)/$(am__dirstamp)
-atf-report/reader_test$(EXEEXT): $(atf_report_reader_test_OBJECTS) $(atf_report_reader_test_DEPENDENCIES) atf-report/$(am__dirstamp)
+atf-report/reader_test$(EXEEXT): $(atf_report_reader_test_OBJECTS) $(atf_report_reader_test_DEPENDENCIES) $(EXTRA_atf_report_reader_test_DEPENDENCIES) atf-report/$(am__dirstamp)
        @rm -f atf-report/reader_test$(EXEEXT)
        $(CXXLINK) $(atf_report_reader_test_OBJECTS) $(atf_report_reader_test_LDADD) $(LIBS)
 atf-run/$(am__dirstamp):
@@ -2369,86 +2716,96 @@ atf-run/$(am__dirstamp):
 atf-run/$(DEPDIR)/$(am__dirstamp):
        @$(MKDIR_P) atf-run/$(DEPDIR)
        @: > atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/atf-run.$(OBJEXT): atf-run/$(am__dirstamp) \
+atf-run/atf_run_atf_run-atf-run.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/atffile.$(OBJEXT): atf-run/$(am__dirstamp) \
+atf-run/atf_run_atf_run-atffile.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/config.$(OBJEXT): atf-run/$(am__dirstamp) \
+atf-run/atf_run_atf_run-config.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/fs.$(OBJEXT): atf-run/$(am__dirstamp) \
-       atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/io.$(OBJEXT): atf-run/$(am__dirstamp) \
+atf-run/atf_run_atf_run-fs.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/requirements.$(OBJEXT): atf-run/$(am__dirstamp) \
+atf-run/atf_run_atf_run-io.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/signals.$(OBJEXT): atf-run/$(am__dirstamp) \
+atf-run/atf_run_atf_run-requirements.$(OBJEXT):  \
+       atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp)
+atf-run/atf_run_atf_run-signals.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/test-program.$(OBJEXT): atf-run/$(am__dirstamp) \
+atf-run/atf_run_atf_run-test-program.$(OBJEXT):  \
+       atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp)
+atf-run/atf_run_atf_run-timer.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/timer.$(OBJEXT): atf-run/$(am__dirstamp) \
+atf-run/atf_run_atf_run-user.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/user.$(OBJEXT): atf-run/$(am__dirstamp) \
-       atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/atf-run$(EXEEXT): $(atf_run_atf_run_OBJECTS) $(atf_run_atf_run_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/atf-run$(EXEEXT): $(atf_run_atf_run_OBJECTS) $(atf_run_atf_run_DEPENDENCIES) $(EXTRA_atf_run_atf_run_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/atf-run$(EXEEXT)
        $(CXXLINK) $(atf_run_atf_run_OBJECTS) $(atf_run_atf_run_LDADD) $(LIBS)
 atf-run/atf_run_atffile_test-atffile_test.$(OBJEXT):  \
        atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp)
 atf-run/atf_run_atffile_test-atffile.$(OBJEXT):  \
        atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/atffile_test$(EXEEXT): $(atf_run_atffile_test_OBJECTS) $(atf_run_atffile_test_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/atffile_test$(EXEEXT): $(atf_run_atffile_test_OBJECTS) $(atf_run_atffile_test_DEPENDENCIES) $(EXTRA_atf_run_atffile_test_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/atffile_test$(EXEEXT)
        $(CXXLINK) $(atf_run_atffile_test_OBJECTS) $(atf_run_atffile_test_LDADD) $(LIBS)
 atf-run/bad_metadata_helper.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/bad_metadata_helper$(EXEEXT): $(atf_run_bad_metadata_helper_OBJECTS) $(atf_run_bad_metadata_helper_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/bad_metadata_helper$(EXEEXT): $(atf_run_bad_metadata_helper_OBJECTS) $(atf_run_bad_metadata_helper_DEPENDENCIES) $(EXTRA_atf_run_bad_metadata_helper_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/bad_metadata_helper$(EXEEXT)
        $(LINK) $(atf_run_bad_metadata_helper_OBJECTS) $(atf_run_bad_metadata_helper_LDADD) $(LIBS)
 atf-run/atf_run_config_test-config_test.$(OBJEXT):  \
        atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp)
 atf-run/atf_run_config_test-config.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/config_test$(EXEEXT): $(atf_run_config_test_OBJECTS) $(atf_run_config_test_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/config_test$(EXEEXT): $(atf_run_config_test_OBJECTS) $(atf_run_config_test_DEPENDENCIES) $(EXTRA_atf_run_config_test_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/config_test$(EXEEXT)
        $(CXXLINK) $(atf_run_config_test_OBJECTS) $(atf_run_config_test_LDADD) $(LIBS)
 atf-run/expect_helpers.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/expect_helpers$(EXEEXT): $(atf_run_expect_helpers_OBJECTS) $(atf_run_expect_helpers_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/expect_helpers$(EXEEXT): $(atf_run_expect_helpers_OBJECTS) $(atf_run_expect_helpers_DEPENDENCIES) $(EXTRA_atf_run_expect_helpers_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/expect_helpers$(EXEEXT)
        $(LINK) $(atf_run_expect_helpers_OBJECTS) $(atf_run_expect_helpers_LDADD) $(LIBS)
 atf-run/fs_test.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/fs_test$(EXEEXT): $(atf_run_fs_test_OBJECTS) $(atf_run_fs_test_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/fs.$(OBJEXT): atf-run/$(am__dirstamp) \
+       atf-run/$(DEPDIR)/$(am__dirstamp)
+atf-run/user.$(OBJEXT): atf-run/$(am__dirstamp) \
+       atf-run/$(DEPDIR)/$(am__dirstamp)
+atf-run/fs_test$(EXEEXT): $(atf_run_fs_test_OBJECTS) $(atf_run_fs_test_DEPENDENCIES) $(EXTRA_atf_run_fs_test_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/fs_test$(EXEEXT)
        $(CXXLINK) $(atf_run_fs_test_OBJECTS) $(atf_run_fs_test_LDADD) $(LIBS)
 atf-run/io_test.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/io_test$(EXEEXT): $(atf_run_io_test_OBJECTS) $(atf_run_io_test_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/io.$(OBJEXT): atf-run/$(am__dirstamp) \
+       atf-run/$(DEPDIR)/$(am__dirstamp)
+atf-run/signals.$(OBJEXT): atf-run/$(am__dirstamp) \
+       atf-run/$(DEPDIR)/$(am__dirstamp)
+atf-run/io_test$(EXEEXT): $(atf_run_io_test_OBJECTS) $(atf_run_io_test_DEPENDENCIES) $(EXTRA_atf_run_io_test_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/io_test$(EXEEXT)
        $(CXXLINK) $(atf_run_io_test_OBJECTS) $(atf_run_io_test_LDADD) $(LIBS)
 atf-run/misc_helpers.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/misc_helpers$(EXEEXT): $(atf_run_misc_helpers_OBJECTS) $(atf_run_misc_helpers_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/misc_helpers$(EXEEXT): $(atf_run_misc_helpers_OBJECTS) $(atf_run_misc_helpers_DEPENDENCIES) $(EXTRA_atf_run_misc_helpers_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/misc_helpers$(EXEEXT)
        $(CXXLINK) $(atf_run_misc_helpers_OBJECTS) $(atf_run_misc_helpers_LDADD) $(LIBS)
 atf-run/pass_helper.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/pass_helper$(EXEEXT): $(atf_run_pass_helper_OBJECTS) $(atf_run_pass_helper_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/pass_helper$(EXEEXT): $(atf_run_pass_helper_OBJECTS) $(atf_run_pass_helper_DEPENDENCIES) $(EXTRA_atf_run_pass_helper_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/pass_helper$(EXEEXT)
        $(CXXLINK) $(atf_run_pass_helper_OBJECTS) $(atf_run_pass_helper_LDADD) $(LIBS)
 atf-run/requirements_test.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/requirements_test$(EXEEXT): $(atf_run_requirements_test_OBJECTS) $(atf_run_requirements_test_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/requirements.$(OBJEXT): atf-run/$(am__dirstamp) \
+       atf-run/$(DEPDIR)/$(am__dirstamp)
+atf-run/requirements_test$(EXEEXT): $(atf_run_requirements_test_OBJECTS) $(atf_run_requirements_test_DEPENDENCIES) $(EXTRA_atf_run_requirements_test_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/requirements_test$(EXEEXT)
        $(CXXLINK) $(atf_run_requirements_test_OBJECTS) $(atf_run_requirements_test_LDADD) $(LIBS)
 atf-run/several_tcs_helper.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/several_tcs_helper$(EXEEXT): $(atf_run_several_tcs_helper_OBJECTS) $(atf_run_several_tcs_helper_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/several_tcs_helper$(EXEEXT): $(atf_run_several_tcs_helper_OBJECTS) $(atf_run_several_tcs_helper_DEPENDENCIES) $(EXTRA_atf_run_several_tcs_helper_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/several_tcs_helper$(EXEEXT)
        $(LINK) $(atf_run_several_tcs_helper_OBJECTS) $(atf_run_several_tcs_helper_LDADD) $(LIBS)
 atf-run/signals_test.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/signals_test$(EXEEXT): $(atf_run_signals_test_OBJECTS) $(atf_run_signals_test_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/signals_test$(EXEEXT): $(atf_run_signals_test_OBJECTS) $(atf_run_signals_test_DEPENDENCIES) $(EXTRA_atf_run_signals_test_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/signals_test$(EXEEXT)
        $(CXXLINK) $(atf_run_signals_test_OBJECTS) $(atf_run_signals_test_LDADD) $(LIBS)
 atf-run/atf_run_test_program_test-test_program_test.$(OBJEXT):  \
@@ -2467,17 +2824,17 @@ atf-run/atf_run_test_program_test-timer.$(OBJEXT):  \
        atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp)
 atf-run/atf_run_test_program_test-user.$(OBJEXT):  \
        atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/test_program_test$(EXEEXT): $(atf_run_test_program_test_OBJECTS) $(atf_run_test_program_test_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/test_program_test$(EXEEXT): $(atf_run_test_program_test_OBJECTS) $(atf_run_test_program_test_DEPENDENCIES) $(EXTRA_atf_run_test_program_test_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/test_program_test$(EXEEXT)
        $(CXXLINK) $(atf_run_test_program_test_OBJECTS) $(atf_run_test_program_test_LDADD) $(LIBS)
 atf-run/user_test.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/user_test$(EXEEXT): $(atf_run_user_test_OBJECTS) $(atf_run_user_test_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/user_test$(EXEEXT): $(atf_run_user_test_OBJECTS) $(atf_run_user_test_DEPENDENCIES) $(EXTRA_atf_run_user_test_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/user_test$(EXEEXT)
        $(CXXLINK) $(atf_run_user_test_OBJECTS) $(atf_run_user_test_LDADD) $(LIBS)
 atf-run/zero_tcs_helper.$(OBJEXT): atf-run/$(am__dirstamp) \
        atf-run/$(DEPDIR)/$(am__dirstamp)
-atf-run/zero_tcs_helper$(EXEEXT): $(atf_run_zero_tcs_helper_OBJECTS) $(atf_run_zero_tcs_helper_DEPENDENCIES) atf-run/$(am__dirstamp)
+atf-run/zero_tcs_helper$(EXEEXT): $(atf_run_zero_tcs_helper_OBJECTS) $(atf_run_zero_tcs_helper_DEPENDENCIES) $(EXTRA_atf_run_zero_tcs_helper_DEPENDENCIES) atf-run/$(am__dirstamp)
        @rm -f atf-run/zero_tcs_helper$(EXEEXT)
        $(LINK) $(atf_run_zero_tcs_helper_OBJECTS) $(atf_run_zero_tcs_helper_LDADD) $(LIBS)
 atf-sh/$(am__dirstamp):
@@ -2488,12 +2845,12 @@ atf-sh/$(DEPDIR)/$(am__dirstamp):
        @: > atf-sh/$(DEPDIR)/$(am__dirstamp)
 atf-sh/atf-check.$(OBJEXT): atf-sh/$(am__dirstamp) \
        atf-sh/$(DEPDIR)/$(am__dirstamp)
-atf-sh/atf-check$(EXEEXT): $(atf_sh_atf_check_OBJECTS) $(atf_sh_atf_check_DEPENDENCIES) atf-sh/$(am__dirstamp)
+atf-sh/atf-check$(EXEEXT): $(atf_sh_atf_check_OBJECTS) $(atf_sh_atf_check_DEPENDENCIES) $(EXTRA_atf_sh_atf_check_DEPENDENCIES) atf-sh/$(am__dirstamp)
        @rm -f atf-sh/atf-check$(EXEEXT)
        $(CXXLINK) $(atf_sh_atf_check_OBJECTS) $(atf_sh_atf_check_LDADD) $(LIBS)
 atf-sh/atf-sh.$(OBJEXT): atf-sh/$(am__dirstamp) \
        atf-sh/$(DEPDIR)/$(am__dirstamp)
-atf-sh/atf-sh$(EXEEXT): $(atf_sh_atf_sh_OBJECTS) $(atf_sh_atf_sh_DEPENDENCIES) atf-sh/$(am__dirstamp)
+atf-sh/atf-sh$(EXEEXT): $(atf_sh_atf_sh_OBJECTS) $(atf_sh_atf_sh_DEPENDENCIES) $(EXTRA_atf_sh_atf_sh_DEPENDENCIES) atf-sh/$(am__dirstamp)
        @rm -f atf-sh/atf-sh$(EXEEXT)
        $(CXXLINK) $(atf_sh_atf_sh_OBJECTS) $(atf_sh_atf_sh_LDADD) $(LIBS)
 atf-version/$(am__dirstamp):
@@ -2505,7 +2862,7 @@ atf-version/$(DEPDIR)/$(am__dirstamp):
 atf-version/atf_version_atf_version-atf-version.$(OBJEXT):  \
        atf-version/$(am__dirstamp) \
        atf-version/$(DEPDIR)/$(am__dirstamp)
-atf-version/atf-version$(EXEEXT): $(atf_version_atf_version_OBJECTS) $(atf_version_atf_version_DEPENDENCIES) atf-version/$(am__dirstamp)
+atf-version/atf-version$(EXEEXT): $(atf_version_atf_version_OBJECTS) $(atf_version_atf_version_DEPENDENCIES) $(EXTRA_atf_version_atf_version_DEPENDENCIES) atf-version/$(am__dirstamp)
        @rm -f atf-version/atf-version$(EXEEXT)
        $(CXXLINK) $(atf_version_atf_version_OBJECTS) $(atf_version_atf_version_LDADD) $(LIBS)
 bootstrap/$(am__dirstamp):
@@ -2516,22 +2873,22 @@ bootstrap/$(DEPDIR)/$(am__dirstamp):
        @: > bootstrap/$(DEPDIR)/$(am__dirstamp)
 bootstrap/h_app_empty.$(OBJEXT): bootstrap/$(am__dirstamp) \
        bootstrap/$(DEPDIR)/$(am__dirstamp)
-bootstrap/h_app_empty$(EXEEXT): $(bootstrap_h_app_empty_OBJECTS) $(bootstrap_h_app_empty_DEPENDENCIES) bootstrap/$(am__dirstamp)
+bootstrap/h_app_empty$(EXEEXT): $(bootstrap_h_app_empty_OBJECTS) $(bootstrap_h_app_empty_DEPENDENCIES) $(EXTRA_bootstrap_h_app_empty_DEPENDENCIES) bootstrap/$(am__dirstamp)
        @rm -f bootstrap/h_app_empty$(EXEEXT)
        $(CXXLINK) $(bootstrap_h_app_empty_OBJECTS) $(bootstrap_h_app_empty_LDADD) $(LIBS)
 bootstrap/h_app_opts_args.$(OBJEXT): bootstrap/$(am__dirstamp) \
        bootstrap/$(DEPDIR)/$(am__dirstamp)
-bootstrap/h_app_opts_args$(EXEEXT): $(bootstrap_h_app_opts_args_OBJECTS) $(bootstrap_h_app_opts_args_DEPENDENCIES) bootstrap/$(am__dirstamp)
+bootstrap/h_app_opts_args$(EXEEXT): $(bootstrap_h_app_opts_args_OBJECTS) $(bootstrap_h_app_opts_args_DEPENDENCIES) $(EXTRA_bootstrap_h_app_opts_args_DEPENDENCIES) bootstrap/$(am__dirstamp)
        @rm -f bootstrap/h_app_opts_args$(EXEEXT)
        $(CXXLINK) $(bootstrap_h_app_opts_args_OBJECTS) $(bootstrap_h_app_opts_args_LDADD) $(LIBS)
 bootstrap/h_tp_basic_c.$(OBJEXT): bootstrap/$(am__dirstamp) \
        bootstrap/$(DEPDIR)/$(am__dirstamp)
-bootstrap/h_tp_basic_c$(EXEEXT): $(bootstrap_h_tp_basic_c_OBJECTS) $(bootstrap_h_tp_basic_c_DEPENDENCIES) bootstrap/$(am__dirstamp)
+bootstrap/h_tp_basic_c$(EXEEXT): $(bootstrap_h_tp_basic_c_OBJECTS) $(bootstrap_h_tp_basic_c_DEPENDENCIES) $(EXTRA_bootstrap_h_tp_basic_c_DEPENDENCIES) bootstrap/$(am__dirstamp)
        @rm -f bootstrap/h_tp_basic_c$(EXEEXT)
        $(LINK) $(bootstrap_h_tp_basic_c_OBJECTS) $(bootstrap_h_tp_basic_c_LDADD) $(LIBS)
 bootstrap/h_tp_basic_cpp.$(OBJEXT): bootstrap/$(am__dirstamp) \
        bootstrap/$(DEPDIR)/$(am__dirstamp)
-bootstrap/h_tp_basic_cpp$(EXEEXT): $(bootstrap_h_tp_basic_cpp_OBJECTS) $(bootstrap_h_tp_basic_cpp_DEPENDENCIES) bootstrap/$(am__dirstamp)
+bootstrap/h_tp_basic_cpp$(EXEEXT): $(bootstrap_h_tp_basic_cpp_OBJECTS) $(bootstrap_h_tp_basic_cpp_DEPENDENCIES) $(EXTRA_bootstrap_h_tp_basic_cpp_DEPENDENCIES) bootstrap/$(am__dirstamp)
        @rm -f bootstrap/h_tp_basic_cpp$(EXEEXT)
        $(CXXLINK) $(bootstrap_h_tp_basic_cpp_OBJECTS) $(bootstrap_h_tp_basic_cpp_LDADD) $(LIBS)
 test-programs/$(am__dirstamp):
@@ -2542,301 +2899,277 @@ test-programs/$(DEPDIR)/$(am__dirstamp):
        @: > test-programs/$(DEPDIR)/$(am__dirstamp)
 test-programs/c_helpers.$(OBJEXT): test-programs/$(am__dirstamp) \
        test-programs/$(DEPDIR)/$(am__dirstamp)
-test-programs/c_helpers$(EXEEXT): $(test_programs_c_helpers_OBJECTS) $(test_programs_c_helpers_DEPENDENCIES) test-programs/$(am__dirstamp)
+test-programs/c_helpers$(EXEEXT): $(test_programs_c_helpers_OBJECTS) $(test_programs_c_helpers_DEPENDENCIES) $(EXTRA_test_programs_c_helpers_DEPENDENCIES) test-programs/$(am__dirstamp)
        @rm -f test-programs/c_helpers$(EXEEXT)
        $(LINK) $(test_programs_c_helpers_OBJECTS) $(test_programs_c_helpers_LDADD) $(LIBS)
 test-programs/cpp_helpers.$(OBJEXT): test-programs/$(am__dirstamp) \
        test-programs/$(DEPDIR)/$(am__dirstamp)
-test-programs/cpp_helpers$(EXEEXT): $(test_programs_cpp_helpers_OBJECTS) $(test_programs_cpp_helpers_DEPENDENCIES) test-programs/$(am__dirstamp)
+test-programs/cpp_helpers$(EXEEXT): $(test_programs_cpp_helpers_OBJECTS) $(test_programs_cpp_helpers_DEPENDENCIES) $(EXTRA_test_programs_cpp_helpers_DEPENDENCIES) test-programs/$(am__dirstamp)
        @rm -f test-programs/cpp_helpers$(EXEEXT)
        $(CXXLINK) $(test_programs_cpp_helpers_OBJECTS) $(test_programs_cpp_helpers_LDADD) $(LIBS)
 install-tests_atf_cSCRIPTS: $(tests_atf_c_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_cdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_cdir)"
-       @list='$(tests_atf_c_SCRIPTS)'; for p in $$list; do \
+       @list='$(tests_atf_c_SCRIPTS)'; test -n "$(tests_atf_cdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_cdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_cdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         if test -f $$d$$p; then \
-           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(tests_atf_cSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_cdir)/$$f'"; \
-           $(tests_atf_cSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_cdir)/$$f"; \
-         else :; fi; \
-       done
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tests_atf_cdir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tests_atf_cdir)$$dir" || exit $$?; \
+            } \
+       ; done
 
 uninstall-tests_atf_cSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_c_SCRIPTS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(tests_atf_cdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_cdir)/$$f"; \
-       done
+       @list='$(tests_atf_c_SCRIPTS)'; test -n "$(tests_atf_cdir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       dir='$(DESTDIR)$(tests_atf_cdir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_c__SCRIPTS: $(tests_atf_c___SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_c__dir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_c__dir)"
-       @list='$(tests_atf_c___SCRIPTS)'; for p in $$list; do \
+       @list='$(tests_atf_c___SCRIPTS)'; test -n "$(tests_atf_c__dir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_c__dir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_c__dir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         if test -f $$d$$p; then \
-           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(tests_atf_c__SCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_c__dir)/$$f'"; \
-           $(tests_atf_c__SCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_c__dir)/$$f"; \
-         else :; fi; \
-       done
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tests_atf_c__dir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tests_atf_c__dir)$$dir" || exit $$?; \
+            } \
+       ; done
 
 uninstall-tests_atf_c__SCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_c___SCRIPTS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(tests_atf_c__dir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_c__dir)/$$f"; \
-       done
+       @list='$(tests_atf_c___SCRIPTS)'; test -n "$(tests_atf_c__dir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       dir='$(DESTDIR)$(tests_atf_c__dir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_configSCRIPTS: $(tests_atf_config_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_configdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_configdir)"
-       @list='$(tests_atf_config_SCRIPTS)'; for p in $$list; do \
+       @list='$(tests_atf_config_SCRIPTS)'; test -n "$(tests_atf_configdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_configdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_configdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         if test -f $$d$$p; then \
-           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(tests_atf_configSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_configdir)/$$f'"; \
-           $(tests_atf_configSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_configdir)/$$f"; \
-         else :; fi; \
-       done
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tests_atf_configdir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tests_atf_configdir)$$dir" || exit $$?; \
+            } \
+       ; done
 
 uninstall-tests_atf_configSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_config_SCRIPTS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(tests_atf_configdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_configdir)/$$f"; \
-       done
+       @list='$(tests_atf_config_SCRIPTS)'; test -n "$(tests_atf_configdir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       dir='$(DESTDIR)$(tests_atf_configdir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_reportSCRIPTS: $(tests_atf_report_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_reportdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_reportdir)"
-       @list='$(tests_atf_report_SCRIPTS)'; for p in $$list; do \
+       @list='$(tests_atf_report_SCRIPTS)'; test -n "$(tests_atf_reportdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_reportdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_reportdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         if test -f $$d$$p; then \
-           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(tests_atf_reportSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_reportdir)/$$f'"; \
-           $(tests_atf_reportSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_reportdir)/$$f"; \
-         else :; fi; \
-       done
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tests_atf_reportdir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tests_atf_reportdir)$$dir" || exit $$?; \
+            } \
+       ; done
 
 uninstall-tests_atf_reportSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_report_SCRIPTS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(tests_atf_reportdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_reportdir)/$$f"; \
-       done
+       @list='$(tests_atf_report_SCRIPTS)'; test -n "$(tests_atf_reportdir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       dir='$(DESTDIR)$(tests_atf_reportdir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_runSCRIPTS: $(tests_atf_run_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_rundir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_rundir)"
-       @list='$(tests_atf_run_SCRIPTS)'; for p in $$list; do \
+       @list='$(tests_atf_run_SCRIPTS)'; test -n "$(tests_atf_rundir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_rundir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_rundir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         if test -f $$d$$p; then \
-           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(tests_atf_runSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_rundir)/$$f'"; \
-           $(tests_atf_runSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_rundir)/$$f"; \
-         else :; fi; \
-       done
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tests_atf_rundir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tests_atf_rundir)$$dir" || exit $$?; \
+            } \
+       ; done
 
 uninstall-tests_atf_runSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_run_SCRIPTS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(tests_atf_rundir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_rundir)/$$f"; \
-       done
+       @list='$(tests_atf_run_SCRIPTS)'; test -n "$(tests_atf_rundir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       dir='$(DESTDIR)$(tests_atf_rundir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_shSCRIPTS: $(tests_atf_sh_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_shdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_shdir)"
-       @list='$(tests_atf_sh_SCRIPTS)'; for p in $$list; do \
+       @list='$(tests_atf_sh_SCRIPTS)'; test -n "$(tests_atf_shdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_shdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_shdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         if test -f $$d$$p; then \
-           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(tests_atf_shSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_shdir)/$$f'"; \
-           $(tests_atf_shSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_shdir)/$$f"; \
-         else :; fi; \
-       done
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tests_atf_shdir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tests_atf_shdir)$$dir" || exit $$?; \
+            } \
+       ; done
 
 uninstall-tests_atf_shSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_sh_SCRIPTS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(tests_atf_shdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_shdir)/$$f"; \
-       done
+       @list='$(tests_atf_sh_SCRIPTS)'; test -n "$(tests_atf_shdir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       dir='$(DESTDIR)$(tests_atf_shdir)'; $(am__uninstall_files_from_dir)
 install-tests_test_programsSCRIPTS: $(tests_test_programs_SCRIPTS)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_test_programsdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_test_programsdir)"
-       @list='$(tests_test_programs_SCRIPTS)'; for p in $$list; do \
+       @list='$(tests_test_programs_SCRIPTS)'; test -n "$(tests_test_programsdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_test_programsdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_test_programsdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         if test -f $$d$$p; then \
-           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-           echo " $(tests_test_programsSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_test_programsdir)/$$f'"; \
-           $(tests_test_programsSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_test_programsdir)/$$f"; \
-         else :; fi; \
-       done
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tests_test_programsdir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tests_test_programsdir)$$dir" || exit $$?; \
+            } \
+       ; done
 
 uninstall-tests_test_programsSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_test_programs_SCRIPTS)'; for p in $$list; do \
-         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-         echo " rm -f '$(DESTDIR)$(tests_test_programsdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_test_programsdir)/$$f"; \
-       done
+       @list='$(tests_test_programs_SCRIPTS)'; test -n "$(tests_test_programsdir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       dir='$(DESTDIR)$(tests_test_programsdir)'; $(am__uninstall_files_from_dir)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
-       -rm -f atf-c++/atf_c++_test.$(OBJEXT)
-       -rm -f atf-c++/build.$(OBJEXT)
-       -rm -f atf-c++/build.lo
-       -rm -f atf-c++/build_test.$(OBJEXT)
-       -rm -f atf-c++/check.$(OBJEXT)
-       -rm -f atf-c++/check.lo
-       -rm -f atf-c++/check_test.$(OBJEXT)
-       -rm -f atf-c++/config.$(OBJEXT)
-       -rm -f atf-c++/config.lo
-       -rm -f atf-c++/config_test.$(OBJEXT)
-       -rm -f atf-c++/detail/application.$(OBJEXT)
-       -rm -f atf-c++/detail/application.lo
-       -rm -f atf-c++/detail/application_test.$(OBJEXT)
-       -rm -f atf-c++/detail/env.$(OBJEXT)
-       -rm -f atf-c++/detail/env.lo
-       -rm -f atf-c++/detail/env_test.$(OBJEXT)
-       -rm -f atf-c++/detail/exceptions.$(OBJEXT)
-       -rm -f atf-c++/detail/exceptions.lo
-       -rm -f atf-c++/detail/exceptions_test.$(OBJEXT)
-       -rm -f atf-c++/detail/expand.$(OBJEXT)
-       -rm -f atf-c++/detail/expand.lo
-       -rm -f atf-c++/detail/expand_test.$(OBJEXT)
-       -rm -f atf-c++/detail/fs.$(OBJEXT)
-       -rm -f atf-c++/detail/fs.lo
-       -rm -f atf-c++/detail/fs_test.$(OBJEXT)
-       -rm -f atf-c++/detail/parser.$(OBJEXT)
-       -rm -f atf-c++/detail/parser.lo
-       -rm -f atf-c++/detail/parser_test.$(OBJEXT)
-       -rm -f atf-c++/detail/process.$(OBJEXT)
-       -rm -f atf-c++/detail/process.lo
-       -rm -f atf-c++/detail/process_test.$(OBJEXT)
-       -rm -f atf-c++/detail/sanity_test.$(OBJEXT)
-       -rm -f atf-c++/detail/test_helpers.$(OBJEXT)
-       -rm -f atf-c++/detail/test_helpers.lo
-       -rm -f atf-c++/detail/text.$(OBJEXT)
-       -rm -f atf-c++/detail/text.lo
-       -rm -f atf-c++/detail/text_test.$(OBJEXT)
-       -rm -f atf-c++/detail/ui.$(OBJEXT)
-       -rm -f atf-c++/detail/ui.lo
-       -rm -f atf-c++/detail/ui_test.$(OBJEXT)
-       -rm -f atf-c++/macros_test.$(OBJEXT)
-       -rm -f atf-c++/tests.$(OBJEXT)
-       -rm -f atf-c++/tests.lo
-       -rm -f atf-c++/tests_test.$(OBJEXT)
-       -rm -f atf-c++/utils_test.$(OBJEXT)
-       -rm -f atf-c/atf_c_test.$(OBJEXT)
-       -rm -f atf-c/build_test.$(OBJEXT)
-       -rm -f atf-c/check_test.$(OBJEXT)
-       -rm -f atf-c/config_test.$(OBJEXT)
-       -rm -f atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.$(OBJEXT)
-       -rm -f atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo
-       -rm -f atf-c/detail/dynstr_test.$(OBJEXT)
-       -rm -f atf-c/detail/env_test.$(OBJEXT)
-       -rm -f atf-c/detail/fs_test.$(OBJEXT)
-       -rm -f atf-c/detail/libatf_c_la-dynstr.$(OBJEXT)
-       -rm -f atf-c/detail/libatf_c_la-dynstr.lo
-       -rm -f atf-c/detail/libatf_c_la-env.$(OBJEXT)
-       -rm -f atf-c/detail/libatf_c_la-env.lo
-       -rm -f atf-c/detail/libatf_c_la-fs.$(OBJEXT)
-       -rm -f atf-c/detail/libatf_c_la-fs.lo
-       -rm -f atf-c/detail/libatf_c_la-list.$(OBJEXT)
-       -rm -f atf-c/detail/libatf_c_la-list.lo
-       -rm -f atf-c/detail/libatf_c_la-map.$(OBJEXT)
-       -rm -f atf-c/detail/libatf_c_la-map.lo
-       -rm -f atf-c/detail/libatf_c_la-process.$(OBJEXT)
-       -rm -f atf-c/detail/libatf_c_la-process.lo
-       -rm -f atf-c/detail/libatf_c_la-sanity.$(OBJEXT)
-       -rm -f atf-c/detail/libatf_c_la-sanity.lo
-       -rm -f atf-c/detail/libatf_c_la-text.$(OBJEXT)
-       -rm -f atf-c/detail/libatf_c_la-text.lo
-       -rm -f atf-c/detail/libatf_c_la-tp_main.$(OBJEXT)
-       -rm -f atf-c/detail/libatf_c_la-tp_main.lo
-       -rm -f atf-c/detail/libatf_c_la-user.$(OBJEXT)
-       -rm -f atf-c/detail/libatf_c_la-user.lo
-       -rm -f atf-c/detail/list_test.$(OBJEXT)
-       -rm -f atf-c/detail/map_test.$(OBJEXT)
-       -rm -f atf-c/detail/process_helpers.$(OBJEXT)
-       -rm -f atf-c/detail/process_test.$(OBJEXT)
-       -rm -f atf-c/detail/sanity_test.$(OBJEXT)
-       -rm -f atf-c/detail/test_helpers_test.$(OBJEXT)
-       -rm -f atf-c/detail/text_test.$(OBJEXT)
-       -rm -f atf-c/detail/user_test.$(OBJEXT)
-       -rm -f atf-c/error_test.$(OBJEXT)
-       -rm -f atf-c/libatf_c_la-build.$(OBJEXT)
-       -rm -f atf-c/libatf_c_la-build.lo
-       -rm -f atf-c/libatf_c_la-check.$(OBJEXT)
-       -rm -f atf-c/libatf_c_la-check.lo
-       -rm -f atf-c/libatf_c_la-config.$(OBJEXT)
-       -rm -f atf-c/libatf_c_la-config.lo
-       -rm -f atf-c/libatf_c_la-error.$(OBJEXT)
-       -rm -f atf-c/libatf_c_la-error.lo
-       -rm -f atf-c/libatf_c_la-tc.$(OBJEXT)
-       -rm -f atf-c/libatf_c_la-tc.lo
-       -rm -f atf-c/libatf_c_la-tp.$(OBJEXT)
-       -rm -f atf-c/libatf_c_la-tp.lo
-       -rm -f atf-c/libatf_c_la-utils.$(OBJEXT)
-       -rm -f atf-c/libatf_c_la-utils.lo
-       -rm -f atf-c/macros_test.$(OBJEXT)
-       -rm -f atf-c/tc_test.$(OBJEXT)
-       -rm -f atf-c/tp_test.$(OBJEXT)
-       -rm -f atf-c/utils_test.$(OBJEXT)
-       -rm -f atf-config/atf-config.$(OBJEXT)
-       -rm -f atf-report/atf-report.$(OBJEXT)
-       -rm -f atf-report/atf_report_reader_test-reader.$(OBJEXT)
-       -rm -f atf-report/atf_report_reader_test-reader_test.$(OBJEXT)
-       -rm -f atf-report/fail_helper.$(OBJEXT)
-       -rm -f atf-report/misc_helpers.$(OBJEXT)
-       -rm -f atf-report/pass_helper.$(OBJEXT)
-       -rm -f atf-report/reader.$(OBJEXT)
-       -rm -f atf-run/atf-run.$(OBJEXT)
-       -rm -f atf-run/atf_run_atffile_test-atffile.$(OBJEXT)
-       -rm -f atf-run/atf_run_atffile_test-atffile_test.$(OBJEXT)
-       -rm -f atf-run/atf_run_config_test-config.$(OBJEXT)
-       -rm -f atf-run/atf_run_config_test-config_test.$(OBJEXT)
-       -rm -f atf-run/atf_run_test_program_test-fs.$(OBJEXT)
-       -rm -f atf-run/atf_run_test_program_test-io.$(OBJEXT)
-       -rm -f atf-run/atf_run_test_program_test-requirements.$(OBJEXT)
-       -rm -f atf-run/atf_run_test_program_test-signals.$(OBJEXT)
-       -rm -f atf-run/atf_run_test_program_test-test-program.$(OBJEXT)
-       -rm -f atf-run/atf_run_test_program_test-test_program_test.$(OBJEXT)
-       -rm -f atf-run/atf_run_test_program_test-timer.$(OBJEXT)
-       -rm -f atf-run/atf_run_test_program_test-user.$(OBJEXT)
-       -rm -f atf-run/atffile.$(OBJEXT)
-       -rm -f atf-run/bad_metadata_helper.$(OBJEXT)
-       -rm -f atf-run/config.$(OBJEXT)
-       -rm -f atf-run/expect_helpers.$(OBJEXT)
-       -rm -f atf-run/fs.$(OBJEXT)
-       -rm -f atf-run/fs_test.$(OBJEXT)
-       -rm -f atf-run/io.$(OBJEXT)
-       -rm -f atf-run/io_test.$(OBJEXT)
-       -rm -f atf-run/misc_helpers.$(OBJEXT)
-       -rm -f atf-run/pass_helper.$(OBJEXT)
-       -rm -f atf-run/requirements.$(OBJEXT)
-       -rm -f atf-run/requirements_test.$(OBJEXT)
-       -rm -f atf-run/several_tcs_helper.$(OBJEXT)
-       -rm -f atf-run/signals.$(OBJEXT)
-       -rm -f atf-run/signals_test.$(OBJEXT)
-       -rm -f atf-run/test-program.$(OBJEXT)
-       -rm -f atf-run/timer.$(OBJEXT)
-       -rm -f atf-run/user.$(OBJEXT)
-       -rm -f atf-run/user_test.$(OBJEXT)
-       -rm -f atf-run/zero_tcs_helper.$(OBJEXT)
-       -rm -f atf-sh/atf-check.$(OBJEXT)
-       -rm -f atf-sh/atf-sh.$(OBJEXT)
-       -rm -f atf-version/atf_version_atf_version-atf-version.$(OBJEXT)
-       -rm -f bootstrap/h_app_empty.$(OBJEXT)
-       -rm -f bootstrap/h_app_opts_args.$(OBJEXT)
-       -rm -f bootstrap/h_tp_basic_c.$(OBJEXT)
-       -rm -f bootstrap/h_tp_basic_cpp.$(OBJEXT)
-       -rm -f test-programs/c_helpers.$(OBJEXT)
-       -rm -f test-programs/cpp_helpers.$(OBJEXT)
+       -rm -f atf-c++/*.$(OBJEXT)
+       -rm -f atf-c++/*.lo
+       -rm -f atf-c++/detail/*.$(OBJEXT)
+       -rm -f atf-c++/detail/*.lo
+       -rm -f atf-c/*.$(OBJEXT)
+       -rm -f atf-c/*.lo
+       -rm -f atf-c/detail/*.$(OBJEXT)
+       -rm -f atf-c/detail/*.lo
+       -rm -f atf-config/*.$(OBJEXT)
+       -rm -f atf-report/*.$(OBJEXT)
+       -rm -f atf-run/*.$(OBJEXT)
+       -rm -f atf-sh/*.$(OBJEXT)
+       -rm -f atf-version/*.$(OBJEXT)
+       -rm -f bootstrap/*.$(OBJEXT)
+       -rm -f test-programs/*.$(OBJEXT)
 
 distclean-compile:
        -rm -f *.tab.c
@@ -2851,9 +3184,11 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/macros_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/tests.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/tests_test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/utils.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/utils_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/application.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/application_test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/auto_array_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/env.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/env_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/exceptions.Plo@am__quote@
@@ -2907,7 +3242,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c/detail/$(DEPDIR)/process_helpers.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c/detail/$(DEPDIR)/process_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c/detail/$(DEPDIR)/sanity_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@atf-c/detail/$(DEPDIR)/test_helpers_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c/detail/$(DEPDIR)/text_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-c/detail/$(DEPDIR)/user_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-config/$(DEPDIR)/atf-config.Po@am__quote@
@@ -2918,7 +3252,16 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@atf-report/$(DEPDIR)/misc_helpers.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-report/$(DEPDIR)/pass_helper.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-report/$(DEPDIR)/reader.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf-run.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-config.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-fs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-io.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-signals.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-timer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-user.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_config_test-config.Po@am__quote@
@@ -2931,9 +3274,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_test_program_test-user.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atffile.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/bad_metadata_helper.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/config.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/expect_helpers.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/fs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/fs_test.Po@am__quote@
@@ -2946,8 +3287,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/several_tcs_helper.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/signals.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/signals_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/test-program.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/timer.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/user.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/user_test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/zero_tcs_helper.Po@am__quote@
@@ -2964,7 +3303,7 @@ distclean-compile:
 .c.o:
 @am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@   mv -f $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c -o $@ $<
@@ -2972,7 +3311,7 @@ distclean-compile:
 .c.obj:
 @am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCC_TRUE@   mv -f $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
@@ -2980,141 +3319,141 @@ distclean-compile:
 .c.lo:
 @am__fastdepCC_TRUE@   depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
 @am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@   mv -f $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
 
 atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo: atf-c/detail/test_helpers.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_c_detail_libtest_helpers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/atf_c_detail_libtest_helpers_la-test_helpers.Tpo -c -o atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo `test -f 'atf-c/detail/test_helpers.c' || echo '$(srcdir)/'`atf-c/detail/test_helpers.c
-@am__fastdepCC_TRUE@   mv -f atf-c/detail/$(DEPDIR)/atf_c_detail_libtest_helpers_la-test_helpers.Tpo atf-c/detail/$(DEPDIR)/atf_c_detail_libtest_helpers_la-test_helpers.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_c_detail_libtest_helpers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/atf_c_detail_libtest_helpers_la-test_helpers.Tpo -c -o atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo `test -f 'atf-c/detail/test_helpers.c' || echo '$(srcdir)/'`atf-c/detail/test_helpers.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/detail/$(DEPDIR)/atf_c_detail_libtest_helpers_la-test_helpers.Tpo atf-c/detail/$(DEPDIR)/atf_c_detail_libtest_helpers_la-test_helpers.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/detail/test_helpers.c' object='atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_c_detail_libtest_helpers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo `test -f 'atf-c/detail/test_helpers.c' || echo '$(srcdir)/'`atf-c/detail/test_helpers.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_c_detail_libtest_helpers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo `test -f 'atf-c/detail/test_helpers.c' || echo '$(srcdir)/'`atf-c/detail/test_helpers.c
 
 atf-c/libatf_c_la-build.lo: atf-c/build.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-build.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-build.Tpo -c -o atf-c/libatf_c_la-build.lo `test -f 'atf-c/build.c' || echo '$(srcdir)/'`atf-c/build.c
-@am__fastdepCC_TRUE@   mv -f atf-c/$(DEPDIR)/libatf_c_la-build.Tpo atf-c/$(DEPDIR)/libatf_c_la-build.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-build.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-build.Tpo -c -o atf-c/libatf_c_la-build.lo `test -f 'atf-c/build.c' || echo '$(srcdir)/'`atf-c/build.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-build.Tpo atf-c/$(DEPDIR)/libatf_c_la-build.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/build.c' object='atf-c/libatf_c_la-build.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-build.lo `test -f 'atf-c/build.c' || echo '$(srcdir)/'`atf-c/build.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-build.lo `test -f 'atf-c/build.c' || echo '$(srcdir)/'`atf-c/build.c
 
 atf-c/libatf_c_la-check.lo: atf-c/check.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-check.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-check.Tpo -c -o atf-c/libatf_c_la-check.lo `test -f 'atf-c/check.c' || echo '$(srcdir)/'`atf-c/check.c
-@am__fastdepCC_TRUE@   mv -f atf-c/$(DEPDIR)/libatf_c_la-check.Tpo atf-c/$(DEPDIR)/libatf_c_la-check.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-check.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-check.Tpo -c -o atf-c/libatf_c_la-check.lo `test -f 'atf-c/check.c' || echo '$(srcdir)/'`atf-c/check.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-check.Tpo atf-c/$(DEPDIR)/libatf_c_la-check.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/check.c' object='atf-c/libatf_c_la-check.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-check.lo `test -f 'atf-c/check.c' || echo '$(srcdir)/'`atf-c/check.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-check.lo `test -f 'atf-c/check.c' || echo '$(srcdir)/'`atf-c/check.c
 
 atf-c/libatf_c_la-config.lo: atf-c/config.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-config.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-config.Tpo -c -o atf-c/libatf_c_la-config.lo `test -f 'atf-c/config.c' || echo '$(srcdir)/'`atf-c/config.c
-@am__fastdepCC_TRUE@   mv -f atf-c/$(DEPDIR)/libatf_c_la-config.Tpo atf-c/$(DEPDIR)/libatf_c_la-config.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-config.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-config.Tpo -c -o atf-c/libatf_c_la-config.lo `test -f 'atf-c/config.c' || echo '$(srcdir)/'`atf-c/config.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-config.Tpo atf-c/$(DEPDIR)/libatf_c_la-config.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/config.c' object='atf-c/libatf_c_la-config.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-config.lo `test -f 'atf-c/config.c' || echo '$(srcdir)/'`atf-c/config.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-config.lo `test -f 'atf-c/config.c' || echo '$(srcdir)/'`atf-c/config.c
 
 atf-c/libatf_c_la-error.lo: atf-c/error.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-error.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-error.Tpo -c -o atf-c/libatf_c_la-error.lo `test -f 'atf-c/error.c' || echo '$(srcdir)/'`atf-c/error.c
-@am__fastdepCC_TRUE@   mv -f atf-c/$(DEPDIR)/libatf_c_la-error.Tpo atf-c/$(DEPDIR)/libatf_c_la-error.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-error.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-error.Tpo -c -o atf-c/libatf_c_la-error.lo `test -f 'atf-c/error.c' || echo '$(srcdir)/'`atf-c/error.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-error.Tpo atf-c/$(DEPDIR)/libatf_c_la-error.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/error.c' object='atf-c/libatf_c_la-error.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-error.lo `test -f 'atf-c/error.c' || echo '$(srcdir)/'`atf-c/error.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-error.lo `test -f 'atf-c/error.c' || echo '$(srcdir)/'`atf-c/error.c
 
 atf-c/libatf_c_la-tc.lo: atf-c/tc.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-tc.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-tc.Tpo -c -o atf-c/libatf_c_la-tc.lo `test -f 'atf-c/tc.c' || echo '$(srcdir)/'`atf-c/tc.c
-@am__fastdepCC_TRUE@   mv -f atf-c/$(DEPDIR)/libatf_c_la-tc.Tpo atf-c/$(DEPDIR)/libatf_c_la-tc.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-tc.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-tc.Tpo -c -o atf-c/libatf_c_la-tc.lo `test -f 'atf-c/tc.c' || echo '$(srcdir)/'`atf-c/tc.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-tc.Tpo atf-c/$(DEPDIR)/libatf_c_la-tc.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/tc.c' object='atf-c/libatf_c_la-tc.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-tc.lo `test -f 'atf-c/tc.c' || echo '$(srcdir)/'`atf-c/tc.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-tc.lo `test -f 'atf-c/tc.c' || echo '$(srcdir)/'`atf-c/tc.c
 
 atf-c/libatf_c_la-tp.lo: atf-c/tp.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-tp.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-tp.Tpo -c -o atf-c/libatf_c_la-tp.lo `test -f 'atf-c/tp.c' || echo '$(srcdir)/'`atf-c/tp.c
-@am__fastdepCC_TRUE@   mv -f atf-c/$(DEPDIR)/libatf_c_la-tp.Tpo atf-c/$(DEPDIR)/libatf_c_la-tp.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-tp.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-tp.Tpo -c -o atf-c/libatf_c_la-tp.lo `test -f 'atf-c/tp.c' || echo '$(srcdir)/'`atf-c/tp.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-tp.Tpo atf-c/$(DEPDIR)/libatf_c_la-tp.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/tp.c' object='atf-c/libatf_c_la-tp.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-tp.lo `test -f 'atf-c/tp.c' || echo '$(srcdir)/'`atf-c/tp.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-tp.lo `test -f 'atf-c/tp.c' || echo '$(srcdir)/'`atf-c/tp.c
 
 atf-c/libatf_c_la-utils.lo: atf-c/utils.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-utils.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-utils.Tpo -c -o atf-c/libatf_c_la-utils.lo `test -f 'atf-c/utils.c' || echo '$(srcdir)/'`atf-c/utils.c
-@am__fastdepCC_TRUE@   mv -f atf-c/$(DEPDIR)/libatf_c_la-utils.Tpo atf-c/$(DEPDIR)/libatf_c_la-utils.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-utils.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-utils.Tpo -c -o atf-c/libatf_c_la-utils.lo `test -f 'atf-c/utils.c' || echo '$(srcdir)/'`atf-c/utils.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-utils.Tpo atf-c/$(DEPDIR)/libatf_c_la-utils.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/utils.c' object='atf-c/libatf_c_la-utils.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-utils.lo `test -f 'atf-c/utils.c' || echo '$(srcdir)/'`atf-c/utils.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-utils.lo `test -f 'atf-c/utils.c' || echo '$(srcdir)/'`atf-c/utils.c
 
 atf-c/detail/libatf_c_la-dynstr.lo: atf-c/detail/dynstr.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-dynstr.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-dynstr.Tpo -c -o atf-c/detail/libatf_c_la-dynstr.lo `test -f 'atf-c/detail/dynstr.c' || echo '$(srcdir)/'`atf-c/detail/dynstr.c
-@am__fastdepCC_TRUE@   mv -f atf-c/detail/$(DEPDIR)/libatf_c_la-dynstr.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-dynstr.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-dynstr.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-dynstr.Tpo -c -o atf-c/detail/libatf_c_la-dynstr.lo `test -f 'atf-c/detail/dynstr.c' || echo '$(srcdir)/'`atf-c/detail/dynstr.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-dynstr.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-dynstr.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/detail/dynstr.c' object='atf-c/detail/libatf_c_la-dynstr.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-dynstr.lo `test -f 'atf-c/detail/dynstr.c' || echo '$(srcdir)/'`atf-c/detail/dynstr.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-dynstr.lo `test -f 'atf-c/detail/dynstr.c' || echo '$(srcdir)/'`atf-c/detail/dynstr.c
 
 atf-c/detail/libatf_c_la-env.lo: atf-c/detail/env.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-env.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-env.Tpo -c -o atf-c/detail/libatf_c_la-env.lo `test -f 'atf-c/detail/env.c' || echo '$(srcdir)/'`atf-c/detail/env.c
-@am__fastdepCC_TRUE@   mv -f atf-c/detail/$(DEPDIR)/libatf_c_la-env.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-env.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-env.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-env.Tpo -c -o atf-c/detail/libatf_c_la-env.lo `test -f 'atf-c/detail/env.c' || echo '$(srcdir)/'`atf-c/detail/env.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-env.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-env.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/detail/env.c' object='atf-c/detail/libatf_c_la-env.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-env.lo `test -f 'atf-c/detail/env.c' || echo '$(srcdir)/'`atf-c/detail/env.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-env.lo `test -f 'atf-c/detail/env.c' || echo '$(srcdir)/'`atf-c/detail/env.c
 
 atf-c/detail/libatf_c_la-fs.lo: atf-c/detail/fs.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-fs.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-fs.Tpo -c -o atf-c/detail/libatf_c_la-fs.lo `test -f 'atf-c/detail/fs.c' || echo '$(srcdir)/'`atf-c/detail/fs.c
-@am__fastdepCC_TRUE@   mv -f atf-c/detail/$(DEPDIR)/libatf_c_la-fs.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-fs.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-fs.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-fs.Tpo -c -o atf-c/detail/libatf_c_la-fs.lo `test -f 'atf-c/detail/fs.c' || echo '$(srcdir)/'`atf-c/detail/fs.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-fs.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-fs.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/detail/fs.c' object='atf-c/detail/libatf_c_la-fs.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-fs.lo `test -f 'atf-c/detail/fs.c' || echo '$(srcdir)/'`atf-c/detail/fs.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-fs.lo `test -f 'atf-c/detail/fs.c' || echo '$(srcdir)/'`atf-c/detail/fs.c
 
 atf-c/detail/libatf_c_la-list.lo: atf-c/detail/list.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-list.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-list.Tpo -c -o atf-c/detail/libatf_c_la-list.lo `test -f 'atf-c/detail/list.c' || echo '$(srcdir)/'`atf-c/detail/list.c
-@am__fastdepCC_TRUE@   mv -f atf-c/detail/$(DEPDIR)/libatf_c_la-list.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-list.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-list.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-list.Tpo -c -o atf-c/detail/libatf_c_la-list.lo `test -f 'atf-c/detail/list.c' || echo '$(srcdir)/'`atf-c/detail/list.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-list.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-list.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/detail/list.c' object='atf-c/detail/libatf_c_la-list.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-list.lo `test -f 'atf-c/detail/list.c' || echo '$(srcdir)/'`atf-c/detail/list.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-list.lo `test -f 'atf-c/detail/list.c' || echo '$(srcdir)/'`atf-c/detail/list.c
 
 atf-c/detail/libatf_c_la-map.lo: atf-c/detail/map.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-map.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-map.Tpo -c -o atf-c/detail/libatf_c_la-map.lo `test -f 'atf-c/detail/map.c' || echo '$(srcdir)/'`atf-c/detail/map.c
-@am__fastdepCC_TRUE@   mv -f atf-c/detail/$(DEPDIR)/libatf_c_la-map.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-map.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-map.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-map.Tpo -c -o atf-c/detail/libatf_c_la-map.lo `test -f 'atf-c/detail/map.c' || echo '$(srcdir)/'`atf-c/detail/map.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-map.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-map.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/detail/map.c' object='atf-c/detail/libatf_c_la-map.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-map.lo `test -f 'atf-c/detail/map.c' || echo '$(srcdir)/'`atf-c/detail/map.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-map.lo `test -f 'atf-c/detail/map.c' || echo '$(srcdir)/'`atf-c/detail/map.c
 
 atf-c/detail/libatf_c_la-process.lo: atf-c/detail/process.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-process.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-process.Tpo -c -o atf-c/detail/libatf_c_la-process.lo `test -f 'atf-c/detail/process.c' || echo '$(srcdir)/'`atf-c/detail/process.c
-@am__fastdepCC_TRUE@   mv -f atf-c/detail/$(DEPDIR)/libatf_c_la-process.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-process.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-process.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-process.Tpo -c -o atf-c/detail/libatf_c_la-process.lo `test -f 'atf-c/detail/process.c' || echo '$(srcdir)/'`atf-c/detail/process.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-process.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-process.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/detail/process.c' object='atf-c/detail/libatf_c_la-process.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-process.lo `test -f 'atf-c/detail/process.c' || echo '$(srcdir)/'`atf-c/detail/process.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-process.lo `test -f 'atf-c/detail/process.c' || echo '$(srcdir)/'`atf-c/detail/process.c
 
 atf-c/detail/libatf_c_la-sanity.lo: atf-c/detail/sanity.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-sanity.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-sanity.Tpo -c -o atf-c/detail/libatf_c_la-sanity.lo `test -f 'atf-c/detail/sanity.c' || echo '$(srcdir)/'`atf-c/detail/sanity.c
-@am__fastdepCC_TRUE@   mv -f atf-c/detail/$(DEPDIR)/libatf_c_la-sanity.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-sanity.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-sanity.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-sanity.Tpo -c -o atf-c/detail/libatf_c_la-sanity.lo `test -f 'atf-c/detail/sanity.c' || echo '$(srcdir)/'`atf-c/detail/sanity.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-sanity.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-sanity.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/detail/sanity.c' object='atf-c/detail/libatf_c_la-sanity.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-sanity.lo `test -f 'atf-c/detail/sanity.c' || echo '$(srcdir)/'`atf-c/detail/sanity.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-sanity.lo `test -f 'atf-c/detail/sanity.c' || echo '$(srcdir)/'`atf-c/detail/sanity.c
 
 atf-c/detail/libatf_c_la-text.lo: atf-c/detail/text.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-text.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-text.Tpo -c -o atf-c/detail/libatf_c_la-text.lo `test -f 'atf-c/detail/text.c' || echo '$(srcdir)/'`atf-c/detail/text.c
-@am__fastdepCC_TRUE@   mv -f atf-c/detail/$(DEPDIR)/libatf_c_la-text.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-text.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-text.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-text.Tpo -c -o atf-c/detail/libatf_c_la-text.lo `test -f 'atf-c/detail/text.c' || echo '$(srcdir)/'`atf-c/detail/text.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-text.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-text.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/detail/text.c' object='atf-c/detail/libatf_c_la-text.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-text.lo `test -f 'atf-c/detail/text.c' || echo '$(srcdir)/'`atf-c/detail/text.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-text.lo `test -f 'atf-c/detail/text.c' || echo '$(srcdir)/'`atf-c/detail/text.c
 
 atf-c/detail/libatf_c_la-tp_main.lo: atf-c/detail/tp_main.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-tp_main.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-tp_main.Tpo -c -o atf-c/detail/libatf_c_la-tp_main.lo `test -f 'atf-c/detail/tp_main.c' || echo '$(srcdir)/'`atf-c/detail/tp_main.c
-@am__fastdepCC_TRUE@   mv -f atf-c/detail/$(DEPDIR)/libatf_c_la-tp_main.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-tp_main.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-tp_main.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-tp_main.Tpo -c -o atf-c/detail/libatf_c_la-tp_main.lo `test -f 'atf-c/detail/tp_main.c' || echo '$(srcdir)/'`atf-c/detail/tp_main.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-tp_main.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-tp_main.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/detail/tp_main.c' object='atf-c/detail/libatf_c_la-tp_main.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-tp_main.lo `test -f 'atf-c/detail/tp_main.c' || echo '$(srcdir)/'`atf-c/detail/tp_main.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-tp_main.lo `test -f 'atf-c/detail/tp_main.c' || echo '$(srcdir)/'`atf-c/detail/tp_main.c
 
 atf-c/detail/libatf_c_la-user.lo: atf-c/detail/user.c
-@am__fastdepCC_TRUE@   $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-user.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-user.Tpo -c -o atf-c/detail/libatf_c_la-user.lo `test -f 'atf-c/detail/user.c' || echo '$(srcdir)/'`atf-c/detail/user.c
-@am__fastdepCC_TRUE@   mv -f atf-c/detail/$(DEPDIR)/libatf_c_la-user.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-user.Plo
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-user.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-user.Tpo -c -o atf-c/detail/libatf_c_la-user.lo `test -f 'atf-c/detail/user.c' || echo '$(srcdir)/'`atf-c/detail/user.c
+@am__fastdepCC_TRUE@   $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-user.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-user.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='atf-c/detail/user.c' object='atf-c/detail/libatf_c_la-user.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-user.lo `test -f 'atf-c/detail/user.c' || echo '$(srcdir)/'`atf-c/detail/user.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-user.lo `test -f 'atf-c/detail/user.c' || echo '$(srcdir)/'`atf-c/detail/user.c
 
 .cpp.o:
 @am__fastdepCXX_TRUE@  depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
 @am__fastdepCXX_TRUE@  $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCXX_TRUE@  mv -f $$depbase.Tpo $$depbase.Po
+@am__fastdepCXX_TRUE@  $(am__mv) $$depbase.Tpo $$depbase.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
@@ -3122,7 +3461,7 @@ atf-c/detail/libatf_c_la-user.lo: atf-c/detail/user.c
 .cpp.obj:
 @am__fastdepCXX_TRUE@  depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
 @am__fastdepCXX_TRUE@  $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCXX_TRUE@  mv -f $$depbase.Tpo $$depbase.Po
+@am__fastdepCXX_TRUE@  $(am__mv) $$depbase.Tpo $$depbase.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
@@ -3130,217 +3469,357 @@ atf-c/detail/libatf_c_la-user.lo: atf-c/detail/user.c
 .cpp.lo:
 @am__fastdepCXX_TRUE@  depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
 @am__fastdepCXX_TRUE@  $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCXX_TRUE@  mv -f $$depbase.Tpo $$depbase.Plo
+@am__fastdepCXX_TRUE@  $(am__mv) $$depbase.Tpo $$depbase.Plo
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
 
 atf-report/atf_report_reader_test-reader_test.o: atf-report/reader_test.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-report/atf_report_reader_test-reader_test.o -MD -MP -MF atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Tpo -c -o atf-report/atf_report_reader_test-reader_test.o `test -f 'atf-report/reader_test.cpp' || echo '$(srcdir)/'`atf-report/reader_test.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Tpo atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Tpo atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-report/reader_test.cpp' object='atf-report/atf_report_reader_test-reader_test.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-report/atf_report_reader_test-reader_test.o `test -f 'atf-report/reader_test.cpp' || echo '$(srcdir)/'`atf-report/reader_test.cpp
 
 atf-report/atf_report_reader_test-reader_test.obj: atf-report/reader_test.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-report/atf_report_reader_test-reader_test.obj -MD -MP -MF atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Tpo -c -o atf-report/atf_report_reader_test-reader_test.obj `if test -f 'atf-report/reader_test.cpp'; then $(CYGPATH_W) 'atf-report/reader_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-report/reader_test.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Tpo atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Tpo atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-report/reader_test.cpp' object='atf-report/atf_report_reader_test-reader_test.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-report/atf_report_reader_test-reader_test.obj `if test -f 'atf-report/reader_test.cpp'; then $(CYGPATH_W) 'atf-report/reader_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-report/reader_test.cpp'; fi`
 
 atf-report/atf_report_reader_test-reader.o: atf-report/reader.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-report/atf_report_reader_test-reader.o -MD -MP -MF atf-report/$(DEPDIR)/atf_report_reader_test-reader.Tpo -c -o atf-report/atf_report_reader_test-reader.o `test -f 'atf-report/reader.cpp' || echo '$(srcdir)/'`atf-report/reader.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-report/$(DEPDIR)/atf_report_reader_test-reader.Tpo atf-report/$(DEPDIR)/atf_report_reader_test-reader.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-report/$(DEPDIR)/atf_report_reader_test-reader.Tpo atf-report/$(DEPDIR)/atf_report_reader_test-reader.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-report/reader.cpp' object='atf-report/atf_report_reader_test-reader.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-report/atf_report_reader_test-reader.o `test -f 'atf-report/reader.cpp' || echo '$(srcdir)/'`atf-report/reader.cpp
 
 atf-report/atf_report_reader_test-reader.obj: atf-report/reader.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-report/atf_report_reader_test-reader.obj -MD -MP -MF atf-report/$(DEPDIR)/atf_report_reader_test-reader.Tpo -c -o atf-report/atf_report_reader_test-reader.obj `if test -f 'atf-report/reader.cpp'; then $(CYGPATH_W) 'atf-report/reader.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-report/reader.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-report/$(DEPDIR)/atf_report_reader_test-reader.Tpo atf-report/$(DEPDIR)/atf_report_reader_test-reader.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-report/$(DEPDIR)/atf_report_reader_test-reader.Tpo atf-report/$(DEPDIR)/atf_report_reader_test-reader.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-report/reader.cpp' object='atf-report/atf_report_reader_test-reader.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-report/atf_report_reader_test-reader.obj `if test -f 'atf-report/reader.cpp'; then $(CYGPATH_W) 'atf-report/reader.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-report/reader.cpp'; fi`
 
+atf-run/atf_run_atf_run-atf-run.o: atf-run/atf-run.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-atf-run.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Tpo -c -o atf-run/atf_run_atf_run-atf-run.o `test -f 'atf-run/atf-run.cpp' || echo '$(srcdir)/'`atf-run/atf-run.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/atf-run.cpp' object='atf-run/atf_run_atf_run-atf-run.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-atf-run.o `test -f 'atf-run/atf-run.cpp' || echo '$(srcdir)/'`atf-run/atf-run.cpp
+
+atf-run/atf_run_atf_run-atf-run.obj: atf-run/atf-run.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-atf-run.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Tpo -c -o atf-run/atf_run_atf_run-atf-run.obj `if test -f 'atf-run/atf-run.cpp'; then $(CYGPATH_W) 'atf-run/atf-run.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atf-run.cpp'; fi`
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/atf-run.cpp' object='atf-run/atf_run_atf_run-atf-run.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-atf-run.obj `if test -f 'atf-run/atf-run.cpp'; then $(CYGPATH_W) 'atf-run/atf-run.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atf-run.cpp'; fi`
+
+atf-run/atf_run_atf_run-atffile.o: atf-run/atffile.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-atffile.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Tpo -c -o atf-run/atf_run_atf_run-atffile.o `test -f 'atf-run/atffile.cpp' || echo '$(srcdir)/'`atf-run/atffile.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/atffile.cpp' object='atf-run/atf_run_atf_run-atffile.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-atffile.o `test -f 'atf-run/atffile.cpp' || echo '$(srcdir)/'`atf-run/atffile.cpp
+
+atf-run/atf_run_atf_run-atffile.obj: atf-run/atffile.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-atffile.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Tpo -c -o atf-run/atf_run_atf_run-atffile.obj `if test -f 'atf-run/atffile.cpp'; then $(CYGPATH_W) 'atf-run/atffile.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atffile.cpp'; fi`
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/atffile.cpp' object='atf-run/atf_run_atf_run-atffile.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-atffile.obj `if test -f 'atf-run/atffile.cpp'; then $(CYGPATH_W) 'atf-run/atffile.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atffile.cpp'; fi`
+
+atf-run/atf_run_atf_run-config.o: atf-run/config.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-config.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-config.Tpo -c -o atf-run/atf_run_atf_run-config.o `test -f 'atf-run/config.cpp' || echo '$(srcdir)/'`atf-run/config.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-config.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-config.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/config.cpp' object='atf-run/atf_run_atf_run-config.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-config.o `test -f 'atf-run/config.cpp' || echo '$(srcdir)/'`atf-run/config.cpp
+
+atf-run/atf_run_atf_run-config.obj: atf-run/config.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-config.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-config.Tpo -c -o atf-run/atf_run_atf_run-config.obj `if test -f 'atf-run/config.cpp'; then $(CYGPATH_W) 'atf-run/config.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/config.cpp'; fi`
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-config.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-config.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/config.cpp' object='atf-run/atf_run_atf_run-config.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-config.obj `if test -f 'atf-run/config.cpp'; then $(CYGPATH_W) 'atf-run/config.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/config.cpp'; fi`
+
+atf-run/atf_run_atf_run-fs.o: atf-run/fs.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-fs.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-fs.Tpo -c -o atf-run/atf_run_atf_run-fs.o `test -f 'atf-run/fs.cpp' || echo '$(srcdir)/'`atf-run/fs.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-fs.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-fs.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/fs.cpp' object='atf-run/atf_run_atf_run-fs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-fs.o `test -f 'atf-run/fs.cpp' || echo '$(srcdir)/'`atf-run/fs.cpp
+
+atf-run/atf_run_atf_run-fs.obj: atf-run/fs.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-fs.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-fs.Tpo -c -o atf-run/atf_run_atf_run-fs.obj `if test -f 'atf-run/fs.cpp'; then $(CYGPATH_W) 'atf-run/fs.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/fs.cpp'; fi`
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-fs.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-fs.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/fs.cpp' object='atf-run/atf_run_atf_run-fs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-fs.obj `if test -f 'atf-run/fs.cpp'; then $(CYGPATH_W) 'atf-run/fs.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/fs.cpp'; fi`
+
+atf-run/atf_run_atf_run-io.o: atf-run/io.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-io.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-io.Tpo -c -o atf-run/atf_run_atf_run-io.o `test -f 'atf-run/io.cpp' || echo '$(srcdir)/'`atf-run/io.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-io.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-io.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/io.cpp' object='atf-run/atf_run_atf_run-io.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-io.o `test -f 'atf-run/io.cpp' || echo '$(srcdir)/'`atf-run/io.cpp
+
+atf-run/atf_run_atf_run-io.obj: atf-run/io.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-io.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-io.Tpo -c -o atf-run/atf_run_atf_run-io.obj `if test -f 'atf-run/io.cpp'; then $(CYGPATH_W) 'atf-run/io.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/io.cpp'; fi`
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-io.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-io.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/io.cpp' object='atf-run/atf_run_atf_run-io.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-io.obj `if test -f 'atf-run/io.cpp'; then $(CYGPATH_W) 'atf-run/io.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/io.cpp'; fi`
+
+atf-run/atf_run_atf_run-requirements.o: atf-run/requirements.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-requirements.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Tpo -c -o atf-run/atf_run_atf_run-requirements.o `test -f 'atf-run/requirements.cpp' || echo '$(srcdir)/'`atf-run/requirements.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/requirements.cpp' object='atf-run/atf_run_atf_run-requirements.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-requirements.o `test -f 'atf-run/requirements.cpp' || echo '$(srcdir)/'`atf-run/requirements.cpp
+
+atf-run/atf_run_atf_run-requirements.obj: atf-run/requirements.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-requirements.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Tpo -c -o atf-run/atf_run_atf_run-requirements.obj `if test -f 'atf-run/requirements.cpp'; then $(CYGPATH_W) 'atf-run/requirements.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/requirements.cpp'; fi`
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/requirements.cpp' object='atf-run/atf_run_atf_run-requirements.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-requirements.obj `if test -f 'atf-run/requirements.cpp'; then $(CYGPATH_W) 'atf-run/requirements.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/requirements.cpp'; fi`
+
+atf-run/atf_run_atf_run-signals.o: atf-run/signals.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-signals.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-signals.Tpo -c -o atf-run/atf_run_atf_run-signals.o `test -f 'atf-run/signals.cpp' || echo '$(srcdir)/'`atf-run/signals.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-signals.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-signals.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/signals.cpp' object='atf-run/atf_run_atf_run-signals.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-signals.o `test -f 'atf-run/signals.cpp' || echo '$(srcdir)/'`atf-run/signals.cpp
+
+atf-run/atf_run_atf_run-signals.obj: atf-run/signals.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-signals.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-signals.Tpo -c -o atf-run/atf_run_atf_run-signals.obj `if test -f 'atf-run/signals.cpp'; then $(CYGPATH_W) 'atf-run/signals.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/signals.cpp'; fi`
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-signals.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-signals.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/signals.cpp' object='atf-run/atf_run_atf_run-signals.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-signals.obj `if test -f 'atf-run/signals.cpp'; then $(CYGPATH_W) 'atf-run/signals.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/signals.cpp'; fi`
+
+atf-run/atf_run_atf_run-test-program.o: atf-run/test-program.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-test-program.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Tpo -c -o atf-run/atf_run_atf_run-test-program.o `test -f 'atf-run/test-program.cpp' || echo '$(srcdir)/'`atf-run/test-program.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/test-program.cpp' object='atf-run/atf_run_atf_run-test-program.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-test-program.o `test -f 'atf-run/test-program.cpp' || echo '$(srcdir)/'`atf-run/test-program.cpp
+
+atf-run/atf_run_atf_run-test-program.obj: atf-run/test-program.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-test-program.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Tpo -c -o atf-run/atf_run_atf_run-test-program.obj `if test -f 'atf-run/test-program.cpp'; then $(CYGPATH_W) 'atf-run/test-program.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/test-program.cpp'; fi`
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/test-program.cpp' object='atf-run/atf_run_atf_run-test-program.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-test-program.obj `if test -f 'atf-run/test-program.cpp'; then $(CYGPATH_W) 'atf-run/test-program.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/test-program.cpp'; fi`
+
+atf-run/atf_run_atf_run-timer.o: atf-run/timer.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-timer.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-timer.Tpo -c -o atf-run/atf_run_atf_run-timer.o `test -f 'atf-run/timer.cpp' || echo '$(srcdir)/'`atf-run/timer.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-timer.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-timer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/timer.cpp' object='atf-run/atf_run_atf_run-timer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-timer.o `test -f 'atf-run/timer.cpp' || echo '$(srcdir)/'`atf-run/timer.cpp
+
+atf-run/atf_run_atf_run-timer.obj: atf-run/timer.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-timer.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-timer.Tpo -c -o atf-run/atf_run_atf_run-timer.obj `if test -f 'atf-run/timer.cpp'; then $(CYGPATH_W) 'atf-run/timer.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/timer.cpp'; fi`
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-timer.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-timer.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/timer.cpp' object='atf-run/atf_run_atf_run-timer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-timer.obj `if test -f 'atf-run/timer.cpp'; then $(CYGPATH_W) 'atf-run/timer.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/timer.cpp'; fi`
+
+atf-run/atf_run_atf_run-user.o: atf-run/user.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-user.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-user.Tpo -c -o atf-run/atf_run_atf_run-user.o `test -f 'atf-run/user.cpp' || echo '$(srcdir)/'`atf-run/user.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-user.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-user.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/user.cpp' object='atf-run/atf_run_atf_run-user.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-user.o `test -f 'atf-run/user.cpp' || echo '$(srcdir)/'`atf-run/user.cpp
+
+atf-run/atf_run_atf_run-user.obj: atf-run/user.cpp
+@am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-user.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-user.Tpo -c -o atf-run/atf_run_atf_run-user.obj `if test -f 'atf-run/user.cpp'; then $(CYGPATH_W) 'atf-run/user.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/user.cpp'; fi`
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-user.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-user.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/user.cpp' object='atf-run/atf_run_atf_run-user.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-user.obj `if test -f 'atf-run/user.cpp'; then $(CYGPATH_W) 'atf-run/user.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/user.cpp'; fi`
+
 atf-run/atf_run_atffile_test-atffile_test.o: atf-run/atffile_test.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atffile_test-atffile_test.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Tpo -c -o atf-run/atf_run_atffile_test-atffile_test.o `test -f 'atf-run/atffile_test.cpp' || echo '$(srcdir)/'`atf-run/atffile_test.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Tpo atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Tpo atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/atffile_test.cpp' object='atf-run/atf_run_atffile_test-atffile_test.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atffile_test-atffile_test.o `test -f 'atf-run/atffile_test.cpp' || echo '$(srcdir)/'`atf-run/atffile_test.cpp
 
 atf-run/atf_run_atffile_test-atffile_test.obj: atf-run/atffile_test.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atffile_test-atffile_test.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Tpo -c -o atf-run/atf_run_atffile_test-atffile_test.obj `if test -f 'atf-run/atffile_test.cpp'; then $(CYGPATH_W) 'atf-run/atffile_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atffile_test.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Tpo atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Tpo atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/atffile_test.cpp' object='atf-run/atf_run_atffile_test-atffile_test.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atffile_test-atffile_test.obj `if test -f 'atf-run/atffile_test.cpp'; then $(CYGPATH_W) 'atf-run/atffile_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atffile_test.cpp'; fi`
 
 atf-run/atf_run_atffile_test-atffile.o: atf-run/atffile.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atffile_test-atffile.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Tpo -c -o atf-run/atf_run_atffile_test-atffile.o `test -f 'atf-run/atffile.cpp' || echo '$(srcdir)/'`atf-run/atffile.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Tpo atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Tpo atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/atffile.cpp' object='atf-run/atf_run_atffile_test-atffile.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atffile_test-atffile.o `test -f 'atf-run/atffile.cpp' || echo '$(srcdir)/'`atf-run/atffile.cpp
 
 atf-run/atf_run_atffile_test-atffile.obj: atf-run/atffile.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atffile_test-atffile.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Tpo -c -o atf-run/atf_run_atffile_test-atffile.obj `if test -f 'atf-run/atffile.cpp'; then $(CYGPATH_W) 'atf-run/atffile.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atffile.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Tpo atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Tpo atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/atffile.cpp' object='atf-run/atf_run_atffile_test-atffile.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atffile_test-atffile.obj `if test -f 'atf-run/atffile.cpp'; then $(CYGPATH_W) 'atf-run/atffile.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atffile.cpp'; fi`
 
 atf-run/atf_run_config_test-config_test.o: atf-run/config_test.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_config_test-config_test.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_config_test-config_test.Tpo -c -o atf-run/atf_run_config_test-config_test.o `test -f 'atf-run/config_test.cpp' || echo '$(srcdir)/'`atf-run/config_test.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_config_test-config_test.Tpo atf-run/$(DEPDIR)/atf_run_config_test-config_test.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_config_test-config_test.Tpo atf-run/$(DEPDIR)/atf_run_config_test-config_test.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/config_test.cpp' object='atf-run/atf_run_config_test-config_test.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_config_test-config_test.o `test -f 'atf-run/config_test.cpp' || echo '$(srcdir)/'`atf-run/config_test.cpp
 
 atf-run/atf_run_config_test-config_test.obj: atf-run/config_test.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_config_test-config_test.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_config_test-config_test.Tpo -c -o atf-run/atf_run_config_test-config_test.obj `if test -f 'atf-run/config_test.cpp'; then $(CYGPATH_W) 'atf-run/config_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/config_test.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_config_test-config_test.Tpo atf-run/$(DEPDIR)/atf_run_config_test-config_test.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_config_test-config_test.Tpo atf-run/$(DEPDIR)/atf_run_config_test-config_test.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/config_test.cpp' object='atf-run/atf_run_config_test-config_test.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_config_test-config_test.obj `if test -f 'atf-run/config_test.cpp'; then $(CYGPATH_W) 'atf-run/config_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/config_test.cpp'; fi`
 
 atf-run/atf_run_config_test-config.o: atf-run/config.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_config_test-config.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_config_test-config.Tpo -c -o atf-run/atf_run_config_test-config.o `test -f 'atf-run/config.cpp' || echo '$(srcdir)/'`atf-run/config.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_config_test-config.Tpo atf-run/$(DEPDIR)/atf_run_config_test-config.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_config_test-config.Tpo atf-run/$(DEPDIR)/atf_run_config_test-config.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/config.cpp' object='atf-run/atf_run_config_test-config.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_config_test-config.o `test -f 'atf-run/config.cpp' || echo '$(srcdir)/'`atf-run/config.cpp
 
 atf-run/atf_run_config_test-config.obj: atf-run/config.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_config_test-config.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_config_test-config.Tpo -c -o atf-run/atf_run_config_test-config.obj `if test -f 'atf-run/config.cpp'; then $(CYGPATH_W) 'atf-run/config.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/config.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_config_test-config.Tpo atf-run/$(DEPDIR)/atf_run_config_test-config.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_config_test-config.Tpo atf-run/$(DEPDIR)/atf_run_config_test-config.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/config.cpp' object='atf-run/atf_run_config_test-config.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_config_test-config.obj `if test -f 'atf-run/config.cpp'; then $(CYGPATH_W) 'atf-run/config.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/config.cpp'; fi`
 
 atf-run/atf_run_test_program_test-test_program_test.o: atf-run/test_program_test.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-test_program_test.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Tpo -c -o atf-run/atf_run_test_program_test-test_program_test.o `test -f 'atf-run/test_program_test.cpp' || echo '$(srcdir)/'`atf-run/test_program_test.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/test_program_test.cpp' object='atf-run/atf_run_test_program_test-test_program_test.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-test_program_test.o `test -f 'atf-run/test_program_test.cpp' || echo '$(srcdir)/'`atf-run/test_program_test.cpp
 
 atf-run/atf_run_test_program_test-test_program_test.obj: atf-run/test_program_test.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-test_program_test.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Tpo -c -o atf-run/atf_run_test_program_test-test_program_test.obj `if test -f 'atf-run/test_program_test.cpp'; then $(CYGPATH_W) 'atf-run/test_program_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/test_program_test.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/test_program_test.cpp' object='atf-run/atf_run_test_program_test-test_program_test.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-test_program_test.obj `if test -f 'atf-run/test_program_test.cpp'; then $(CYGPATH_W) 'atf-run/test_program_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/test_program_test.cpp'; fi`
 
 atf-run/atf_run_test_program_test-fs.o: atf-run/fs.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-fs.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Tpo -c -o atf-run/atf_run_test_program_test-fs.o `test -f 'atf-run/fs.cpp' || echo '$(srcdir)/'`atf-run/fs.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/fs.cpp' object='atf-run/atf_run_test_program_test-fs.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-fs.o `test -f 'atf-run/fs.cpp' || echo '$(srcdir)/'`atf-run/fs.cpp
 
 atf-run/atf_run_test_program_test-fs.obj: atf-run/fs.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-fs.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Tpo -c -o atf-run/atf_run_test_program_test-fs.obj `if test -f 'atf-run/fs.cpp'; then $(CYGPATH_W) 'atf-run/fs.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/fs.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/fs.cpp' object='atf-run/atf_run_test_program_test-fs.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-fs.obj `if test -f 'atf-run/fs.cpp'; then $(CYGPATH_W) 'atf-run/fs.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/fs.cpp'; fi`
 
 atf-run/atf_run_test_program_test-io.o: atf-run/io.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-io.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-io.Tpo -c -o atf-run/atf_run_test_program_test-io.o `test -f 'atf-run/io.cpp' || echo '$(srcdir)/'`atf-run/io.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-io.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-io.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-io.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-io.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/io.cpp' object='atf-run/atf_run_test_program_test-io.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-io.o `test -f 'atf-run/io.cpp' || echo '$(srcdir)/'`atf-run/io.cpp
 
 atf-run/atf_run_test_program_test-io.obj: atf-run/io.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-io.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-io.Tpo -c -o atf-run/atf_run_test_program_test-io.obj `if test -f 'atf-run/io.cpp'; then $(CYGPATH_W) 'atf-run/io.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/io.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-io.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-io.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-io.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-io.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/io.cpp' object='atf-run/atf_run_test_program_test-io.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-io.obj `if test -f 'atf-run/io.cpp'; then $(CYGPATH_W) 'atf-run/io.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/io.cpp'; fi`
 
 atf-run/atf_run_test_program_test-requirements.o: atf-run/requirements.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-requirements.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Tpo -c -o atf-run/atf_run_test_program_test-requirements.o `test -f 'atf-run/requirements.cpp' || echo '$(srcdir)/'`atf-run/requirements.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/requirements.cpp' object='atf-run/atf_run_test_program_test-requirements.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-requirements.o `test -f 'atf-run/requirements.cpp' || echo '$(srcdir)/'`atf-run/requirements.cpp
 
 atf-run/atf_run_test_program_test-requirements.obj: atf-run/requirements.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-requirements.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Tpo -c -o atf-run/atf_run_test_program_test-requirements.obj `if test -f 'atf-run/requirements.cpp'; then $(CYGPATH_W) 'atf-run/requirements.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/requirements.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/requirements.cpp' object='atf-run/atf_run_test_program_test-requirements.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-requirements.obj `if test -f 'atf-run/requirements.cpp'; then $(CYGPATH_W) 'atf-run/requirements.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/requirements.cpp'; fi`
 
 atf-run/atf_run_test_program_test-signals.o: atf-run/signals.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-signals.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Tpo -c -o atf-run/atf_run_test_program_test-signals.o `test -f 'atf-run/signals.cpp' || echo '$(srcdir)/'`atf-run/signals.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/signals.cpp' object='atf-run/atf_run_test_program_test-signals.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-signals.o `test -f 'atf-run/signals.cpp' || echo '$(srcdir)/'`atf-run/signals.cpp
 
 atf-run/atf_run_test_program_test-signals.obj: atf-run/signals.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-signals.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Tpo -c -o atf-run/atf_run_test_program_test-signals.obj `if test -f 'atf-run/signals.cpp'; then $(CYGPATH_W) 'atf-run/signals.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/signals.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/signals.cpp' object='atf-run/atf_run_test_program_test-signals.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-signals.obj `if test -f 'atf-run/signals.cpp'; then $(CYGPATH_W) 'atf-run/signals.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/signals.cpp'; fi`
 
 atf-run/atf_run_test_program_test-test-program.o: atf-run/test-program.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-test-program.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Tpo -c -o atf-run/atf_run_test_program_test-test-program.o `test -f 'atf-run/test-program.cpp' || echo '$(srcdir)/'`atf-run/test-program.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/test-program.cpp' object='atf-run/atf_run_test_program_test-test-program.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-test-program.o `test -f 'atf-run/test-program.cpp' || echo '$(srcdir)/'`atf-run/test-program.cpp
 
 atf-run/atf_run_test_program_test-test-program.obj: atf-run/test-program.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-test-program.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Tpo -c -o atf-run/atf_run_test_program_test-test-program.obj `if test -f 'atf-run/test-program.cpp'; then $(CYGPATH_W) 'atf-run/test-program.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/test-program.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/test-program.cpp' object='atf-run/atf_run_test_program_test-test-program.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-test-program.obj `if test -f 'atf-run/test-program.cpp'; then $(CYGPATH_W) 'atf-run/test-program.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/test-program.cpp'; fi`
 
 atf-run/atf_run_test_program_test-timer.o: atf-run/timer.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-timer.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Tpo -c -o atf-run/atf_run_test_program_test-timer.o `test -f 'atf-run/timer.cpp' || echo '$(srcdir)/'`atf-run/timer.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/timer.cpp' object='atf-run/atf_run_test_program_test-timer.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-timer.o `test -f 'atf-run/timer.cpp' || echo '$(srcdir)/'`atf-run/timer.cpp
 
 atf-run/atf_run_test_program_test-timer.obj: atf-run/timer.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-timer.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Tpo -c -o atf-run/atf_run_test_program_test-timer.obj `if test -f 'atf-run/timer.cpp'; then $(CYGPATH_W) 'atf-run/timer.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/timer.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/timer.cpp' object='atf-run/atf_run_test_program_test-timer.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-timer.obj `if test -f 'atf-run/timer.cpp'; then $(CYGPATH_W) 'atf-run/timer.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/timer.cpp'; fi`
 
 atf-run/atf_run_test_program_test-user.o: atf-run/user.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-user.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-user.Tpo -c -o atf-run/atf_run_test_program_test-user.o `test -f 'atf-run/user.cpp' || echo '$(srcdir)/'`atf-run/user.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-user.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-user.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-user.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-user.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/user.cpp' object='atf-run/atf_run_test_program_test-user.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-user.o `test -f 'atf-run/user.cpp' || echo '$(srcdir)/'`atf-run/user.cpp
 
 atf-run/atf_run_test_program_test-user.obj: atf-run/user.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-user.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-user.Tpo -c -o atf-run/atf_run_test_program_test-user.obj `if test -f 'atf-run/user.cpp'; then $(CYGPATH_W) 'atf-run/user.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/user.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-run/$(DEPDIR)/atf_run_test_program_test-user.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-user.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-user.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-user.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-run/user.cpp' object='atf-run/atf_run_test_program_test-user.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-user.obj `if test -f 'atf-run/user.cpp'; then $(CYGPATH_W) 'atf-run/user.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/user.cpp'; fi`
 
 atf-version/atf_version_atf_version-atf-version.o: atf-version/atf-version.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_version_atf_version_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-version/atf_version_atf_version-atf-version.o -MD -MP -MF atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Tpo -c -o atf-version/atf_version_atf_version-atf-version.o `test -f 'atf-version/atf-version.cpp' || echo '$(srcdir)/'`atf-version/atf-version.cpp
-@am__fastdepCXX_TRUE@  mv -f atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Tpo atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Tpo atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-version/atf-version.cpp' object='atf-version/atf_version_atf_version-atf-version.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_version_atf_version_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-version/atf_version_atf_version-atf-version.o `test -f 'atf-version/atf-version.cpp' || echo '$(srcdir)/'`atf-version/atf-version.cpp
 
 atf-version/atf_version_atf_version-atf-version.obj: atf-version/atf-version.cpp
 @am__fastdepCXX_TRUE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_version_atf_version_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-version/atf_version_atf_version-atf-version.obj -MD -MP -MF atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Tpo -c -o atf-version/atf_version_atf_version-atf-version.obj `if test -f 'atf-version/atf-version.cpp'; then $(CYGPATH_W) 'atf-version/atf-version.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-version/atf-version.cpp'; fi`
-@am__fastdepCXX_TRUE@  mv -f atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Tpo atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Po
+@am__fastdepCXX_TRUE@  $(am__mv) atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Tpo atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='atf-version/atf-version.cpp' object='atf-version/atf_version_atf_version-atf-version.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_version_atf_version_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-version/atf_version_atf_version-atf-version.obj `if test -f 'atf-version/atf-version.cpp'; then $(CYGPATH_W) 'atf-version/atf-version.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-version/atf-version.cpp'; fi`
@@ -3363,620 +3842,740 @@ clean-libtool:
        -rm -rf test-programs/.libs test-programs/_libs
 
 distclean-libtool:
-       -rm -f libtool
-install-man1: $(man1_MANS) $(man_MANS)
+       -rm -f libtool config.lt
+install-man1: $(dist_man_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
-       @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.1*) list="$$list $$i" ;; \
-         esac; \
+       @list1=''; \
+       list2='$(dist_man_MANS) $(man_MANS)'; \
+       test -n "$(man1dir)" \
+         && test -n "`echo $$list1$$list2`" \
+         || exit 0; \
+       echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+       $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+       { for i in $$list1; do echo "$$i"; done;  \
+       if test -n "$$list2"; then \
+         for i in $$list2; do echo "$$i"; done \
+           | sed -n '/\.1[a-z]*$$/p'; \
+       fi; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+         fi; \
        done; \
-       for i in $$list; do \
-         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-         else file=$$i; fi; \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           1*) ;; \
-           *) ext='1' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
-         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
-       done
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+       done; }
+
 uninstall-man1:
        @$(NORMAL_UNINSTALL)
-       @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.1*) list="$$list $$i" ;; \
-         esac; \
-       done; \
-       for i in $$list; do \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           1*) ;; \
-           *) ext='1' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
-         rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
-       done
-install-man3: $(man3_MANS) $(man_MANS)
+       @list=''; test -n "$(man1dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.1[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+install-man3: $(dist_man_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
-       @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.3*) list="$$list $$i" ;; \
-         esac; \
+       @list1=''; \
+       list2='$(dist_man_MANS) $(man_MANS)'; \
+       test -n "$(man3dir)" \
+         && test -n "`echo $$list1$$list2`" \
+         || exit 0; \
+       echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
+       $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
+       { for i in $$list1; do echo "$$i"; done;  \
+       if test -n "$$list2"; then \
+         for i in $$list2; do echo "$$i"; done \
+           | sed -n '/\.3[a-z]*$$/p'; \
+       fi; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
+         fi; \
        done; \
-       for i in $$list; do \
-         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-         else file=$$i; fi; \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           3*) ;; \
-           *) ext='3' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
-         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
-       done
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
+       done; }
+
 uninstall-man3:
        @$(NORMAL_UNINSTALL)
-       @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.3*) list="$$list $$i" ;; \
-         esac; \
-       done; \
-       for i in $$list; do \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           3*) ;; \
-           *) ext='3' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
-         rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
-       done
-install-man4: $(man4_MANS) $(man_MANS)
+       @list=''; test -n "$(man3dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.3[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
+install-man4: $(dist_man_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man4dir)" || $(MKDIR_P) "$(DESTDIR)$(man4dir)"
-       @list='$(man4_MANS) $(dist_man4_MANS) $(nodist_man4_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.4*) list="$$list $$i" ;; \
-         esac; \
+       @list1=''; \
+       list2='$(dist_man_MANS) $(man_MANS)'; \
+       test -n "$(man4dir)" \
+         && test -n "`echo $$list1$$list2`" \
+         || exit 0; \
+       echo " $(MKDIR_P) '$(DESTDIR)$(man4dir)'"; \
+       $(MKDIR_P) "$(DESTDIR)$(man4dir)" || exit 1; \
+       { for i in $$list1; do echo "$$i"; done;  \
+       if test -n "$$list2"; then \
+         for i in $$list2; do echo "$$i"; done \
+           | sed -n '/\.4[a-z]*$$/p'; \
+       fi; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man4dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man4dir)/$$inst" || exit $$?; \
+         fi; \
        done; \
-       for i in $$list; do \
-         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-         else file=$$i; fi; \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           4*) ;; \
-           *) ext='4' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man4dir)/$$inst'"; \
-         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man4dir)/$$inst"; \
-       done
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man4dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man4dir)" || exit $$?; }; \
+       done; }
+
 uninstall-man4:
        @$(NORMAL_UNINSTALL)
-       @list='$(man4_MANS) $(dist_man4_MANS) $(nodist_man4_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.4*) list="$$list $$i" ;; \
-         esac; \
-       done; \
-       for i in $$list; do \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           4*) ;; \
-           *) ext='4' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " rm -f '$(DESTDIR)$(man4dir)/$$inst'"; \
-         rm -f "$(DESTDIR)$(man4dir)/$$inst"; \
-       done
-install-man5: $(man5_MANS) $(man_MANS)
+       @list=''; test -n "$(man4dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.4[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^4][0-9a-z]*$$,4,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       dir='$(DESTDIR)$(man4dir)'; $(am__uninstall_files_from_dir)
+install-man5: $(dist_man_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
-       @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.5*) list="$$list $$i" ;; \
-         esac; \
+       @list1=''; \
+       list2='$(dist_man_MANS) $(man_MANS)'; \
+       test -n "$(man5dir)" \
+         && test -n "`echo $$list1$$list2`" \
+         || exit 0; \
+       echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
+       $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
+       { for i in $$list1; do echo "$$i"; done;  \
+       if test -n "$$list2"; then \
+         for i in $$list2; do echo "$$i"; done \
+           | sed -n '/\.5[a-z]*$$/p'; \
+       fi; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
+         fi; \
        done; \
-       for i in $$list; do \
-         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-         else file=$$i; fi; \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           5*) ;; \
-           *) ext='5' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
-         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \
-       done
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
+       done; }
+
 uninstall-man5:
        @$(NORMAL_UNINSTALL)
-       @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.5*) list="$$list $$i" ;; \
-         esac; \
-       done; \
-       for i in $$list; do \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           5*) ;; \
-           *) ext='5' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \
-         rm -f "$(DESTDIR)$(man5dir)/$$inst"; \
-       done
-install-man7: $(man7_MANS) $(man_MANS)
+       @list=''; test -n "$(man5dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.5[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
+install-man7: $(dist_man_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
-       test -z "$(man7dir)" || $(MKDIR_P) "$(DESTDIR)$(man7dir)"
-       @list='$(man7_MANS) $(dist_man7_MANS) $(nodist_man7_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.7*) list="$$list $$i" ;; \
-         esac; \
+       @list1=''; \
+       list2='$(dist_man_MANS) $(man_MANS)'; \
+       test -n "$(man7dir)" \
+         && test -n "`echo $$list1$$list2`" \
+         || exit 0; \
+       echo " $(MKDIR_P) '$(DESTDIR)$(man7dir)'"; \
+       $(MKDIR_P) "$(DESTDIR)$(man7dir)" || exit 1; \
+       { for i in $$list1; do echo "$$i"; done;  \
+       if test -n "$$list2"; then \
+         for i in $$list2; do echo "$$i"; done \
+           | sed -n '/\.7[a-z]*$$/p'; \
+       fi; \
+       } | while read p; do \
+         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; echo "$$p"; \
+       done | \
+       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^7][0-9a-z]*$$,7,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+       sed 'N;N;s,\n, ,g' | { \
+       list=; while read file base inst; do \
+         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man7dir)/$$inst'"; \
+           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man7dir)/$$inst" || exit $$?; \
+         fi; \
        done; \
-       for i in $$list; do \
-         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-         else file=$$i; fi; \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           7*) ;; \
-           *) ext='7' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man7dir)/$$inst'"; \
-         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man7dir)/$$inst"; \
-       done
+       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+       while read files; do \
+         test -z "$$files" || { \
+           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man7dir)'"; \
+           $(INSTALL_DATA) $$files "$(DESTDIR)$(man7dir)" || exit $$?; }; \
+       done; }
+
 uninstall-man7:
        @$(NORMAL_UNINSTALL)
-       @list='$(man7_MANS) $(dist_man7_MANS) $(nodist_man7_MANS)'; \
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
-           *.7*) list="$$list $$i" ;; \
-         esac; \
-       done; \
-       for i in $$list; do \
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           7*) ;; \
-           *) ext='7' ;; \
-         esac; \
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " rm -f '$(DESTDIR)$(man7dir)/$$inst'"; \
-         rm -f "$(DESTDIR)$(man7dir)/$$inst"; \
+       @list=''; test -n "$(man7dir)" || exit 0; \
+       files=`{ for i in $$list; do echo "$$i"; done; \
+       l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+         sed -n '/\.7[a-z]*$$/p'; \
+       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^7][0-9a-z]*$$,7,;x' \
+             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+       dir='$(DESTDIR)$(man7dir)'; $(am__uninstall_files_from_dir)
+install-atf_aclocalDATA: $(atf_aclocal_DATA)
+       @$(NORMAL_INSTALL)
+       @list='$(atf_aclocal_DATA)'; test -n "$(atf_aclocaldir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(atf_aclocaldir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(atf_aclocaldir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(atf_aclocaldir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(atf_aclocaldir)" || exit $$?; \
        done
+
+uninstall-atf_aclocalDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(atf_aclocal_DATA)'; test -n "$(atf_aclocaldir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(atf_aclocaldir)'; $(am__uninstall_files_from_dir)
 install-atf_c__dirpkgconfigDATA: $(atf_c__dirpkgconfig_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(atf_c__dirpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_c__dirpkgconfigdir)"
-       @list='$(atf_c__dirpkgconfig_DATA)'; for p in $$list; do \
+       @list='$(atf_c__dirpkgconfig_DATA)'; test -n "$(atf_c__dirpkgconfigdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(atf_c__dirpkgconfigdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(atf_c__dirpkgconfigdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(atf_c__dirpkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_c__dirpkgconfigdir)/$$f'"; \
-         $(atf_c__dirpkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_c__dirpkgconfigdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(atf_c__dirpkgconfigdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(atf_c__dirpkgconfigdir)" || exit $$?; \
        done
 
 uninstall-atf_c__dirpkgconfigDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(atf_c__dirpkgconfig_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(atf_c__dirpkgconfigdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(atf_c__dirpkgconfigdir)/$$f"; \
-       done
+       @list='$(atf_c__dirpkgconfig_DATA)'; test -n "$(atf_c__dirpkgconfigdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(atf_c__dirpkgconfigdir)'; $(am__uninstall_files_from_dir)
 install-atf_cpkgconfigDATA: $(atf_cpkgconfig_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(atf_cpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_cpkgconfigdir)"
-       @list='$(atf_cpkgconfig_DATA)'; for p in $$list; do \
+       @list='$(atf_cpkgconfig_DATA)'; test -n "$(atf_cpkgconfigdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(atf_cpkgconfigdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(atf_cpkgconfigdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(atf_cpkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_cpkgconfigdir)/$$f'"; \
-         $(atf_cpkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_cpkgconfigdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(atf_cpkgconfigdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(atf_cpkgconfigdir)" || exit $$?; \
        done
 
 uninstall-atf_cpkgconfigDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(atf_cpkgconfig_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(atf_cpkgconfigdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(atf_cpkgconfigdir)/$$f"; \
-       done
+       @list='$(atf_cpkgconfig_DATA)'; test -n "$(atf_cpkgconfigdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(atf_cpkgconfigdir)'; $(am__uninstall_files_from_dir)
 install-atf_shDATA: $(atf_sh_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(atf_shdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_shdir)"
-       @list='$(atf_sh_DATA)'; for p in $$list; do \
+       @list='$(atf_sh_DATA)'; test -n "$(atf_shdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(atf_shdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(atf_shdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(atf_shDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_shdir)/$$f'"; \
-         $(atf_shDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_shdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(atf_shdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(atf_shdir)" || exit $$?; \
        done
 
 uninstall-atf_shDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(atf_sh_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(atf_shdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(atf_shdir)/$$f"; \
+       @list='$(atf_sh_DATA)'; test -n "$(atf_shdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(atf_shdir)'; $(am__uninstall_files_from_dir)
+install-atf_shpkgconfigDATA: $(atf_shpkgconfig_DATA)
+       @$(NORMAL_INSTALL)
+       @list='$(atf_shpkgconfig_DATA)'; test -n "$(atf_shpkgconfigdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(atf_shpkgconfigdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(atf_shpkgconfigdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(atf_shpkgconfigdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(atf_shpkgconfigdir)" || exit $$?; \
        done
+
+uninstall-atf_shpkgconfigDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(atf_shpkgconfig_DATA)'; test -n "$(atf_shpkgconfigdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(atf_shpkgconfigdir)'; $(am__uninstall_files_from_dir)
 install-cssDATA: $(css_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(cssdir)" || $(MKDIR_P) "$(DESTDIR)$(cssdir)"
-       @list='$(css_DATA)'; for p in $$list; do \
+       @list='$(css_DATA)'; test -n "$(cssdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(cssdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(cssdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(cssDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(cssdir)/$$f'"; \
-         $(cssDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(cssdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cssdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(cssdir)" || exit $$?; \
        done
 
 uninstall-cssDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(css_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(cssdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(cssdir)/$$f"; \
-       done
+       @list='$(css_DATA)'; test -n "$(cssdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(cssdir)'; $(am__uninstall_files_from_dir)
 install-docDATA: $(doc_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
-       @list='$(doc_DATA)'; for p in $$list; do \
+       @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
-         $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
        done
 
 uninstall-docDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(doc_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(docdir)/$$f"; \
-       done
+       @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
 install-dtdDATA: $(dtd_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(dtddir)" || $(MKDIR_P) "$(DESTDIR)$(dtddir)"
-       @list='$(dtd_DATA)'; for p in $$list; do \
+       @list='$(dtd_DATA)'; test -n "$(dtddir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(dtddir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(dtddir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(dtdDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(dtddir)/$$f'"; \
-         $(dtdDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(dtddir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dtddir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(dtddir)" || exit $$?; \
        done
 
 uninstall-dtdDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(dtd_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(dtddir)/$$f'"; \
-         rm -f "$(DESTDIR)$(dtddir)/$$f"; \
-       done
+       @list='$(dtd_DATA)'; test -n "$(dtddir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(dtddir)'; $(am__uninstall_files_from_dir)
 install-egDATA: $(eg_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(egdir)" || $(MKDIR_P) "$(DESTDIR)$(egdir)"
-       @list='$(eg_DATA)'; for p in $$list; do \
+       @list='$(eg_DATA)'; test -n "$(egdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(egdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(egdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(egDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(egdir)/$$f'"; \
-         $(egDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(egdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(egdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(egdir)" || exit $$?; \
        done
 
 uninstall-egDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(eg_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(egdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(egdir)/$$f"; \
-       done
+       @list='$(eg_DATA)'; test -n "$(egdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(egdir)'; $(am__uninstall_files_from_dir)
 install-hooksDATA: $(hooks_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(hooksdir)" || $(MKDIR_P) "$(DESTDIR)$(hooksdir)"
-       @list='$(hooks_DATA)'; for p in $$list; do \
+       @list='$(hooks_DATA)'; test -n "$(hooksdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(hooksdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(hooksdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(hooksDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(hooksdir)/$$f'"; \
-         $(hooksDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(hooksdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(hooksdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(hooksdir)" || exit $$?; \
        done
 
 uninstall-hooksDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(hooks_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(hooksdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(hooksdir)/$$f"; \
-       done
+       @list='$(hooks_DATA)'; test -n "$(hooksdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(hooksdir)'; $(am__uninstall_files_from_dir)
 install-pkgtestsDATA: $(pkgtests_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(pkgtestsdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgtestsdir)"
-       @list='$(pkgtests_DATA)'; for p in $$list; do \
+       @list='$(pkgtests_DATA)'; test -n "$(pkgtestsdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(pkgtestsdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(pkgtestsdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(pkgtestsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgtestsdir)/$$f'"; \
-         $(pkgtestsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgtestsdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgtestsdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgtestsdir)" || exit $$?; \
        done
 
 uninstall-pkgtestsDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(pkgtests_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(pkgtestsdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(pkgtestsdir)/$$f"; \
-       done
+       @list='$(pkgtests_DATA)'; test -n "$(pkgtestsdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(pkgtestsdir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_cDATA: $(tests_atf_c_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_cdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_cdir)"
-       @list='$(tests_atf_c_DATA)'; for p in $$list; do \
+       @list='$(tests_atf_c_DATA)'; test -n "$(tests_atf_cdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_cdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_cdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(tests_atf_cDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_cdir)/$$f'"; \
-         $(tests_atf_cDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_cdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_atf_cdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_atf_cdir)" || exit $$?; \
        done
 
 uninstall-tests_atf_cDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_c_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(tests_atf_cdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_cdir)/$$f"; \
-       done
+       @list='$(tests_atf_c_DATA)'; test -n "$(tests_atf_cdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(tests_atf_cdir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_c__DATA: $(tests_atf_c___DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_c__dir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_c__dir)"
-       @list='$(tests_atf_c___DATA)'; for p in $$list; do \
+       @list='$(tests_atf_c___DATA)'; test -n "$(tests_atf_c__dir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_c__dir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_c__dir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(tests_atf_c__DATA_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_c__dir)/$$f'"; \
-         $(tests_atf_c__DATA_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_c__dir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_atf_c__dir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_atf_c__dir)" || exit $$?; \
        done
 
 uninstall-tests_atf_c__DATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_c___DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(tests_atf_c__dir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_c__dir)/$$f"; \
-       done
+       @list='$(tests_atf_c___DATA)'; test -n "$(tests_atf_c__dir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(tests_atf_c__dir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_c___detailDATA: $(tests_atf_c___detail_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_c___detaildir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_c___detaildir)"
-       @list='$(tests_atf_c___detail_DATA)'; for p in $$list; do \
+       @list='$(tests_atf_c___detail_DATA)'; test -n "$(tests_atf_c___detaildir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_c___detaildir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_c___detaildir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(tests_atf_c___detailDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_c___detaildir)/$$f'"; \
-         $(tests_atf_c___detailDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_c___detaildir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_atf_c___detaildir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_atf_c___detaildir)" || exit $$?; \
        done
 
 uninstall-tests_atf_c___detailDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_c___detail_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(tests_atf_c___detaildir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_c___detaildir)/$$f"; \
-       done
+       @list='$(tests_atf_c___detail_DATA)'; test -n "$(tests_atf_c___detaildir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(tests_atf_c___detaildir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_c_detailDATA: $(tests_atf_c_detail_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_c_detaildir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_c_detaildir)"
-       @list='$(tests_atf_c_detail_DATA)'; for p in $$list; do \
+       @list='$(tests_atf_c_detail_DATA)'; test -n "$(tests_atf_c_detaildir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_c_detaildir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_c_detaildir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(tests_atf_c_detailDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_c_detaildir)/$$f'"; \
-         $(tests_atf_c_detailDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_c_detaildir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_atf_c_detaildir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_atf_c_detaildir)" || exit $$?; \
        done
 
 uninstall-tests_atf_c_detailDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_c_detail_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(tests_atf_c_detaildir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_c_detaildir)/$$f"; \
-       done
+       @list='$(tests_atf_c_detail_DATA)'; test -n "$(tests_atf_c_detaildir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(tests_atf_c_detaildir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_configDATA: $(tests_atf_config_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_configdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_configdir)"
-       @list='$(tests_atf_config_DATA)'; for p in $$list; do \
+       @list='$(tests_atf_config_DATA)'; test -n "$(tests_atf_configdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_configdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_configdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(tests_atf_configDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_configdir)/$$f'"; \
-         $(tests_atf_configDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_configdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_atf_configdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_atf_configdir)" || exit $$?; \
        done
 
 uninstall-tests_atf_configDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_config_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(tests_atf_configdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_configdir)/$$f"; \
-       done
+       @list='$(tests_atf_config_DATA)'; test -n "$(tests_atf_configdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(tests_atf_configdir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_reportDATA: $(tests_atf_report_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_reportdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_reportdir)"
-       @list='$(tests_atf_report_DATA)'; for p in $$list; do \
+       @list='$(tests_atf_report_DATA)'; test -n "$(tests_atf_reportdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_reportdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_reportdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(tests_atf_reportDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_reportdir)/$$f'"; \
-         $(tests_atf_reportDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_reportdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_atf_reportdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_atf_reportdir)" || exit $$?; \
        done
 
 uninstall-tests_atf_reportDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_report_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(tests_atf_reportdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_reportdir)/$$f"; \
-       done
+       @list='$(tests_atf_report_DATA)'; test -n "$(tests_atf_reportdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(tests_atf_reportdir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_runDATA: $(tests_atf_run_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_rundir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_rundir)"
-       @list='$(tests_atf_run_DATA)'; for p in $$list; do \
+       @list='$(tests_atf_run_DATA)'; test -n "$(tests_atf_rundir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_rundir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_rundir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(tests_atf_runDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_rundir)/$$f'"; \
-         $(tests_atf_runDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_rundir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_atf_rundir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_atf_rundir)" || exit $$?; \
        done
 
 uninstall-tests_atf_runDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_run_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(tests_atf_rundir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_rundir)/$$f"; \
-       done
+       @list='$(tests_atf_run_DATA)'; test -n "$(tests_atf_rundir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(tests_atf_rundir)'; $(am__uninstall_files_from_dir)
 install-tests_atf_shDATA: $(tests_atf_sh_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_atf_shdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_atf_shdir)"
-       @list='$(tests_atf_sh_DATA)'; for p in $$list; do \
+       @list='$(tests_atf_sh_DATA)'; test -n "$(tests_atf_shdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_shdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_atf_shdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(tests_atf_shDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_atf_shdir)/$$f'"; \
-         $(tests_atf_shDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_atf_shdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_atf_shdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_atf_shdir)" || exit $$?; \
        done
 
 uninstall-tests_atf_shDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_atf_sh_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(tests_atf_shdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_atf_shdir)/$$f"; \
-       done
+       @list='$(tests_atf_sh_DATA)'; test -n "$(tests_atf_shdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(tests_atf_shdir)'; $(am__uninstall_files_from_dir)
 install-tests_test_programsDATA: $(tests_test_programs_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(tests_test_programsdir)" || $(MKDIR_P) "$(DESTDIR)$(tests_test_programsdir)"
-       @list='$(tests_test_programs_DATA)'; for p in $$list; do \
+       @list='$(tests_test_programs_DATA)'; test -n "$(tests_test_programsdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(tests_test_programsdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(tests_test_programsdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(tests_test_programsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(tests_test_programsdir)/$$f'"; \
-         $(tests_test_programsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(tests_test_programsdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_test_programsdir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_test_programsdir)" || exit $$?; \
        done
 
 uninstall-tests_test_programsDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(tests_test_programs_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(tests_test_programsdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(tests_test_programsdir)/$$f"; \
-       done
+       @list='$(tests_test_programs_DATA)'; test -n "$(tests_test_programsdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(tests_test_programsdir)'; $(am__uninstall_files_from_dir)
 install-xslDATA: $(xsl_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(xsldir)" || $(MKDIR_P) "$(DESTDIR)$(xsldir)"
-       @list='$(xsl_DATA)'; for p in $$list; do \
+       @list='$(xsl_DATA)'; test -n "$(xsldir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(xsldir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(xsldir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(xslDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(xsldir)/$$f'"; \
-         $(xslDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(xsldir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xsldir)'"; \
+         $(INSTALL_DATA) $$files "$(DESTDIR)$(xsldir)" || exit $$?; \
        done
 
 uninstall-xslDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(xsl_DATA)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(xsldir)/$$f'"; \
-         rm -f "$(DESTDIR)$(xsldir)/$$f"; \
-       done
+       @list='$(xsl_DATA)'; test -n "$(xsldir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(xsldir)'; $(am__uninstall_files_from_dir)
 install-atf_cHEADERS: $(atf_c_HEADERS)
        @$(NORMAL_INSTALL)
-       test -z "$(atf_cdir)" || $(MKDIR_P) "$(DESTDIR)$(atf_cdir)"
-       @list='$(atf_c_HEADERS)'; for p in $$list; do \
+       @list='$(atf_c_HEADERS)'; test -n "$(atf_cdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(atf_cdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(atf_cdir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(atf_cHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_cdir)/$$f'"; \
-         $(atf_cHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_cdir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(atf_cdir)'"; \
+         $(INSTALL_HEADER) $$files "$(DESTDIR)$(atf_cdir)" || exit $$?; \
        done
 
 uninstall-atf_cHEADERS:
        @$(NORMAL_UNINSTALL)
-       @list='$(atf_c_HEADERS)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(atf_cdir)/$$f'"; \
-         rm -f "$(DESTDIR)$(atf_cdir)/$$f"; \
-       done
+       @list='$(atf_c_HEADERS)'; test -n "$(atf_cdir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(atf_cdir)'; $(am__uninstall_files_from_dir)
 install-atf_c__HEADERS: $(atf_c___HEADERS)
        @$(NORMAL_INSTALL)
-       test -z "$(atf_c__dir)" || $(MKDIR_P) "$(DESTDIR)$(atf_c__dir)"
-       @list='$(atf_c___HEADERS)'; for p in $$list; do \
+       @list='$(atf_c___HEADERS)'; test -n "$(atf_c__dir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(atf_c__dir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(atf_c__dir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(atf_c__HEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(atf_c__dir)/$$f'"; \
-         $(atf_c__HEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(atf_c__dir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(atf_c__dir)'"; \
+         $(INSTALL_HEADER) $$files "$(DESTDIR)$(atf_c__dir)" || exit $$?; \
        done
 
 uninstall-atf_c__HEADERS:
        @$(NORMAL_UNINSTALL)
-       @list='$(atf_c___HEADERS)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(atf_c__dir)/$$f'"; \
-         rm -f "$(DESTDIR)$(atf_c__dir)/$$f"; \
-       done
+       @list='$(atf_c___HEADERS)'; test -n "$(atf_c__dir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(atf_c__dir)'; $(am__uninstall_files_from_dir)
 install-includeHEADERS: $(include_HEADERS)
        @$(NORMAL_INSTALL)
-       test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
-       @list='$(include_HEADERS)'; for p in $$list; do \
+       @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
-         $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+         echo "$$d$$p"; \
+       done | $(am__base_list) | \
+       while read files; do \
+         echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+         $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
        done
 
 uninstall-includeHEADERS:
        @$(NORMAL_UNINSTALL)
-       @list='$(include_HEADERS)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
-         rm -f "$(DESTDIR)$(includedir)/$$f"; \
-       done
+       @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+       dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
-         $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
              END { if (nonempty) { for (i in files) print i; }; }'`; \
        mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES) bconfig.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
+       set x; \
        here=`pwd`; \
        list='$(SOURCES) $(HEADERS) bconfig.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
@@ -3984,32 +4583,61 @@ TAGS:  $(HEADERS) $(SOURCES) bconfig.h.in $(TAGS_DEPENDENCIES) \
          done | \
          $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
              END { if (nonempty) { for (i in files) print i; }; }'`; \
-       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
-         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-           $$tags $$unique; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
        fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES) bconfig.h.in $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
-       tags=; \
        list='$(SOURCES) $(HEADERS) bconfig.h.in $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
          $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
              END { if (nonempty) { for (i in files) print i; }; }'`; \
-       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+       test -z "$(CTAGS_ARGS)$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-            $$tags $$unique
+            $$unique
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $(GTAGS_ARGS) $$here
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscope: cscope.files
+       test ! -s cscope.files \
+         || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+
+clean-cscope:
+       -rm -f cscope.files
+
+cscope.files: clean-cscope  cscopelist
+
+cscopelist:  $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+       -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
 distdir: $(DISTFILES)
        @case `sed 15q $(srcdir)/NEWS` in \
@@ -4018,8 +4646,21 @@ distdir: $(DISTFILES)
          echo "NEWS not updated; not releasing" 1>&2; \
          exit 1;; \
        esac
+       @list='$(MANS)'; if test -n "$$list"; then \
+         list=`for p in $$list; do \
+           if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+           if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+         if test -n "$$list" && \
+           grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+           echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
+           grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+           echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+           echo "       typically 'make maintainer-clean' will remove them" >&2; \
+           exit 1; \
+         else :; fi; \
+       else :; fi
        $(am__remove_distdir)
-       test -d $(distdir) || mkdir $(distdir)
+       test -d "$(distdir)" || mkdir "$(distdir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        list='$(DISTFILES)'; \
@@ -4035,52 +4676,62 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
            fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
            || exit 1; \
          fi; \
        done
        $(MAKE) $(AM_MAKEFLAGS) \
          top_distdir="$(top_distdir)" distdir="$(distdir)" \
          dist-hook
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+       -test -n "$(am__skip_mode_fix)" \
+       || find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
+       || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-bzip2: distdir
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
+       tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+       $(am__post_remove_distdir)
 
-dist-lzma: distdir
-       tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-       $(am__remove_distdir)
+dist-lzip: distdir
+       tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+       $(am__post_remove_distdir)
+
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+       $(am__post_remove_distdir)
 
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-shar: distdir
        shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-zip: distdir
        -rm -f $(distdir).zip
        zip -rq $(distdir).zip $(distdir)
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
-dist dist-all: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
+dist dist-all:
+       $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+       $(am__post_remove_distdir)
 
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
@@ -4088,26 +4739,31 @@ dist dist-all: distdir
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
-         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
-       *.tar.lzma*) \
-         unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+         bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.lz*) \
+         lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       chmod -R a-w $(distdir); chmod u+w $(distdir)
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
        chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-         && cd $(distdir)/_build \
+         && am__cwd=`pwd` \
+         && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -4128,14 +4784,24 @@ distcheck: dist
          && rm -rf "$$dc_destdir" \
          && $(MAKE) $(AM_MAKEFLAGS) dist \
          && rm -rf $(DIST_ARCHIVES) \
-         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
-       $(am__remove_distdir)
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+         && cd "$$am__cwd" \
+         || exit 1
+       $(am__post_remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-       @cd $(distuninstallcheck_dir) \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+       @test -n '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: trying to run $@ with an empty' \
+              '$$(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       $(am__cd) '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
                  echo "  (check DESTDIR support)"; \
@@ -4160,7 +4826,7 @@ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \
 install-binPROGRAMS: install-libLTLIBRARIES
 
 installdirs:
-       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_c___detaildir)" "$(DESTDIR)$(tests_atf_c_detaildir)" "$(DESTDIR)$(tests_atf_reportdir)" "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_configdir)" "$(DESTDIR)$(tests_atf_reportdir)" "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_atf_shdir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(atf_c__dirpkgconfigdir)" "$(DESTDIR)$(atf_cpkgconfigdir)" "$(DESTDIR)$(atf_shdir)" "$(DESTDIR)$(cssdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(dtddir)" "$(DESTDIR)$(egdir)" "$(DESTDIR)$(hooksdir)" "$(DESTDIR)$(pkgtestsdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_c___detaildir)" "$(DESTDIR)$(tests_atf_c_detaildir)" "$(DESTDIR)$(tests_atf_configdir)" "$(DESTDIR)$(tests_atf_reportdir)" "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_atf_shdir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(xsldir)" "$(DESTDIR)$(atf_cdir)" "$(DESTDIR)$(atf_c__dir)" "$(DESTDIR)$(includedir)"; do \
+       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_c___detaildir)" "$(DESTDIR)$(tests_atf_c_detaildir)" "$(DESTDIR)$(tests_atf_reportdir)" "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_configdir)" "$(DESTDIR)$(tests_atf_reportdir)" "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_atf_shdir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(atf_aclocaldir)" "$(DESTDIR)$(atf_c__dirpkgconfigdir)" "$(DESTDIR)$(atf_cpkgconfigdir)" "$(DESTDIR)$(atf_shdir)" "$(DESTDIR)$(atf_shpkgconfigdir)" "$(DESTDIR)$(cssdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(dtddir)" "$(DESTDIR)$(egdir)" "$(DESTDIR)$(hooksdir)" "$(DESTDIR)$(pkgtestsdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_c___detaildir)" "$(DESTDIR)$(tests_atf_c_detaildir)" "$(DESTDIR)$(tests_atf_configdir)" "$(DESTDIR)$(tests_atf_reportdir)" "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_atf_shdir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(xsldir)" "$(DESTDIR)$(atf_cdir)" "$(DESTDIR)$(atf_c__dir)" "$(DESTDIR)$(includedir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: $(BUILT_SOURCES)
@@ -4174,10 +4840,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
@@ -4185,6 +4856,7 @@ clean-generic:
 
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
        -rm -f atf-c++/$(DEPDIR)/$(am__dirstamp)
        -rm -f atf-c++/$(am__dirstamp)
        -rm -f atf-c++/detail/$(DEPDIR)/$(am__dirstamp)
@@ -4236,13 +4908,16 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
-install-data-am: install-atf_cHEADERS install-atf_c__HEADERS \
-       install-atf_c__dirpkgconfigDATA install-atf_cpkgconfigDATA \
-       install-atf_shDATA install-cssDATA install-docDATA \
+install-data-am: install-atf_aclocalDATA install-atf_cHEADERS \
+       install-atf_c__HEADERS install-atf_c__dirpkgconfigDATA \
+       install-atf_cpkgconfigDATA install-atf_shDATA \
+       install-atf_shpkgconfigDATA install-cssDATA install-docDATA \
        install-dtdDATA install-egDATA install-hooksDATA \
        install-includeHEADERS install-man install-pkgtestsDATA \
        install-tests_atf_cDATA install-tests_atf_cPROGRAMS \
@@ -4263,20 +4938,30 @@ install-data-am: install-atf_cHEADERS install-atf_c__HEADERS \
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \
        install-libexecPROGRAMS
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man: install-man1 install-man3 install-man4 install-man5 \
        install-man7
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am: installcheck-local
 
 maintainer-clean: maintainer-clean-am
@@ -4299,11 +4984,12 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-atf_cHEADERS uninstall-atf_c__HEADERS \
-       uninstall-atf_c__dirpkgconfigDATA uninstall-atf_cpkgconfigDATA \
-       uninstall-atf_shDATA uninstall-binPROGRAMS uninstall-cssDATA \
-       uninstall-docDATA uninstall-dtdDATA uninstall-egDATA \
-       uninstall-hooksDATA uninstall-includeHEADERS \
+uninstall-am: uninstall-atf_aclocalDATA uninstall-atf_cHEADERS \
+       uninstall-atf_c__HEADERS uninstall-atf_c__dirpkgconfigDATA \
+       uninstall-atf_cpkgconfigDATA uninstall-atf_shDATA \
+       uninstall-atf_shpkgconfigDATA uninstall-binPROGRAMS \
+       uninstall-cssDATA uninstall-docDATA uninstall-dtdDATA \
+       uninstall-egDATA uninstall-hooksDATA uninstall-includeHEADERS \
        uninstall-libLTLIBRARIES uninstall-libexecPROGRAMS \
        uninstall-man uninstall-pkgtestsDATA uninstall-tests_atf_cDATA \
        uninstall-tests_atf_cPROGRAMS uninstall-tests_atf_cSCRIPTS \
@@ -4327,35 +5013,39 @@ uninstall-am: uninstall-atf_cHEADERS uninstall-atf_c__HEADERS \
 uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \
        uninstall-man5 uninstall-man7
 
-.MAKE: install-am install-strip
+.MAKE: all check check-am install install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
-       clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
-       clean-libLTLIBRARIES clean-libexecPROGRAMS clean-libtool \
-       clean-noinstLTLIBRARIES clean-tests_atf_cPROGRAMS \
-       clean-tests_atf_c__PROGRAMS clean-tests_atf_c___detailPROGRAMS \
+       clean-binPROGRAMS clean-checkPROGRAMS clean-cscope \
+       clean-generic clean-libLTLIBRARIES clean-libexecPROGRAMS \
+       clean-libtool clean-noinstLTLIBRARIES \
+       clean-tests_atf_cPROGRAMS clean-tests_atf_c__PROGRAMS \
+       clean-tests_atf_c___detailPROGRAMS \
        clean-tests_atf_c_detailPROGRAMS \
        clean-tests_atf_reportPROGRAMS clean-tests_atf_runPROGRAMS \
-       clean-tests_test_programsPROGRAMS ctags dist dist-all \
-       dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \
-       dist-zip distcheck distclean distclean-compile \
-       distclean-generic distclean-hdr distclean-libtool \
-       distclean-local distclean-tags distcleancheck distdir \
-       distuninstallcheck dvi dvi-am html html-am info info-am \
-       install install-am install-atf_cHEADERS install-atf_c__HEADERS \
-       install-atf_c__dirpkgconfigDATA install-atf_cpkgconfigDATA \
-       install-atf_shDATA install-binPROGRAMS install-cssDATA \
-       install-data install-data-am install-docDATA install-dtdDATA \
-       install-dvi install-dvi-am install-egDATA install-exec \
-       install-exec-am install-hooksDATA install-html install-html-am \
-       install-includeHEADERS install-info install-info-am \
-       install-libLTLIBRARIES install-libexecPROGRAMS install-man \
-       install-man1 install-man3 install-man4 install-man5 \
-       install-man7 install-pdf install-pdf-am install-pkgtestsDATA \
-       install-ps install-ps-am install-strip install-tests_atf_cDATA \
-       install-tests_atf_cPROGRAMS install-tests_atf_cSCRIPTS \
-       install-tests_atf_c__DATA install-tests_atf_c__PROGRAMS \
-       install-tests_atf_c__SCRIPTS install-tests_atf_c___detailDATA \
+       clean-tests_test_programsPROGRAMS cscope cscopelist ctags dist \
+       dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
+       dist-tarZ dist-xz dist-zip distcheck distclean \
+       distclean-compile distclean-generic distclean-hdr \
+       distclean-libtool distclean-local distclean-tags \
+       distcleancheck distdir distuninstallcheck dvi dvi-am html \
+       html-am info info-am install install-am \
+       install-atf_aclocalDATA install-atf_cHEADERS \
+       install-atf_c__HEADERS install-atf_c__dirpkgconfigDATA \
+       install-atf_cpkgconfigDATA install-atf_shDATA \
+       install-atf_shpkgconfigDATA install-binPROGRAMS \
+       install-cssDATA install-data install-data-am install-docDATA \
+       install-dtdDATA install-dvi install-dvi-am install-egDATA \
+       install-exec install-exec-am install-hooksDATA install-html \
+       install-html-am install-includeHEADERS install-info \
+       install-info-am install-libLTLIBRARIES install-libexecPROGRAMS \
+       install-man install-man1 install-man3 install-man4 \
+       install-man5 install-man7 install-pdf install-pdf-am \
+       install-pkgtestsDATA install-ps install-ps-am install-strip \
+       install-tests_atf_cDATA install-tests_atf_cPROGRAMS \
+       install-tests_atf_cSCRIPTS install-tests_atf_c__DATA \
+       install-tests_atf_c__PROGRAMS install-tests_atf_c__SCRIPTS \
+       install-tests_atf_c___detailDATA \
        install-tests_atf_c___detailPROGRAMS \
        install-tests_atf_c_detailDATA \
        install-tests_atf_c_detailPROGRAMS \
@@ -4371,11 +5061,12 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \
        maintainer-clean maintainer-clean-generic mostlyclean \
        mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
        pdf pdf-am ps ps-am tags uninstall uninstall-am \
-       uninstall-atf_cHEADERS uninstall-atf_c__HEADERS \
-       uninstall-atf_c__dirpkgconfigDATA uninstall-atf_cpkgconfigDATA \
-       uninstall-atf_shDATA uninstall-binPROGRAMS uninstall-cssDATA \
-       uninstall-docDATA uninstall-dtdDATA uninstall-egDATA \
-       uninstall-hooksDATA uninstall-includeHEADERS \
+       uninstall-atf_aclocalDATA uninstall-atf_cHEADERS \
+       uninstall-atf_c__HEADERS uninstall-atf_c__dirpkgconfigDATA \
+       uninstall-atf_cpkgconfigDATA uninstall-atf_shDATA \
+       uninstall-atf_shpkgconfigDATA uninstall-binPROGRAMS \
+       uninstall-cssDATA uninstall-docDATA uninstall-dtdDATA \
+       uninstall-egDATA uninstall-hooksDATA uninstall-includeHEADERS \
        uninstall-libLTLIBRARIES uninstall-libexecPROGRAMS \
        uninstall-man uninstall-man1 uninstall-man3 uninstall-man4 \
        uninstall-man5 uninstall-man7 uninstall-pkgtestsDATA \
@@ -4398,13 +5089,7 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \
        uninstall-tests_test_programsSCRIPTS uninstall-xslDATA
 
 
-dist-hook: check-install
-.PHONY: check-install
-check-install: $(srcdir)/INSTALL
-       $(srcdir)/admin/check-install.sh $(srcdir)/INSTALL
-
 dist-hook: check-style
-.PHONY: check-style
 check-style:
        $(srcdir)/admin/check-style.sh
 
@@ -4415,12 +5100,12 @@ check-style:
 dist-hook: kill-defs-h
 kill-defs-h:
        rm -f $(distdir)/atf-c/defs.h
-atf-c/atf-c.pc: $(srcdir)/atf-c/atf-c.pc.in
+atf-c/atf-c.pc: $(srcdir)/atf-c/atf-c.pc.in Makefile
        test -d atf-c || mkdir -p atf-c
-       sed -e 's,__ATF_VERSION__,@PACKAGE_VERSION@,g' \
-           -e 's,__CC__,$(CC),g' \
-           -e 's,__INCLUDEDIR__,$(includedir),g' \
-           -e 's,__LIBDIR__,$(libdir),g' \
+       sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \
+           -e 's#__CC__#$(CC)#g' \
+           -e 's#__INCLUDEDIR__#$(includedir)#g' \
+           -e 's#__LIBDIR__#$(libdir)#g' \
            <$(srcdir)/atf-c/atf-c.pc.in >atf-c/atf-c.pc.tmp
        mv atf-c/atf-c.pc.tmp atf-c/atf-c.pc
 atf-c/pkg_config_test: $(srcdir)/atf-c/pkg_config_test.sh
@@ -4431,12 +5116,12 @@ atf-c/pkg_config_test: $(srcdir)/atf-c/pkg_config_test.sh
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
 
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
-atf-c++/atf-c++.pc: $(srcdir)/atf-c++/atf-c++.pc.in
+atf-c++/atf-c++.pc: $(srcdir)/atf-c++/atf-c++.pc.in Makefile
        test -d atf-c++ || mkdir -p atf-c++
-       sed -e 's,__ATF_VERSION__,@PACKAGE_VERSION@,g' \
-           -e 's,__CXX__,$(CXX),g' \
-           -e 's,__INCLUDEDIR__,$(includedir),g' \
-           -e 's,__LIBDIR__,$(libdir),g' \
+       sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \
+           -e 's#__CXX__#$(CXX)#g' \
+           -e 's#__INCLUDEDIR__#$(includedir)#g' \
+           -e 's#__LIBDIR__#$(libdir)#g' \
            <$(srcdir)/atf-c++/atf-c++.pc.in >atf-c++/atf-c++.pc.tmp
        mv atf-c++/atf-c++.pc.tmp atf-c++/atf-c++.pc
 atf-c++/pkg_config_test: $(srcdir)/atf-c++/pkg_config_test.sh
@@ -4447,24 +5132,12 @@ atf-c++/pkg_config_test: $(srcdir)/atf-c++/pkg_config_test.sh
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
 
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
-atf-config/integration_test: $(srcdir)/atf-config/integration_test.sh
-       test -d atf-config || mkdir -p atf-config
-       @src="$(srcdir)/atf-config/integration_test.sh"; \
-       dst="atf-config/integration_test"; $(BUILD_SH_TP)
-
-# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
-atf-report/integration_test: $(srcdir)/atf-report/integration_test.sh
-       test -d atf-report || mkdir -p atf-report
-       @src="$(srcdir)/atf-report/integration_test.sh"; \
-       dst="atf-report/integration_test"; $(BUILD_SH_TP)
-
-# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
-atf-run/integration_test: $(srcdir)/atf-run/integration_test.sh
-       test -d atf-run || mkdir -p atf-run
-       @src="$(srcdir)/atf-run/integration_test.sh"; \
-       dst="atf-run/integration_test"; $(BUILD_SH_TP)
-
-# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
+atf-sh/atf-sh.pc: $(srcdir)/atf-sh/atf-sh.pc.in Makefile
+       test -d atf-sh || mkdir -p atf-sh
+       sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \
+           -e 's#__EXEC_PREFIX__#$(exec_prefix)#g' \
+           <$(srcdir)/atf-sh/atf-sh.pc.in >atf-sh/atf-sh.pc.tmp
+       mv atf-sh/atf-sh.pc.tmp atf-sh/atf-sh.pc
 atf-sh/misc_helpers: $(srcdir)/atf-sh/misc_helpers.sh
        test -d atf-sh || mkdir -p atf-sh
        @src="$(srcdir)/atf-sh/misc_helpers.sh"; \
@@ -4498,18 +5171,6 @@ atf-sh/tp_test: $(srcdir)/atf-sh/tp_test.sh
        @src="$(srcdir)/atf-sh/tp_test.sh"; \
        dst="atf-sh/tp_test"; $(BUILD_SH_TP)
 
-# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
-atf-version/revision.h: atf-version/revision.h.stamp
-       @test -d atf-version || mkdir -p atf-version
-       @cmp -s atf-version/revision.h atf-version/revision.h.stamp || \
-           cp -p atf-version/revision.h.stamp atf-version/revision.h
-.PHONY: atf-version/revision.h.stamp
-atf-version/revision.h.stamp:
-       @test -d atf-version || mkdir -p atf-version
-       @$(top_srcdir)/atf-version/generate-revision.sh \
-           -m "$(MTN)" -r $(top_srcdir) -o atf-version/revision.h.stamp \
-           -v $(PACKAGE_VERSION)
-
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
 bootstrap/h_tp_basic_sh: $(srcdir)/bootstrap/h_tp_basic_sh.sh
        test -d bootstrap || mkdir -p bootstrap
@@ -4536,6 +5197,7 @@ distclean-local:
        echo 'm4_define(AT_PACKAGE_VERSION,   @PACKAGE_VERSION@)'; \
        echo 'm4_define(AT_PACKAGE_STRING,    @PACKAGE_STRING@)'; \
        echo 'm4_define(AT_PACKAGE_BUGREPORT, @PACKAGE_BUGREPORT@)'; \
+       echo 'm4_define(ENABLE_TOOLS,         @ENABLE_TOOLS@)'; \
        } >$(srcdir)/bootstrap/package.m4
 
 @target_srcdir@bootstrap/testsuite: $(srcdir)/bootstrap/testsuite.at \
@@ -4545,20 +5207,17 @@ distclean-local:
            -I $(srcdir)/bootstrap \
            $(srcdir)/bootstrap/testsuite.at -o $@.tmp
        mv $@.tmp $@
-
-installcheck-local: installcheck-bootstrap
-.PHONY: installcheck-bootstrap
 installcheck-bootstrap: @target_srcdir@bootstrap/testsuite check
        $(TESTS_ENVIRONMENT) $(srcdir)/bootstrap/testsuite
 
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
 
-doc/atf.7: $(srcdir)/doc/atf.7.in
-       test -d doc || mkdir -p doc
-       sed -e 's,__DOCDIR__,$(docdir),g' \
-           -e 's,__TESTSDIR__,$(testsdir),g' \
-           <$(srcdir)/doc/atf.7.in >doc/atf.7.tmp
-       mv doc/atf.7.tmp doc/atf.7
+@ENABLE_TOOLS_TRUE@doc/atf.7: $(srcdir)/doc/atf.7.in
+@ENABLE_TOOLS_TRUE@    test -d doc || mkdir -p doc
+@ENABLE_TOOLS_TRUE@    sed -e 's#__DOCDIR__#$(docdir)#g' \
+@ENABLE_TOOLS_TRUE@        -e 's#__TESTSDIR__#$(testsdir)#g' \
+@ENABLE_TOOLS_TRUE@        <$(srcdir)/doc/atf.7.in >doc/atf.7.tmp
+@ENABLE_TOOLS_TRUE@    mv doc/atf.7.tmp doc/atf.7
 
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
 test-programs/sh_helpers: $(srcdir)/test-programs/sh_helpers.sh
@@ -4573,10 +5232,6 @@ test-programs/expect_test: $(srcdir)/test-programs/expect_test.sh
        test -d test-programs || mkdir -p test-programs
        @src="$(srcdir)/test-programs/expect_test.sh $(common_sh)"; \
        dst="test-programs/expect_test"; $(BUILD_SH_TP)
-test-programs/fork_test: $(srcdir)/test-programs/fork_test.sh
-       test -d test-programs || mkdir -p test-programs
-       @src="$(srcdir)/test-programs/fork_test.sh $(common_sh)"; \
-       dst="test-programs/fork_test"; $(BUILD_SH_TP)
 test-programs/meta_data_test: $(srcdir)/test-programs/meta_data_test.sh
        test -d test-programs || mkdir -p test-programs
        @src="$(srcdir)/test-programs/meta_data_test.sh $(common_sh)"; \
@@ -4591,45 +5246,77 @@ test-programs/srcdir_test: $(srcdir)/test-programs/srcdir_test.sh
        dst="test-programs/srcdir_test"; $(BUILD_SH_TP)
 
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
+@ENABLE_TOOLS_TRUE@atf-report/integration_test: $(srcdir)/atf-report/integration_test.sh
+@ENABLE_TOOLS_TRUE@    test -d atf-report || mkdir -p atf-report
+@ENABLE_TOOLS_TRUE@    @src="$(srcdir)/atf-report/integration_test.sh"; \
+@ENABLE_TOOLS_TRUE@    dst="atf-report/integration_test"; $(BUILD_SH_TP)
+
+# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
+@ENABLE_TOOLS_TRUE@atf-config/integration_test: $(srcdir)/atf-config/integration_test.sh
+@ENABLE_TOOLS_TRUE@    test -d atf-config || mkdir -p atf-config
+@ENABLE_TOOLS_TRUE@    @src="$(srcdir)/atf-config/integration_test.sh"; \
+@ENABLE_TOOLS_TRUE@    dst="atf-config/integration_test"; $(BUILD_SH_TP)
+
+# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
+@ENABLE_TOOLS_TRUE@atf-run/integration_test: $(srcdir)/atf-run/integration_test.sh
+@ENABLE_TOOLS_TRUE@    test -d atf-run || mkdir -p atf-run
+@ENABLE_TOOLS_TRUE@    @src="$(srcdir)/atf-run/integration_test.sh"; \
+@ENABLE_TOOLS_TRUE@    dst="atf-run/integration_test"; $(BUILD_SH_TP)
 
-installcheck-local: installcheck-atf
-.PHONY: installcheck-atf
-installcheck-atf:
-       logfile=$$(pwd)/installcheck.log; \
-       fifofile=$$(pwd)/installcheck.fifo; \
-       cd $(pkgtestsdir); \
-       rm -f $${fifofile}; \
-       mkfifo $${fifofile}; \
-       cat $${fifofile} | tee $${logfile} | $(TESTS_ENVIRONMENT) atf-report & \
-       $(TESTS_ENVIRONMENT) atf-run >>$${fifofile}; \
-       res=$${?}; \
-       wait; \
-       rm $${fifofile}; \
-       echo; \
-       echo "The verbatim output of atf-run has been saved to" \
-            "installcheck.log; exit was $${res}"; \
-       test $${res} -eq 0
+# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
+@ENABLE_TOOLS_TRUE@atf-version/revision.h: atf-version/revision.h.stamp
+@ENABLE_TOOLS_TRUE@    @test -d atf-version || mkdir -p atf-version
+@ENABLE_TOOLS_TRUE@    @cmp -s atf-version/revision.h atf-version/revision.h.stamp || \
+@ENABLE_TOOLS_TRUE@        cp -p atf-version/revision.h.stamp atf-version/revision.h
+@ENABLE_TOOLS_TRUE@atf-version/revision.h.stamp:
+@ENABLE_TOOLS_TRUE@    @test -d atf-version || mkdir -p atf-version
+@ENABLE_TOOLS_TRUE@    @$(top_srcdir)/atf-version/generate-revision.sh \
+@ENABLE_TOOLS_TRUE@        -g "$(GIT)" -r $(top_srcdir) -o atf-version/revision.h.stamp \
+@ENABLE_TOOLS_TRUE@        -v $(PACKAGE_VERSION)
+
+# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
+@ENABLE_TOOLS_TRUE@installcheck-atf:
+@ENABLE_TOOLS_TRUE@    logfile=$$(pwd)/installcheck.log; \
+@ENABLE_TOOLS_TRUE@    fifofile=$$(pwd)/installcheck.fifo; \
+@ENABLE_TOOLS_TRUE@    cd $(pkgtestsdir); \
+@ENABLE_TOOLS_TRUE@    rm -f $${fifofile}; \
+@ENABLE_TOOLS_TRUE@    mkfifo $${fifofile}; \
+@ENABLE_TOOLS_TRUE@    cat $${fifofile} | tee $${logfile} | $(TESTS_ENVIRONMENT) atf-report & \
+@ENABLE_TOOLS_TRUE@    $(TESTS_ENVIRONMENT) atf-run >>$${fifofile}; \
+@ENABLE_TOOLS_TRUE@    res=$${?}; \
+@ENABLE_TOOLS_TRUE@    wait; \
+@ENABLE_TOOLS_TRUE@    rm $${fifofile}; \
+@ENABLE_TOOLS_TRUE@    echo; \
+@ENABLE_TOOLS_TRUE@    echo "The verbatim output of atf-run has been saved to" \
+@ENABLE_TOOLS_TRUE@         "installcheck.log; exit was $${res}"; \
+@ENABLE_TOOLS_TRUE@    test $${res} -eq 0
+@HAVE_KYUA_TRUE@installcheck-kyua:
+@HAVE_KYUA_TRUE@       cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) $(KYUA) test
+
+installcheck-local: $(INSTALLCHECK_TARGETS)
 
 #
 # Custom targets.
 #
 
-.PHONY:        depend
-depend:
-
-.PHONY: clean-all
+dist-hook: forbid-dist
+@ENABLE_TOOLS_TRUE@forbid-dist:
+@ENABLE_TOOLS_TRUE@    @true
+@ENABLE_TOOLS_FALSE@forbid-dist:
+@ENABLE_TOOLS_FALSE@   @echo "Sorry; cannot make dist without the tools enabled."
+@ENABLE_TOOLS_FALSE@   @echo "Please reconfigure with --enable-tools."
+@ENABLE_TOOLS_FALSE@   @false
 clean-all:
-       MTN="$(MTN)" $(SH) $(srcdir)/admin/clean-all.sh
-
-.PHONY: release
+       GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh
 release:
        $(SH) $(srcdir)/admin/release.sh $(PACKAGE_VERSION) $(DIST_ARCHIVES)
-
-.PHONY: release-test
 release-test:
        $(SH) $(srcdir)/admin/release-test.sh $(DIST_ARCHIVES)
 
+.PHONY: $(PHONY_TARGETS)
+
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
index 1f430a3f045d1caa4e8641fe9823ed8d22c87ae1..5d05a28579bb0ec7f876eeb988fbcb420bd6cdb0 100644 (file)
@@ -2,6 +2,187 @@ Major changes between releases                  Automated Testing Framework
 ===========================================================================
 
 
+Changes in version 0.17
+***********************
+
+Experimental version released on February 14th, 2013.
+
+* Added the atf_utils_cat_file, atf_utils_compare_file,
+  atf_utils_copy_file, atf_utils_create_file, atf_utils_file_exists,
+  atf_utils_fork, atf_utils_grep_file, atf_utils_grep_string,
+  atf_utils_readline, atf_utils_redirect and atf_utils_wait utility
+  functions to atf-c-api.  Documented the already-public
+  atf_utils_free_charpp function.
+
+* Added the cat_file, compare_file, copy_file, create_file, file_exists,
+  fork, grep_collection, grep_file, grep_string, redirect and wait
+  functions to the atf::utils namespace of atf-c++-api.  These are
+  wrappers around the same functions added to the atf-c-api library.
+
+* Added the ATF_CHECK_MATCH, ATF_CHECK_MATCH_MSG, ATF_REQUIRE_MATCH and
+  ATF_REQUIRE_MATCH_MSG macros to atf-c to simplify the validation of a
+  string against a regular expression.
+
+* Miscellaneous fixes for manpage typos and compilation problems with
+  clang.
+
+* Added caching of the results of those configure tests that rely on
+  executing a test program.  This should help crossbuild systems by
+  providing a mechanism to pre-specify what the results should be.
+
+* PR bin/45690: Make atf-report convert any non-printable characters to
+  a plain-text representation (matching their corresponding hexadecimal
+  entities) in XML output files.  This is to prevent the output of test
+  cases from breaking xsltproc later.
+
+
+Changes in version 0.16
+***********************
+
+Experimental version released on July 10th, 2012.
+
+* Added a --enable-tools flag to configure to request the build of the
+  deprecated ATF tools, whose build is now disabled by default.  In order
+  to continue running tests, you should migrate to Kyua instead of enabling
+  the build of the deprecated tools.  The kyua-atf-compat package provides
+  transitional compatibility versions of atf-run and atf-report built on
+  top of Kyua.
+
+* Tweaked the ATF_TEST_CASE macro of atf-c++ so that the compiler can
+  detect defined but unused test cases.
+
+* PR bin/45859: Fixed some XSLT bugs that resulted in the tc-time and
+  tp-time XML tags leaking into the generated HTML file.  Also improved
+  the CSS file slightly to correct alignment and color issues with the
+  timestamps column.
+
+* Optimized atf-c++/macros.hpp so that GNU G++ consumes less memory during
+  compilation with GNU G++.
+
+* Flipped the default to building shared libraries for atf-c and atf-c++,
+  and started versioning them.  As a side-effect, this removes the
+  --enable-unstable-shared flag from configure that appears to not work any
+  more (under NetBSD).  Additionally, some distributions require the use of
+  shared libraries for proper dependency tracking (e.g. Fedora), so it is
+  better if we do the right versioning upstream.
+
+* Project hosting moved from an adhoc solution (custom web site and
+  Monotone repository) to Google Code (standard wiki and Git).  ATF now
+  lives in a subcomponent of the Kyua project.
+
+
+Changes in version 0.15
+***********************
+
+Experimental version released on January 16th, 2012.
+
+* Respect stdin in atf-check.  The previous release silenced stdin for any
+  processes spawned by atf, not only test programs, which caused breakage
+  in tests that pipe data through atf-check.
+
+* Performance improvements to atf-sh.
+
+* Enabled detection of unused parameters and variables in the code and
+  fixed all warnings.
+
+* Changed the behavior of "developer mode".  Compiler warnings are now
+  enabled unconditionally regardless of whether we are in developer mode or
+  not; developer mode is now only used to perform strict warning checks and
+  to enable assertions.  Additionally, developer mode is now only
+  automatically enabled when building from the repository, not for formal
+  releases.
+
+* Added new Autoconf M4 macros (ATF_ARG_WITH, ATF_CHECK_C and
+  ATF_CHECK_CXX) to provide a consistent way of defining a --with-arg flag
+  in configure scripts and detecting the presence of any of the ATF
+  bindings.  Note that ATF_CHECK_SH was already introduced in 0.14, but it
+  has now been modified to also honor --with-atf if instantiated.
+
+* Added timing support to atf-run / atf-report.
+
+* Added support for a 'require.memory' property, to specify the minimum
+  amount of physical memory needed by the test case to yield valid results.
+
+* PR bin/45690: Force an ISO-8859-1 encoding in the XML files generated by
+  atf-report so that invalid data in the output of test cases does not
+  mangle our report.
+
+
+Changes in version 0.14
+***********************
+
+Experimental version released on June 14th, 2011.
+
+* Added a pkg-config file for atf-sh and an aclocal file to ease the
+  detection of atf-sh from autoconf scripts.
+
+* Made the default test case body defined by atf_sh fail.  This is to
+  ensure that test cases are properly defined in test programs and helps
+  in catching typos in the names of the body functions.
+
+* PR bin/44882: Made atf-run connect the stdin of test cases to /dev/zero.
+  This provides more consistent results with "normal" execution (in
+  particular, when tests are executed detached from a terminal).
+
+* Made atf-run hardcode TZ=UTC for test cases.  It used to undefine TZ, but
+  that does not take into account that libc determines the current timezone
+  from a configuration file.
+
+* All test programs will now print a warning when they are not run through
+  atf-run(1) stating that this is unsupported and may deliver incorrect
+  results.
+
+* Added support for the 'require.files' test-case property.  This allows
+  test cases to specify installed files that must be present for the test
+  case to run.
+
+
+Changes in version 0.13
+***********************
+
+Experimental version released on March 31st, 2011.
+
+This is the first release after the creation of the Kyua project, a more
+modular and reliable replacement for ATF.  From now on, ATF will change to
+accomodate the transition to this new codebase, but ATF will still continue
+to see development in the short/medium term.  Check out the project page at
+http://code.google.com/p/kyua/ for more details.
+
+The changes in this release are:
+
+* Added support to run the tests with the Kyua runtime engine (kyua-cli), a
+  new package that aims to replace atf-run and atf-report.  The ATF tests
+  can be run with the new system by issuing a 'make installcheck-kyua' from
+  the top-level directory of the project (assuming the 'kyua' binary is
+  available during the configuration stage of ATF).
+
+* atf-run and atf-report are now in maintenance mode (but *not* deprecated
+  yet!).  Kyua already implements a new, much more reliable runtime engine
+  that provides similar features to these tools.  That said, it is not
+  complete yet so all development efforts should go towards it.
+
+* If GDB is installed, atf-run dumps the stack trace of crashing test
+  programs in an attempt to aid debugging.  Contributed by Antti Kantee.
+
+* Reverted default timeout change in previous release and reset its value
+  to 5 minutes.  This was causing several issues, specially when running
+  the existing NetBSD test suite in qemu.
+
+* Fixed the 'match' output checker in atf-check to properly validate the
+  last line of a file even if it does not have a newline.
+
+* Added the ATF_REQUIRE_IN and ATF_REQUIRE_NOT_IN macros to atf-c++ to
+  check for the presence (or lack thereof) of an element in a collection.
+
+* PR bin/44176: Fixed a race condition in atf-run that would crash atf-run
+  when the cleanup of a test case triggered asynchronous modifications to
+  its work directory (e.g. killing a daemon process that cleans up a pid
+  file in the work directory).
+
+* PR bin/44301: Fixed the sample XSLT file to report bogus test programs
+  instead of just listing them as having 0 test cases.
+
+
 Changes in version 0.12
 ***********************
 
diff --git a/unit/atf-src/TODO b/unit/atf-src/TODO
new file mode 100644 (file)
index 0000000..556baba
--- /dev/null
@@ -0,0 +1,184 @@
+Things to do                                    Automated Testing Framework
+===========================================================================
+
+
+Last revised: November 30th, 2010
+
+
+This document includes the list of things that need to be done in ATF that
+are most requested by the users. This information used to be available in
+an ad-hoc bug tracker but that proved to be a bad idea. I have collected
+all worthy comments in here.
+
+Please note that most work these days is going into Kyua (see
+http://code.google.com/p/kyua/). The ideas listed here apply to the
+components of ATF that have *not* been migrated to the new codebase yet.
+For bug reports or ideas that apply to the components that already have
+been migrated, please use the bug tracker in the URL above. Similarly,
+whenever a component is migrated, the ideas in this file should be revised
+and migrated to the new bug tracker where appropriate.
+
+
+---------------------------------------------------------------------------
+Add build-time checks to atf-sh
+
+The 0.7 release introduced build-time tests to atf-c and atf-c++, but not
+to atf-sh. Expose the functionality to the shell interface.
+
+This will probably require writing an atf-build utility that exposes the C
+code and can be called from the shell.
+
+---------------------------------------------------------------------------
+Revisit what to do when an Atffile lists a non-existent file
+
+---------------------------------------------------------------------------
+Add ATF_CHECK* versions to atf-c++ to support non-fatal tests
+
+---------------------------------------------------------------------------
+Implement race-condition tests
+
+gcooper:
+
+I would think that stress/negative tests would be of more value than race
+condition tests (they're similar, but not exactly the same in my mind).
+
+In particular,
+
+1. Feed through as much data as possible to determine where reporting
+   breaks down.
+2. Feed through data quickly and terminate ASAP. The data should be
+   captured. Terminate child applications with unexpected exit codes and
+   signals (in particular, SIGCHLD, SIGPIPE, exit codes that terminate,
+   etc).
+3. Open up a file descriptor in the test application, don't close the file
+   descriptor.
+4. fork(2) a process; don't wait(2) for the application to complete.
+
+There are other scenarios that could be exercised, but these are the ones
+I could think of off the topic of my head.
+
+--
+
+jmmv:
+
+1. The thing is: how do you express any of this in a portable/abstract
+   interface? How do you express that a test case "receives data"? What
+   does that exactly mean? I don't think the framework should care about
+   this: each test should be free to decide where its data is and how to
+   deal with it.
+
+2. Ditto.
+
+3. Not sure I understand your request, but testing for "unexpected exit
+   codes" is already supported. See wiki:DesignXFail for the feature
+   design details.
+
+4. What's the problem with this case? The test case exits right away after
+   terminating the execution of its body; any open file descriptors,
+   leaked memory, etc. die with it.
+
+5. forking and not waiting for a subprocess was a problem already
+   addressed.
+
+I kinda have an idea of what Antti means with "race condition tests", but
+every time I have tried to describe my understanding of matters I seem to
+be wrong. Would be nice to have a clear description of what this involves;
+in particular, what are the expectations from the framework and how should
+the feature be exposed.
+
+As of now, what I understand by "race condition test" is: a test case that
+exercises a race condition. The test case may finish without triggering
+the race, in which case it just exists with a successful status.
+Otherwise, if the race triggers, the test case gets stuck and times out.
+The result should be reported as an "expected failure" different from
+timeout.
+
+--
+
+pooka:
+
+Yup. Plus some atf-wide mechanism for the operator to supply some kind of
+guideline if the test should try to trigger the race for a second or for
+an hour.
+
+--
+
+jmmv:
+
+Alright. While mocking up some code for this, I think that your two
+requests are complementary.
+
+On the one hand, when you are talking about a "race condition" test you
+really mean an "expected race condition" test. Correct? If so, we need to
+extend the xfail mechanism to add one more case, which is to report any
+failures as a race condition error and, if there is no failure, report the
+test as successful.
+
+On the other hand, the atf-wide mechanism to support how long the test
+should run for can be thought as a "stress test" mechanism. I.e. run this
+test for X time / iterations and report its results regularly without
+involving xfail at all.
+
+So, with this in mind:
+
+* For a test that triggers an unfixed race condition, you set xfail to
+  race mode and define the test as a stress test. Any failures are
+  reported as expected failures.
+
+* For a test that verifies a supposedly-fixed race condition, you do *not*
+  set xfail to race mode, and only set the test to stress test. Any
+  failures are reported as real failures.
+
+These stress test cases implement a single iteration of the test and
+atf-run is in charge of running the test several times, stopping on the
+first failure.
+
+Does that make sense?
+
+---------------------------------------------------------------------------
+Implement ATF_REQUIRE_ERRNO
+
+pooka:
+
+Most of the lines in tests against system functionality are:
+
+if (syscall(args) == -1)
+    atf_tc_fail_errno("flop")
+
+Some shorthand would be helpful, like ATF_REQUIRE_ERRNO(syscall(args))
+Also, a variant which allows arbitrary return value checks (e.g. "!= 0" or
+"< 124" or "!= size") would be nice.
+
+--
+
+gcooper:
+
+There's a problem with this request; not all functions fail in the same
+way ... in particular compare the pthread family of functions (which
+return errno) vs many native syscalls. Furthermore, compare some
+fcntl-like syscalls vs other syscalls. One size fits all solutions may not
+be a wise idea in this case, so I think that the problem statement needs
+to be better defined, because the above request is too loose.
+
+FWIW, there's also a TEST macro in LTP, which tests for non-zero status,
+and sets an appropriate set of global variables for errnos and return
+codes, respectively. It was a good idea, but has been mostly abandoned
+because it's too difficult to define a success and failure in a universal
+manner, so I think that we need to be careful with what's implemented in
+ATF to not repeat the mistakes that others have made.
+
+--
+
+jmmv:
+
+I think you've got a good point.
+
+This was mostly intended to simplify the handling of the stupid errno
+global variable. I think this is valuable to have, but maybe the
+macro/function name should be different because _ERRNO can be confusing.
+Probably something like an ATF_CHECK_LIBC / ATF_CHECK_PTHREAD approach
+would be more flexible and simple.
+
+
+===========================================================================
+vim: filetype=text:textwidth=75:expandtab:shiftwidth=2:softtabstop=2
index 1b39f64d5a8d44243bf29ead3cf4bcbedaa9aa7d..d3d395bb4f05f27c65ef1d0ba8705238db276850 100644 (file)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.12.2 -*- Autoconf -*-
+
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(AC_AUTOCONF_VERSION, [2.67],,
-[m4_warning([this file was generated for autoconf 2.67.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 8
+
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.10'
+[am__api_version='1.12'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.10.1], [],
+m4_if([$1], [1.12.2], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -48,24 +50,26 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10.1])dnl
+[AM_AUTOMAKE_VERSION([1.12.2])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
 #
 # Of course, Automake must honor this variable whenever it calls a
 # tool from the auxiliary directory.  The problem is that $srcdir (and
@@ -84,7 +88,7 @@ _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
 #
 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
 # are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
+# harmless because $srcdir is '.', but things will broke when you
 # start a VPATH build or use an absolute $srcdir.
 #
 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
@@ -110,26 +114,26 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# serial 10
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
 # Define a conditional.
 AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+[AC_PREREQ([2.52])dnl
m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
 AC_SUBST([$1_TRUE])dnl
 AC_SUBST([$1_FALSE])dnl
 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -143,16 +147,15 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
+# serial 17
 
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
 # will think it sees a *use*, and therefore will trigger all it's
 # C support machinery.  Also note that it means that autoscan, seeing
@@ -162,7 +165,7 @@ fi])])
 # _AM_DEPENDENCIES(NAME)
 # ----------------------
 # See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
 # We try a few techniques and use that to set a single cache variable.
 #
 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@@ -175,12 +178,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 AC_REQUIRE([AM_DEP_TRACK])dnl
 
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
-       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                   [depcc="$$1"   am_compiler_list=])
+m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
+      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
+      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
+      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                    [depcc="$$1"   am_compiler_list=])
 
 AC_CACHE_CHECK([dependency style of $depcc],
                [am_cv_$1_dependencies_compiler_type],
@@ -188,8 +192,9 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -207,6 +212,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
   fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -218,35 +233,49 @@ AC_CACHE_CHECK([dependency style of $depcc],
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
        continue
       else
        break
       fi
       ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -279,7 +308,7 @@ AM_CONDITIONAL([am__fastdep$1], [
 # AM_SET_DEPDIR
 # -------------
 # Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
 AC_DEFUN([AM_SET_DEPDIR],
 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
@@ -289,71 +318,86 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 # AM_DEP_TRACK
 # ------------
 AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+  [--enable-dependency-tracking],
+  [do not reject slow dependency extractors])
+AS_HELP_STRING(
+  [--disable-dependency-tracking],
+  [speeds up one-time build])])
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 AC_SUBST([AMDEPBACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 3
+# serial 6
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
 
@@ -362,7 +406,7 @@ done
 # This macro should only be invoked once -- use via AC_REQUIRE.
 #
 # This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each `.P' file that we will
+# is enabled.  FIXME.  This creates each '.P' file that we will
 # need in order to bootstrap the dependency handling code.
 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 [AC_CONFIG_COMMANDS([depfiles],
@@ -372,14 +416,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 13
+# serial 19
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -396,7 +439,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.60])dnl
+[AC_PREREQ([2.62])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -425,55 +468,85 @@ AC_SUBST([CYGPATH_W])
 # Define the identity of the package.
 dnl Distinguish between old-style and new-style calls.
 m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[AC_DIAGNOSE([obsolete],
+[$0: two- and three-arguments forms are deprecated.  For more info, see:
+http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
 [_AM_SET_OPTIONS([$1])dnl
 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+m4_if(
+  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  [ok:ok],,
   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
 _AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
 
 # Some tools Automake needs.
 AC_REQUIRE([AM_SANITY_CHECK])dnl
 AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
+             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+                 [_AM_DEPENDENCIES([CC])],
+                 [m4_define([AC_PROG_CC],
+                            m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+                 [_AM_DEPENDENCIES([CXX])],
+                 [m4_define([AC_PROG_CXX],
+                            m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                  [_AM_DEPENDENCIES(OBJC)],
-                  [define([AC_PROG_OBJC],
-                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+                 [_AM_DEPENDENCIES([OBJC])],
+                 [m4_define([AC_PROG_OBJC],
+                            m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+dnl Support for Objective C++ was only introduced in Autoconf 2.65,
+dnl but we still cater to Autoconf 2.62.
+m4_ifdef([AC_PROG_OBJCXX],
+[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+                 [_AM_DEPENDENCIES([OBJCXX])],
+                 [m4_define([AC_PROG_OBJCXX],
+                            m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
 ])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
 
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
@@ -496,21 +569,30 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 8
+
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
-AC_SUBST(install_sh)])
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST([install_sh])])
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -533,13 +615,13 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 5
 
 # AM_MAKE_INCLUDE()
 # -----------------
@@ -548,7 +630,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
 [am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-       @echo done
+       @echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -558,24 +640,24 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 AC_SUBST([am__include])
 AC_SUBST([am__quote])
@@ -583,14 +665,13 @@ AC_MSG_RESULT([$_am_result])
 rm -f confinc confmf
 ])
 
-# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
+# serial 6
 
 # AM_PROG_CC_C_O
 # --------------
@@ -602,8 +683,9 @@ AC_REQUIRE_AUX_FILE([compile])dnl
 # FIXME: we rely on the cache variable name because
 # there is no other way.
 set dummy $CC
-ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
    # Losing compiler, so override with the script.
    # FIXME: It is wrong to rewrite CC.
    # But if we don't then we get into trouble of one sort or another.
@@ -619,14 +701,13 @@ m4_define([AC_PROG_CC],
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
+# serial 7
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -643,51 +724,32 @@ AC_SUBST($1)])
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+  AC_MSG_WARN(['missing' script is too old or missing])
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 6
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -695,16 +757,16 @@ AC_DEFUN([_AM_MANGLE_OPTION],
 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
 # _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
 # Set option NAME.  Presently that only means defining a flag for this option.
 AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
 
 # _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 # -------------------------------------------
@@ -714,45 +776,62 @@ AC_DEFUN([_AM_IF_OPTION],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 9
 
 # AM_SANITY_CHECK
 # ---------------
 AC_DEFUN([AM_SANITY_CHECK],
 [AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$[*]" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$[*]" != "X $srcdir/configure conftest.file" \
-      && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$[*]" = "X"; then
+       # -L didn't work.
+       set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$[*]" != "X $srcdir/configure conftest.file" \
+       && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+       # If neither matched, then we have a broken ls.  This can happen
+       # if, for instance, CONFIG_SHELL is bash and it inherits a
+       # broken ls alias from the environment.  This has actually
+       # happened.  Such a system could not be considered "sane".
+       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment])
+     fi
+     if test "$[2]" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
    test "$[2]" = conftest.file
    )
 then
@@ -762,62 +841,87 @@ else
    AC_MSG_ERROR([newly created file is older than distributed files!
 Check your system clock])
 fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+  [AC_MSG_CHECKING([that generated files are newer than configure])
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # AM_PROG_INSTALL_STRIP
 # ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
+# One issue with vendor 'install' (even GNU) is that you can't
 # specify the program used to strip binaries.  This is especially
 # annoying in cross-compiling environments, where the build's strip
 # is unlikely to handle the host's binaries.
 # Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
+# always use install-sh in "make install-strip", and initialize
 # STRIPPROG with the value of the STRIP variable (set by the user).
 AC_DEFUN([AM_PROG_INSTALL_STRIP],
 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
 # tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
 if test "$cross_compiling" != no; then
   AC_CHECK_TOOL([STRIP], [strip], :)
 fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 3
+
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 # This macro is traced by Automake.
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004-2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
+# serial 3
 
 # _AM_PROG_TAR(FORMAT)
 # --------------------
 # Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
 #
 # Substitute a variable $(am__tar) that is a command
 # writing to stdout a FORMAT-tarball containing the directory
@@ -828,10 +932,11 @@ AC_DEFUN([_AM_SUBST_NOTMAKE])
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
 AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
 m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
      [m4_case([$1], [ustar],, [pax],,
               [m4_fatal([Unknown tar format])])
 AC_MSG_CHECKING([how to create a $1 tar archive])
@@ -839,7 +944,7 @@ AC_MSG_CHECKING([how to create a $1 tar archive])
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
 # Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
+# Solaris sh will not grok spaces in the rhs of '-'.
 for _am_tool in $_am_tools
 do
   case $_am_tool in
index 7a4d6e347ec4e682a0151ed2660da3c5755ee77b..42c3672cd1b1bf91c0c6de677b00f6229f57e117 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
-dist-hook: check-install
-.PHONY: check-install
-check-install: $(srcdir)/INSTALL
-       $(srcdir)/admin/check-install.sh $(srcdir)/INSTALL
-
 dist-hook: check-style
-.PHONY: check-style
+PHONY_TARGETS += check-style
 check-style:
        $(srcdir)/admin/check-style.sh
 
-EXTRA_DIST += admin/check-install.sh \
-              admin/check-style-common.awk \
+EXTRA_DIST += admin/check-style-common.awk \
               admin/check-style-c.awk \
               admin/check-style-cpp.awk \
               admin/check-style-man.awk \
diff --git a/unit/atf-src/admin/check-install.sh b/unit/atf-src/admin/check-install.sh
deleted file mode 100755 (executable)
index 3bd70bf..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#! /bin/sh
-#
-# Automated Testing Framework (atf)
-#
-# Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, 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:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. 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.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
-#
-
-#
-# A utility to ensure that INSTALL lists the correct versions of the
-# tools used to generate the distfile.
-#
-
-Prog_Name=${0##*/}
-
-#
-# err message
-#
-err() {
-    echo "${Prog_Name}: ${@}" 1>&2
-    exit 1
-}
-
-#
-# warn message
-#
-warn() {
-    echo "${Prog_Name}: ${@}" 1>&2
-}
-
-#
-# check_tool readme_file prog_name verbose_name
-#
-#   Executes 'prog_name' to determine its version and checks if the
-#   given 'readme_file' contains 'verbose_name <version>' in it.
-#
-check_tool() {
-    readme=${1}
-    prog=${2}
-    name=${3}
-
-    ver=$(${prog} --version | head -n 1 | cut -d ' ' -f 4)
-
-    if grep "\\* ${name} ${ver}" ${readme} >/dev/null; then
-        true
-    else
-        warn "Incorrect version of ${name}"
-        false
-    fi
-}
-
-#
-# main readme_file
-#
-# Entry point.
-#
-main() {
-    readme=${1}
-    ret=0
-
-    check_tool ${readme} autoconf "GNU autoconf" || ret=1
-    check_tool ${readme} automake "GNU automake" || ret=1
-    check_tool ${readme} libtool "GNU libtool" || ret=1
-
-    return ${ret}
-}
-
-main "${@}"
-
-# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4
index 9319714a6ab4db2428bee1105f0fa12b6b691cbe..bf4a9551e67b42e77c51f11f06c3124b8e3bc4a7 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
index 1c536ceaec643a95be4b1a445602238c22d55240..7b6e72ad653e5bc78c9d955ca5a4162db77ed1c3 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
index 9b289a8b3de8b272e2660dd78b391bb69bca1c10..4a797e7f98e48f4f5cc3d86c7ae3dc11f1ce0502 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
index 73e5ced2da64b1f41f78d4483ff546cd62d8d089..4751aaac7aac5c1caa2eaa00a3cd06194da502e8 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
index cdd5504e9ff755ef4b038115f702f5e817e0cae8..ac80db401857de0c49b1e1be5544f7bde6b29eb6 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
index cf3556795fd8da8fec7f73745f12af1978e0a897..a4f2410ddcc262c19900cf0e996a88efddcea43f 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -91,6 +91,7 @@ find_sources() {
               -name "*.c" -o \
               -name "*.cpp" -o \
               -name "*.h" -o \
+              -name "*.h.in" -o \
               -name "*.hpp" -o \
               -name "*.m4" -o \
               -name "*.sh" \
@@ -100,6 +101,7 @@ find_sources() {
               -type f -a \
               \! -name "aclocal.m4" \
               \! -name "bconfig.h" \
+              \! -name "defs.h" \
               \! -name "libtool.m4" \
               \! -name "ltoptions.m4" \
               \! -name "ltsugar.m4" \
index c0096a7b563231c0c7ade728962574ec3b8df270..7b4a9a7e1e2ecf810712c178220d922df95f6898 100755 (executable)
@@ -1,10 +1,9 @@
 #! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
+# Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2009-10-06.20; # UTC
+scriptversion=2012-03-05.13; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
-# Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -29,21 +28,219 @@ scriptversion=2009-10-06.20; # UTC
 # bugs to <bug-automake@gnu.org> or send patches to
 # <automake-patches@gnu.org>.
 
+nl='
+'
+
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" ""       $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+       # lazily determine how to convert abs files
+       case `uname -s` in
+         MINGW*)
+           file_conv=mingw
+           ;;
+         CYGWIN*)
+           file_conv=cygwin
+           ;;
+         *)
+           file_conv=wine
+           ;;
+       esac
+      fi
+      case $file_conv/,$2, in
+       *,$file_conv,*)
+         ;;
+       mingw/*)
+         file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+         ;;
+       cygwin/*)
+         file=`cygpath -m "$file" || echo "$file"`
+         ;;
+       wine/*)
+         file=`winepath -w "$file" || echo "$file"`
+         ;;
+      esac
+      ;;
+  esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  lib_path=
+  shared=:
+  linker_opts=
+  for arg
+  do
+    if test -n "$eat"; then
+      eat=
+    else
+      case $1 in
+       -o)
+         # configure might choose to run compile as 'compile cc -o foo foo.c'.
+         eat=1
+         case $2 in
+           *.o | *.[oO][bB][jJ])
+             func_file_conv "$2"
+             set x "$@" -Fo"$file"
+             shift
+             ;;
+           *)
+             func_file_conv "$2"
+             set x "$@" -Fe"$file"
+             shift
+             ;;
+         esac
+         ;;
+       -I)
+         eat=1
+         func_file_conv "$2" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
+       -I*)
+         func_file_conv "${1#-I}" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
+       -l)
+         eat=1
+         func_cl_dashl "$2"
+         set x "$@" "$lib"
+         shift
+         ;;
+       -l*)
+         func_cl_dashl "${1#-l}"
+         set x "$@" "$lib"
+         shift
+         ;;
+       -L)
+         eat=1
+         func_cl_dashL "$2"
+         ;;
+       -L*)
+         func_cl_dashL "${1#-L}"
+         ;;
+       -static)
+         shared=false
+         ;;
+       -Wl,*)
+         arg=${1#-Wl,}
+         save_ifs="$IFS"; IFS=','
+         for flag in $arg; do
+           IFS="$save_ifs"
+           linker_opts="$linker_opts $flag"
+         done
+         IFS="$save_ifs"
+         ;;
+       -Xlinker)
+         eat=1
+         linker_opts="$linker_opts $2"
+         ;;
+       -*)
+         set x "$@" "$1"
+         shift
+         ;;
+       *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+         func_file_conv "$1"
+         set x "$@" -Tp"$file"
+         shift
+         ;;
+       *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+         func_file_conv "$1" mingw
+         set x "$@" "$file"
+         shift
+         ;;
+       *)
+         set x "$@" "$1"
+         shift
+         ;;
+      esac
+    fi
+    shift
+  done
+  if test -n "$linker_opts"; then
+    linker_opts="-link$linker_opts"
+  fi
+  exec "$@" $linker_opts
+  exit 1
+}
+
+eat=
+
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
      exit 1;
      ;;
   -h | --h*)
     cat <<\EOF
 Usage: compile [--help] [--version] PROGRAM [ARGS]
 
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
 arguments, and rename the output as expected.
 
 If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
+right script to run: please start by reading the file 'INSTALL'.
 
 Report bugs to <bug-automake@gnu.org>.
 EOF
@@ -53,11 +250,13 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+    func_cl_wrapper "$@"      # Doesn't return...
+    ;;
 esac
 
 ofile=
 cfile=
-eat=
 
 for arg
 do
@@ -66,8 +265,8 @@ do
   else
     case $1 in
       -o)
-       # configure might choose to run compile as `compile cc -o foo foo.c'.
-       # So we strip `-o arg' only if arg is an object.
+       # configure might choose to run compile as 'compile cc -o foo foo.c'.
+       # So we strip '-o arg' only if arg is an object.
        eat=1
        case $2 in
          *.o | *.obj)
@@ -94,10 +293,10 @@ do
 done
 
 if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
+  # If no '-o' option was seen then we might have been invoked from a
   # pattern rule where we don't need one.  That is ok -- this is a
   # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
+  # '.c' file was seen then we are probably linking.  That is also
   # ok.
   exec "$@"
 fi
@@ -106,7 +305,7 @@ fi
 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
 
 # Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
 # that we are using for the .o file.  Also, base the name on the expected
 # object file name, since that is what matters with a parallel build.
 lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
index df8eea7e4ce8862105fcd7929b20bdb45488048b..debb6ffa3eae410200617afdc04f86860a0a5ab7 100755 (executable)
@@ -1,10 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-03-27.16; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,7 +27,7 @@ scriptversion=2009-04-28.21; # UTC
 
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
      exit 1;
      ;;
   -h | --h*)
@@ -40,11 +39,11 @@ as side-effects.
 
 Environment variables:
   depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
+  source      Source file read by 'PROGRAMS ARGS'.
+  object      Object file output by 'PROGRAMS ARGS'.
   DEPDIR      directory where to store dependencies.
   depfile     Dependency file to output.
-  tmpdepfile  Temporary file to use when outputing dependencies.
+  tmpdepfile  Temporary file to use when outputting dependencies.
   libtool     Whether libtool is used (yes/no).
 
 Report bugs to <bug-automake@gnu.org>.
@@ -57,6 +56,12 @@ EOF
     ;;
 esac
 
+# A tabulation character.
+tab='  '
+# A newline character.
+nl='
+'
+
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
   exit 1
@@ -90,10 +95,24 @@ if test "$depmode" = msvcmsys; then
    # This is just like msvisualcpp but w/o cygpath translation.
    # Just convert the backslash-escaped backslashes to single forward
    # slashes to satisfy depend.m4
-   cygpath_u="sed s,\\\\\\\\,/,g"
+   cygpath_u='sed s,\\\\,/,g'
    depmode=msvisualcpp
 fi
 
+if test "$depmode" = msvc7msys; then
+   # This is just like msvc7 but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u='sed s,\\\\,/,g'
+   depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
+   gccflag=-qmakedep=gcc,-MF
+   depmode=gcc
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
@@ -148,20 +167,21 @@ gcc)
 ## The second -e expression handles DOS-style file names with drive letters.
   sed -e 's/^[^:]*: / /' \
       -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
+## This next piece of magic avoids the "deleted header file" problem.
 ## The problem is that when a header file which appears in a .P file
 ## is deleted, the dependency causes make to die (because there is
 ## typically no way to rebuild the header).  We avoid this by adding
 ## dummy dependencies for each header file.  Too bad gcc doesn't do
 ## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
+  tr ' ' "$nl" < "$tmpdepfile" |
+## Some versions of gcc put a space before the ':'.  On the theory
 ## that the space means something, we add a space to the output as
-## well.
+## well.  hp depmode also adds that space, but also prefixes the VPATH
+## to the object.  Take care to not repeat it in the output.
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+      | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -193,18 +213,15 @@ sgi)
     # clever and replace this with sed code, as IRIX sed won't handle
     # lines with more than a fixed number of characters (4096 in
     # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
+    # the IRIX cc adds comments like '#:fec' to the end of the
     # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
+    tr ' ' "$nl" < "$tmpdepfile" \
     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> "$depfile"
+    tr "$nl" ' ' >> "$depfile"
     echo >> "$depfile"
 
     # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
+    tr ' ' "$nl" < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
    >> "$depfile"
   else
@@ -216,10 +233,17 @@ sgi)
   rm -f "$tmpdepfile"
   ;;
 
+xlc)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 aix)
   # The C for AIX Compiler uses -M and outputs the dependencies
   # in a .u file.  In older versions, this file always lives in the
-  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # current directory.  Also, the AIX compiler puts '$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
@@ -249,12 +273,11 @@ aix)
     test -f "$tmpdepfile" && break
   done
   if test -f "$tmpdepfile"; then
-    # Each line is of the form `foo.o: dependent.h'.
+    # Each line is of the form 'foo.o: dependent.h'.
     # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
+    # '$object: dependent.h' and one to simply 'dependent.h:'.
     sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+    sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -265,23 +288,26 @@ aix)
   ;;
 
 icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
+  # However on
+  #    $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
   # ICC 7.0 will fill foo.d with something like
   #    foo.o: sub/foo.c
   #    foo.o: sub/foo.h
-  # which is wrong.  We want:
+  # which is wrong.  We want
   #    sub/foo.o: sub/foo.c
   #    sub/foo.o: sub/foo.h
   #    sub/foo.c:
   #    sub/foo.h:
   # ICC 7.1 will output
   #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using :
+  # and will wrap long lines using '\':
   #    foo.o: sub/foo.c ... \
   #     sub/foo.h ... \
   #     ...
-
+  # tcc 0.9.26 (FIXME still under development at the moment of writing)
+  # will emit a similar output, but also prepend the continuation lines
+  # with horizontal tabulation characters.
   "$@" -MD -MF "$tmpdepfile"
   stat=$?
   if test $stat -eq 0; then :
@@ -290,15 +316,21 @@ icc)
     exit $stat
   fi
   rm -f "$depfile"
-  # Each line is of the form `foo.o: dependent.h',
-  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Each line is of the form 'foo.o: dependent.h',
+  # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
   # Do two passes, one to just change these to
-  # `$object: dependent.h' and one to simply `dependent.h:'.
-  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
-  # Some versions of the HPUX 10.20 sed can't process this invocation
-  # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
+  # '$object: dependent.h' and one to simply 'dependent.h:'.
+  sed -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \
+    < "$tmpdepfile" > "$depfile"
+  sed '
+    s/[ '"$tab"'][ '"$tab"']*/ /g
+    s/^ *//
+    s/ *\\*$//
+    s/^[^:]*: *//
+    /^$/d
+    /:$/d
+    s/$/ :/
+  ' < "$tmpdepfile" >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -334,7 +366,7 @@ hp2)
   done
   if test -f "$tmpdepfile"; then
     sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
-    # Add `dependent.h:' lines.
+    # Add 'dependent.h:' lines.
     sed -ne '2,${
               s/^ *//
               s/ \\*$//
@@ -349,9 +381,9 @@ hp2)
 
 tru64)
    # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
    # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
+   # dependencies in 'foo.d' instead, so we check for that too.
    # Subdirectories are respected.
    dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
    test "x$dir" = "x$object" && dir=
@@ -397,14 +429,59 @@ tru64)
    done
    if test -f "$tmpdepfile"; then
       sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+      sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
    else
       echo "#dummy" > "$depfile"
    fi
    rm -f "$tmpdepfile"
    ;;
 
+msvc7)
+  if test "$libtool" = yes; then
+    showIncludes=-Wc,-showIncludes
+  else
+    showIncludes=-showIncludes
+  fi
+  "$@" $showIncludes > "$tmpdepfile"
+  stat=$?
+  grep -v '^Note: including file: ' "$tmpdepfile"
+  if test "$stat" = 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The first sed program below extracts the file names and escapes
+  # backslashes for cygpath.  The second sed program outputs the file
+  # name when reading, but also accumulates all include files in the
+  # hold buffer in order to output them again at the end.  This only
+  # works with sed implementations that can handle large buffers.
+  sed < "$tmpdepfile" -n '
+/^Note: including file:  *\(.*\)/ {
+  s//\1/
+  s/\\/\\\\/g
+  p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+  s/.*/'"$tab"'/
+  G
+  p
+}' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvc7msys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 #nosideeffect)
   # This comment above is used by automake to tell side-effect
   # dependency tracking mechanisms from slower ones.
@@ -422,7 +499,7 @@ dashmstdout)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -442,15 +519,14 @@ dashmstdout)
   done
 
   test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
+  # Require at least two characters before searching for ':'
   # in the target name.  This is to cope with DOS-style filenames:
-  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
   "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+    sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
+  tr ' ' "$nl" < "$tmpdepfile" | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -503,9 +579,10 @@ makedepend)
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -525,7 +602,7 @@ cpp)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -594,8 +671,8 @@ msvisualcpp)
   sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::     \1 \\:p' >> "$depfile"
-  echo "       " >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
   sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
index 676e42e0a8566dd5f6d95f09de0e7674c228f0b9..b12c0f71892016ab47a4f6138b483517f7926074 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: install-sh.in,v 1.4 2007/07/12 18:32:50 jlam Exp $
+# $NetBSD: install-sh.in,v 1.6 2012/01/11 13:07:31 hans Exp $
 # This script now also installs multiple files, but might choke on installing
 # multiple files with spaces in the file names.
 #
@@ -44,7 +44,8 @@ stripprog="${STRIPPROG-strip}"
 rmprog="${RMPROG-rm}"
 mkdirprog="${MKDIRPROG-mkdir}"
 
-instcmd="$mvprog"
+instcmd="$cpprog"
+instflags=""
 pathcompchmodcmd="$chmodprog 755"
 chmodcmd="$chmodprog 755"
 chowncmd=""
@@ -84,6 +85,11 @@ while [ x"$1" != x ]; do
            shift
            continue;;
 
+       -m*)
+           chmodcmd="$chmodprog ${1#-m}"
+           shift
+           continue;;
+
        -o) chowncmd="$chownprog $2"
            shift
            shift
@@ -104,6 +110,10 @@ while [ x"$1" != x ]; do
            shift
            continue;;
 
+       -p) instflags="-p"
+           shift
+           continue;;
+
        *)  if [ x"$msrc" = x ]
            then
                msrc="$dst"
@@ -154,7 +164,7 @@ else
 
        if [ -f "$srcarg" ]
        then
-               doinst="$instcmd"
+               doinst="$instcmd $instflags"
        elif [ -d "$srcarg" ]
        then
                echo "install: $srcarg: not a regular file"
index 8239238348e6a99a02c22ef2414548764531a01d..c3098b537f909024e2ec3a4d14157e83258953b2 100755 (executable)
@@ -4522,7 +4522,7 @@ func_mode_link ()
       -l*)
        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
          case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
            # These systems don't actually have a C or math library (as such)
            continue
            ;;
@@ -6308,6 +6308,7 @@ func_mode_link ()
          func_arith $current - $age
          major=.$func_arith_result
          versuffix="$major.$age.$revision"
+         versuffix2="$major.$age"
          ;;
 
        osf)
@@ -6368,8 +6369,10 @@ func_mode_link ()
          esac
          if test "$need_version" = no; then
            versuffix=
+           versuffix2=
          else
            versuffix=".0.0"
+           versuffix2=".0.0"
          fi
        fi
 
@@ -6377,6 +6380,7 @@ func_mode_link ()
        if test "$avoid_version" = yes && test "$need_version" = no; then
          major=
          versuffix=
+         versuffix2=
          verstring=""
        fi
 
@@ -6476,7 +6480,7 @@ func_mode_link ()
       if test "$build_libtool_libs" = yes; then
        if test -n "$rpath"; then
          case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
            # these systems don't actually have a c library (as such)!
            ;;
          *-*-rhapsody* | *-*-darwin1.[012])
index 28055d2ae6f2a2c584afcd769d7881e11f62ecd9..9a5564823de4c47d7825a85adea87328123cb6ff 100755 (executable)
@@ -1,10 +1,9 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-01-06.18; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -26,7 +25,7 @@ scriptversion=2009-04-28.21; # UTC
 # the same distribution terms that you use for the rest of that program.
 
 if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
+  echo 1>&2 "Try '$0 --help' for more information"
   exit 1
 fi
 
@@ -34,7 +33,7 @@ run=:
 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
 
-# In the cases where this matters, `missing' is being run in the
+# In the cases where this matters, 'missing' is being run in the
 # srcdir already.
 if test -f configure.ac; then
   configure_ac=configure.ac
@@ -65,7 +64,7 @@ case $1 in
     echo "\
 $0 [OPTION]... PROGRAM [ARGUMENT]...
 
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
 error status if there is no known handling for PROGRAM.
 
 Options:
@@ -74,21 +73,20 @@ Options:
   --run           try to run the given command, and emulate it if it fails
 
 Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
+  aclocal      touch file 'aclocal.m4'
+  autoconf     touch file 'configure'
+  autoheader   touch file 'config.h.in'
   autom4te     touch the output file, or create a stub one
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
+  automake     touch all 'Makefile.in' files
+  bison        create 'y.tab.[ch]', if possible, from existing .[ch]
+  flex         create 'lex.yy.c', if possible, from existing .c
   help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
+  lex          create 'lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+  yacc         create 'y.tab.[ch]', if possible, from existing .[ch]
 
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
 
 Send bug reports to <bug-automake@gnu.org>."
     exit $?
@@ -100,8 +98,8 @@ Send bug reports to <bug-automake@gnu.org>."
     ;;
 
   -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
+    echo 1>&2 "$0: Unknown '$1' option"
+    echo 1>&2 "Try '$0 --help' for more information"
     exit 1
     ;;
 
@@ -122,22 +120,13 @@ case $1 in
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar*)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
   *)
     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
        # We have it, but it failed.
        exit 1
     elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
        # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # running '$TOOL --version' or '$TOOL --help' to check whether
        # $TOOL exists and not knowing $TOOL uses missing.
        exit 1
     fi
@@ -149,27 +138,27 @@ esac
 case $program in
   aclocal*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
+WARNING: '$1' is $msg.  You should only need it if
+         you modified 'acinclude.m4' or '${configure_ac}'.  You might want
+         to install the Automake and Perl packages.  Grab them from
          any GNU archive site."
     touch aclocal.m4
     ;;
 
   autoconf*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+WARNING: '$1' is $msg.  You should only need it if
+         you modified '${configure_ac}'.  You might want to install the
+         Autoconf and GNU m4 packages.  Grab them from any GNU
          archive site."
     touch configure
     ;;
 
   autoheader*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+WARNING: '$1' is $msg.  You should only need it if
+         you modified 'acconfig.h' or '${configure_ac}'.  You might want
+         to install the Autoconf and GNU m4 packages.  Grab them
          from any GNU archive site."
     files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
     test -z "$files" && files="config.h"
@@ -186,9 +175,9 @@ WARNING: \`$1' is $msg.  You should only need it if
 
   automake*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
+WARNING: '$1' is $msg.  You should only need it if
+         you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
+         You might want to install the Automake and Perl packages.
          Grab them from any GNU archive site."
     find . -type f -name Makefile.am -print |
           sed 's/\.am$/.in/' |
@@ -197,10 +186,10 @@ WARNING: \`$1' is $msg.  You should only need it if
 
   autom4te*)
     echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
+WARNING: '$1' is needed, but is $msg.
          You might have modified some files without having the
          proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
+         You can get '$1' as part of Autoconf from any GNU
          archive site."
 
     file=`echo "$*" | sed -n "$sed_output"`
@@ -220,13 +209,13 @@ WARNING: \`$1' is needed, but is $msg.
 
   bison*|yacc*)
     echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
+WARNING: '$1' $msg.  You should only need it if
+         you modified a '.y' file.  You may need the Bison package
          in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
+         Bison from any GNU archive site."
     rm -f y.tab.c y.tab.h
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
        case $LASTARG in
        *.y)
            SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@@ -250,13 +239,13 @@ WARNING: \`$1' $msg.  You should only need it if
 
   lex*|flex*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
+WARNING: '$1' is $msg.  You should only need it if
+         you modified a '.l' file.  You may need the Flex package
          in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
+         Flex from any GNU archive site."
     rm -f lex.yy.c
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
        case $LASTARG in
        *.l)
            SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@@ -273,10 +262,10 @@ WARNING: \`$1' is $msg.  You should only need it if
 
   help2man*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
+WARNING: '$1' is $msg.  You should only need it if
         you modified a dependency of a manual page.  You may need the
-        \`Help2man' package in order for those modifications to take
-        effect.  You can get \`Help2man' from any GNU archive site."
+        Help2man package in order for those modifications to take
+        effect.  You can get Help2man from any GNU archive site."
 
     file=`echo "$*" | sed -n "$sed_output"`
     test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
@@ -291,12 +280,12 @@ WARNING: \`$1' is $msg.  You should only need it if
 
   makeinfo*)
     echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
+WARNING: '$1' is $msg.  You should only need it if
+         you modified a '.texi' or '.texinfo' file, or any other file
          indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
+         call might also be the consequence of using a buggy 'make' (AIX,
+         DU, IRIX).  You might want to install the Texinfo package or
+         the GNU make package.  Grab either from any GNU archive site."
     # The file to touch is that specified with -o ...
     file=`echo "$*" | sed -n "$sed_output"`
     test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
@@ -318,49 +307,14 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar*)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case $firstarg in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case $firstarg in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
   *)
     echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
+WARNING: '$1' is needed, and is $msg.
          You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
+         proper tools for further handling them.  Check the 'README' file,
          it often tells you about the needed prerequisites for installing
          this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
+         some other package would contain this missing '$1' program."
     exit 1
     ;;
 esac
index 5c8d92311d4f4f5b40718e29962269431b086451..e915aef2016470e0cc7b564f7cabb6ad9faa3e68 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -31,5 +31,6 @@
 #define _ATF_CXX_HPP_
 
 #include <atf-c++/macros.hpp>
+#include <atf-c++/utils.hpp>
 
 #endif // !defined(_ATF_CXX_HPP_)
diff --git a/unit/atf-src/atf-c++/Kyuafile b/unit/atf-src/atf-c++/Kyuafile
new file mode 100644 (file)
index 0000000..6df836f
--- /dev/null
@@ -0,0 +1,14 @@
+syntax("kyuafile", 1)
+
+test_suite("atf")
+
+atf_test_program{name="atf_c++_test"}
+atf_test_program{name="build_test"}
+atf_test_program{name="check_test"}
+atf_test_program{name="config_test"}
+atf_test_program{name="macros_test"}
+atf_test_program{name="pkg_config_test"}
+atf_test_program{name="tests_test"}
+atf_test_program{name="utils_test"}
+
+include("detail/Kyuafile")
index e7287d32f77d13be2654e117bd7a9fe2e01e0d43..2d968026b391f5734a074634174590e8ad8962e6 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -27,6 +27,8 @@
 # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
+ATF_CXX_LIBS = libatf-c++.la libatf-c.la
+
 lib_LTLIBRARIES += libatf-c++.la
 libatf_c___la_LIBADD = libatf-c.la
 libatf_c___la_SOURCES = atf-c++/build.cpp \
@@ -36,59 +38,63 @@ libatf_c___la_SOURCES = atf-c++/build.cpp \
                         atf-c++/config.cpp \
                         atf-c++/config.hpp \
                         atf-c++/macros.hpp \
+                        atf-c++/noncopyable.hpp \
                         atf-c++/tests.cpp \
                         atf-c++/tests.hpp \
+                        atf-c++/utils.cpp \
                         atf-c++/utils.hpp
+libatf_c___la_LDFLAGS = -version-info 0:0:0
 
 include_HEADERS += atf-c++.hpp
 atf_c___HEADERS = atf-c++/build.hpp \
                   atf-c++/check.hpp \
                   atf-c++/config.hpp \
                   atf-c++/macros.hpp \
+                  atf-c++/noncopyable.hpp \
                   atf-c++/tests.hpp \
                   atf-c++/utils.hpp
 atf_c__dir = $(includedir)/atf-c++
 
 dist_man_MANS += atf-c++/atf-c++-api.3
 
+atf_aclocal_DATA += atf-c++/atf-c++.m4
+EXTRA_DIST += atf-c++/atf-c++.m4
+
 atf_c__dirpkgconfigdir = $(atf_pkgconfigdir)
 atf_c__dirpkgconfig_DATA = atf-c++/atf-c++.pc
 CLEANFILES += atf-c++/atf-c++.pc
 EXTRA_DIST += atf-c++/atf-c++.pc.in
-atf-c++/atf-c++.pc: $(srcdir)/atf-c++/atf-c++.pc.in
+atf-c++/atf-c++.pc: $(srcdir)/atf-c++/atf-c++.pc.in Makefile
        test -d atf-c++ || mkdir -p atf-c++
-       sed -e 's,__ATF_VERSION__,@PACKAGE_VERSION@,g' \
-           -e 's,__CXX__,$(CXX),g' \
-           -e 's,__INCLUDEDIR__,$(includedir),g' \
-           -e 's,__LIBDIR__,$(libdir),g' \
+       sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \
+           -e 's#__CXX__#$(CXX)#g' \
+           -e 's#__INCLUDEDIR__#$(includedir)#g' \
+           -e 's#__LIBDIR__#$(libdir)#g' \
            <$(srcdir)/atf-c++/atf-c++.pc.in >atf-c++/atf-c++.pc.tmp
        mv atf-c++/atf-c++.pc.tmp atf-c++/atf-c++.pc
 
 tests_atf_c___DATA = atf-c++/Atffile \
-                   atf-c++/macros_hpp_test.cpp
+                     atf-c++/Kyuafile \
+                     atf-c++/macros_hpp_test.cpp \
+                     atf-c++/unused_test.cpp
 tests_atf_c__dir = $(pkgtestsdir)/atf-c++
 EXTRA_DIST += $(tests_atf_c___DATA)
 
 tests_atf_c___PROGRAMS = atf-c++/atf_c++_test
 atf_c___atf_c___test_SOURCES = atf-c++/atf_c++_test.cpp
-atf_c___atf_c___test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-
+atf_c___atf_c___test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 tests_atf_c___PROGRAMS += atf-c++/build_test
 atf_c___build_test_SOURCES = atf-c++/build_test.cpp atf-c/h_build.h
-atf_c___build_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-
+atf_c___build_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 tests_atf_c___PROGRAMS += atf-c++/check_test
 atf_c___check_test_SOURCES = atf-c++/check_test.cpp
-atf_c___check_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-
+atf_c___check_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 tests_atf_c___PROGRAMS += atf-c++/config_test
 atf_c___config_test_SOURCES = atf-c++/config_test.cpp
-atf_c___config_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-
+atf_c___config_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 tests_atf_c___PROGRAMS += atf-c++/macros_test
 atf_c___macros_test_SOURCES = atf-c++/macros_test.cpp
-atf_c___macros_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-
+atf_c___macros_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 tests_atf_c___SCRIPTS = atf-c++/pkg_config_test
 CLEANFILES += atf-c++/pkg_config_test
 EXTRA_DIST += atf-c++/pkg_config_test.sh
@@ -99,12 +105,10 @@ atf-c++/pkg_config_test: $(srcdir)/atf-c++/pkg_config_test.sh
 
 tests_atf_c___PROGRAMS += atf-c++/tests_test
 atf_c___tests_test_SOURCES = atf-c++/tests_test.cpp
-atf_c___tests_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-
+atf_c___tests_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 tests_atf_c___PROGRAMS += atf-c++/utils_test
 atf_c___utils_test_SOURCES = atf-c++/utils_test.cpp
-atf_c___utils_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
-
+atf_c___utils_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 include atf-c++/detail/Makefile.am.inc
 
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
index 42e6ed759da42dbcb8883ebcde48bb9f71084583..d0579a9a754418520115a06510e363dc671260cc 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" Automated Testing Framework (atf)
 .\"
-.\" Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 21, 2010
+.Dd November 30, 2012
 .Dt ATF-C++-API 3
 .Os
 .Sh NAME
+.Nm atf-c++-api ,
 .Nm ATF_ADD_TEST_CASE ,
 .Nm ATF_CHECK_ERRNO ,
 .Nm ATF_FAIL ,
@@ -38,7 +39,9 @@
 .Nm ATF_REQUIRE ,
 .Nm ATF_REQUIRE_EQ ,
 .Nm ATF_REQUIRE_ERRNO ,
+.Nm ATF_REQUIRE_IN ,
 .Nm ATF_REQUIRE_MATCH ,
+.Nm ATF_REQUIRE_NOT_IN ,
 .Nm ATF_REQUIRE_THROW ,
 .Nm ATF_REQUIRE_THROW_RE ,
 .Nm ATF_SKIP ,
 .Nm ATF_TEST_CASE_BODY ,
 .Nm ATF_TEST_CASE_CLEANUP ,
 .Nm ATF_TEST_CASE_HEAD ,
+.Nm ATF_TEST_CASE_NAME ,
+.Nm ATF_TEST_CASE_USE ,
 .Nm ATF_TEST_CASE_WITH_CLEANUP ,
 .Nm ATF_TEST_CASE_WITHOUT_HEAD ,
+.Nm atf::utils::cat_file ,
+.Nm atf::utils::compare_file ,
+.Nm atf::utils::copy_file ,
+.Nm atf::utils::create_file ,
+.Nm atf::utils::file_exists ,
+.Nm atf::utils::fork ,
+.Nm atf::utils::grep_collection ,
+.Nm atf::utils::grep_file ,
+.Nm atf::utils::grep_string ,
+.Nm atf::utils::redirect ,
+.Nm atf::utils::wait
 .Nd C++ API to write ATF-based test programs
 .Sh SYNOPSIS
 .In atf-c++.hpp
@@ -59,7 +75,9 @@
 .Fn ATF_REQUIRE "expression"
 .Fn ATF_REQUIRE_EQ "expression_1" "expression_2"
 .Fn ATF_REQUIRE_ERRNO "exp_errno" "bool_expression"
+.Fn ATF_REQUIRE_IN "element" "collection"
 .Fn ATF_REQUIRE_MATCH "regexp" "string_expression"
+.Fn ATF_REQUIRE_NOT_IN "element" "collection"
 .Fn ATF_REQUIRE_THROW "expected_exception" "statement"
 .Fn ATF_REQUIRE_THROW_RE "expected_exception" "regexp" "statement"
 .Fn ATF_SKIP "reason"
 .Fn ATF_TEST_CASE_BODY "name"
 .Fn ATF_TEST_CASE_CLEANUP "name"
 .Fn ATF_TEST_CASE_HEAD "name"
+.Fn ATF_TEST_CASE_NAME "name"
+.Fn ATF_TEST_CASE_USE "name"
 .Fn ATF_TEST_CASE_WITH_CLEANUP "name"
 .Fn ATF_TEST_CASE_WITHOUT_HEAD "name"
+.Ft void
+.Fo atf::utils::cat_file
+.Fa "const std::string& path"
+.Fa "const std::string& prefix"
+.Fc
+.Ft bool
+.Fo atf::utils::compare_file
+.Fa "const std::string& path"
+.Fa "const std::string& contents"
+.Fc
+.Ft void
+.Fo atf::utils::copy_file
+.Fa "const std::string& source"
+.Fa "const std::string& destination"
+.Fc
+.Ft void
+.Fo atf::utils::create_file
+.Fa "const std::string& path"
+.Fa "const std::string& contents"
+.Fc
+.Ft void
+.Fo atf::utils::file_exists
+.Fa "const std::string& path"
+.Fc
+.Ft pid_t
+.Fo atf::utils::fork
+.Fa "void"
+.Fc
+.Ft bool
+.Fo atf::utils::grep_collection
+.Fa "const std::string& regexp"
+.Fa "const Collection& collection"
+.Fc
+.Ft bool
+.Fo atf::utils::grep_file
+.Fa "const std::string& regexp"
+.Fa "const std::string& path"
+.Fc
+.Ft bool
+.Fo atf::utils::grep_string
+.Fa "const std::string& regexp"
+.Fa "const std::string& path"
+.Fc
+.Ft void
+.Fo atf::utils::redirect
+.Fa "const int fd"
+.Fa "const std::string& path"
+.Fc
+.Ft void
+.Fo atf::utils::wait
+.Fa "const pid_t pid"
+.Fa "const int expected_exit_status"
+.Fa "const std::string& expected_stdout"
+.Fa "const std::string& expected_stderr"
+.Fc
 .Sh DESCRIPTION
 ATF provides a mostly-macro-based programming interface to implement test
 programs in C or C++.
@@ -166,6 +241,18 @@ and
 macros, all of which take the test case's name.
 Following each of these, a block of code is expected, surrounded by the
 opening and closing brackets.
+.Pp
+Additionally, the
+.Fn ATF_TEST_CASE_NAME
+macro can be used to obtain the name of the class corresponding to a
+particular test case, as the name is internally manged by the library to
+prevent clashes with other user identifiers.
+Similarly, the
+.Fn ATF_TEST_CASE_USE
+macro can be executed on a particular test case to mark it as "used" and
+thus prevent compiler warnings regarding unused symbols.
+Note that
+.Em you should never have to use these macros during regular operation.
 .Ss Program initialization
 The library provides a way to easily define the test program's
 .Fn main
@@ -185,7 +272,7 @@ The first parameter of this macro matches the name you provided in the
 former call.
 .Ss Header definitions
 The test case's header can define the meta-data by using the
-.Fn set
+.Fn set_md_var
 method, which takes two parameters: the first one specifies the
 meta-data variable to be set and the second one specifies its value.
 Both of them are strings.
@@ -313,14 +400,22 @@ takes an expression and raises a failure if it evaluates to false.
 takes two expressions and raises a failure if the two do not evaluate to
 the same exact value.
 .Pp
+.Fn ATF_REQUIRE_IN
+takes an element and a collection and validates that the element is present in
+the collection.
+.Pp
 .Fn ATF_REQUIRE_MATCH
 takes a regular expression and a string and raises a failure if the regular
 expression does not match the string.
 .Pp
+.Fn ATF_REQUIRE_NOT_IN
+takes an element and a collection and validates that the element is not present
+in the collection.
+.Pp
 .Fn ATF_REQUIRE_THROW
 takes the name of an exception and a statement and raises a failure if
 the statement does not throw the specified exception.
-.Fn ATF_REQUIRE_THROW_EQ
+.Fn ATF_REQUIRE_THROW_RE
 takes the name of an exception, a regular expresion and a statement and raises a
 failure if the statement does not throw the specified exception and if the
 message of the exception does not match the regular expression.
@@ -334,6 +429,163 @@ variable and, second, a boolean expression that, if evaluates to true,
 means that a call failed and
 .Va errno
 has to be checked against the first value.
+.Ss Utility functions
+The following functions are provided as part of the
+.Nm
+API to simplify the creation of a variety of tests.
+In particular, these are useful to write tests for command-line interfaces.
+.Pp
+.Ft void
+.Fo atf::utils::cat_file
+.Fa "const std::string& path"
+.Fa "const std::string& prefix"
+.Fc
+.Bd -offset indent
+Prints the contents of
+.Fa path
+to the standard output, prefixing every line with the string in
+.Fa prefix .
+.Ed
+.Pp
+.Ft bool
+.Fo atf::utils::compare_file
+.Fa "const std::string& path"
+.Fa "const std::string& contents"
+.Fc
+.Bd -offset indent
+Returns true if the given
+.Fa path
+matches exactly the expected inlined
+.Fa contents .
+.Ed
+.Pp
+.Ft void
+.Fo atf::utils::copy_file
+.Fa "const std::string& source"
+.Fa "const std::string& destination"
+.Fc
+.Bd -offset indent
+Copies the file
+.Fa source
+to
+.Fa destination .
+The permissions of the file are preserved during the code.
+.Ed
+.Pp
+.Ft void
+.Fo atf::utils::create_file
+.Fa "const std::string& path"
+.Fa "const std::string& contents"
+.Fc
+.Bd -offset indent
+Creates
+.Fa file
+with the text given in
+.Fa contents .
+.Ed
+.Pp
+.Ft void
+.Fo atf::utils::file_exists
+.Fa "const std::string& path"
+.Fc
+.Bd -offset indent
+Checks if
+.Fa path
+exists.
+.Ed
+.Pp
+.Ft pid_t
+.Fo atf::utils::fork
+.Fa "void"
+.Fc
+.Bd -offset indent
+Forks a process and redirects the standard output and standard error of the
+child to files for later validation with
+.Fn atf::utils::wait .
+Fails the test case if the fork fails, so this does not return an error.
+.Ed
+.Pp
+.Ft bool
+.Fo atf::utils::grep_collection
+.Fa "const std::string& regexp"
+.Fa "const Collection& collection"
+.Fc
+.Bd -offset indent
+Searches for the regular expression
+.Fa regexp
+in any of the strings contained in the
+.Fa collection .
+This is a template that accepts any one-dimensional container of strings.
+.Ed
+.Pp
+.Ft bool
+.Fo atf::utils::grep_file
+.Fa "const std::string& regexp"
+.Fa "const std::string& path"
+.Fc
+.Bd -offset indent
+Searches for the regular expression
+.Fa regexp
+in the file
+.Fa path .
+The variable arguments are used to construct the regular expression.
+.Ed
+.Pp
+.Ft bool
+.Fo atf::utils::grep_string
+.Fa "const std::string& regexp"
+.Fa "const std::string& str"
+.Fc
+.Bd -offset indent
+Searches for the regular expression
+.Fa regexp
+in the string
+.Fa str .
+.Ed
+.Ft void
+.Fo atf::utils::redirect
+.Fa "const int fd"
+.Fa "const std::string& path"
+.Fc
+.Bd -offset indent
+Redirects the given file descriptor
+.Fa fd
+to the file
+.Fa path .
+This function exits the process in case of an error and does not properly mark
+the test case as failed.
+As a result, it should only be used in subprocesses of the test case; specially
+those spawned by
+.Fn atf::utils::fork .
+.Ed
+.Pp
+.Ft void
+.Fo atf::utils::wait
+.Fa "const pid_t pid"
+.Fa "const int expected_exit_status"
+.Fa "const std::string& expected_stdout"
+.Fa "const std::string& expected_stderr"
+.Fc
+.Bd -offset indent
+Waits and validates the result of a subprocess spawned with
+.Fn atf::utils::wait .
+The validation involves checking that the subprocess exited cleanly and returned
+the code specified in
+.Fa expected_exit_status
+and that its standard output and standard error match the strings given in
+.Fa expected_stdout
+and
+.Fa expected_stderr .
+.Pp
+If any of the
+.Fa expected_stdout
+or
+.Fa expected_stderr
+strings are prefixed with
+.Sq save: ,
+then they specify the name of the file into which to store the stdout or stderr
+of the subprocess, and no comparison is performed.
+.Ed
 .Sh EXAMPLES
 The following shows a complete test program with a single test case that
 validates the addition operator:
@@ -343,7 +595,7 @@ validates the addition operator:
 ATF_TEST_CASE(addition);
 ATF_TEST_CASE_HEAD(addition)
 {
-    set("descr", "Sample tests for the addition operator");
+    set_md_var("descr", "Sample tests for the addition operator");
 }
 ATF_TEST_CASE_BODY(addition)
 {
@@ -359,7 +611,7 @@ ATF_TEST_CASE_BODY(addition)
 ATF_TEST_CASE(open_failure);
 ATF_TEST_CASE_HEAD(open_failure)
 {
-    set("descr", "Sample tests for the open function");
+    set_md_var("descr", "Sample tests for the open function");
 }
 ATF_TEST_CASE_BODY(open_failure)
 {
@@ -369,7 +621,7 @@ ATF_TEST_CASE_BODY(open_failure)
 ATF_TEST_CASE(known_bug);
 ATF_TEST_CASE_HEAD(known_bug)
 {
-    set("descr", "Reproduces a known bug");
+    set_md_var("descr", "Reproduces a known bug");
 }
 ATF_TEST_CASE_BODY(known_bug)
 {
diff --git a/unit/atf-src/atf-c++/atf-c++.m4 b/unit/atf-src/atf-c++/atf-c++.m4
new file mode 100644 (file)
index 0000000..0763d04
--- /dev/null
@@ -0,0 +1,48 @@
+dnl
+dnl Automated Testing Framework (atf)
+dnl
+dnl Copyright 2011 Google Inc.
+dnl All rights reserved.
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted provided that the following conditions are
+dnl met:
+dnl
+dnl * Redistributions of source code must retain the above copyright
+dnl   notice, this list of conditions and the following disclaimer.
+dnl * Redistributions in binary form must reproduce the above copyright
+dnl   notice, this list of conditions and the following disclaimer in the
+dnl   documentation and/or other materials provided with the distribution.
+dnl * Neither the name of Google Inc. nor the names of its contributors
+dnl   may be used to endorse or promote products derived from this software
+dnl   without specific prior written permission.
+dnl
+dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+dnl OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+dnl
+
+dnl ATF_CHECK_CXX([version-spec])
+dnl
+dnl Checks if atf-c++ is present.  If version-spec is provided, ensures that
+dnl the installed version of atf-sh matches the required version.  This
+dnl argument must be something like '>= 0.14' and accepts any version
+dnl specification supported by pkg-config.
+dnl
+dnl Defines and substitutes ATF_CXX_CFLAGS and ATF_CXX_LIBS with the compiler
+dnl and linker flags need to build against atf-c++.
+AC_DEFUN([ATF_CHECK_CXX], [
+    spec="atf-c++[]m4_default_nblank([ $1], [])"
+    _ATF_CHECK_ARG_WITH(
+        [PKG_CHECK_MODULES([ATF_CXX], [${spec}],
+                           [found=yes found_atf_cxx=yes], [found=no])],
+        [required ${spec} not found])
+])
index 8f5fbcdb60eb8e91c57b3ae269dd068242c9d0e6..b099b07a753a4d24532e8b94f560036ce0ebd5d0 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index bc0189a9ae0ecd24c5ebf589d0bdc9ebb2825352..0623529c745a500980f14177e3001b2b19e5afb4 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@ extern "C" {
 #include <string>
 #include <vector>
 
-#include <atf-c++/utils.hpp>
+#include <atf-c++/noncopyable.hpp>
 
 namespace atf {
 
@@ -60,7 +60,7 @@ namespace check {
 //! of executing arbitrary command and manages files containing
 //! its output.
 //!
-class check_result : utils::noncopyable {
+class check_result : noncopyable {
     //!
     //! \brief Internal representation of a result.
     //!
index d57dd290409d9726bf6beaa914620084417f8e4b..8e5983fdc6375d3b6ee09977e760a4bd01a761c7 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -191,15 +191,17 @@ ATF_TEST_CASE_HEAD(build_c_o)
 }
 ATF_TEST_CASE_BODY(build_c_o)
 {
+    ATF_TEST_CASE_USE(h_build_c_o_ok);
     run_h_tc< ATF_TEST_CASE_NAME(h_build_c_o_ok) >();
-    ATF_REQUIRE(grep_file("stdout", "-o test.o"));
-    ATF_REQUIRE(grep_file("stdout", "-c test.c"));
+    ATF_REQUIRE(atf::utils::grep_file("-o test.o", "stdout"));
+    ATF_REQUIRE(atf::utils::grep_file("-c test.c", "stdout"));
 
+    ATF_TEST_CASE_USE(h_build_c_o_fail);
     run_h_tc< ATF_TEST_CASE_NAME(h_build_c_o_fail) >();
-    ATF_REQUIRE(grep_file("stdout", "-o test.o"));
-    ATF_REQUIRE(grep_file("stdout", "-c test.c"));
-    ATF_REQUIRE(grep_file("stderr", "test.c"));
-    ATF_REQUIRE(grep_file("stderr", "UNDEFINED_SYMBOL"));
+    ATF_REQUIRE(atf::utils::grep_file("-o test.o", "stdout"));
+    ATF_REQUIRE(atf::utils::grep_file("-c test.c", "stdout"));
+    ATF_REQUIRE(atf::utils::grep_file("test.c", "stderr"));
+    ATF_REQUIRE(atf::utils::grep_file("UNDEFINED_SYMBOL", "stderr"));
 }
 
 ATF_TEST_CASE(build_cpp);
@@ -209,16 +211,18 @@ ATF_TEST_CASE_HEAD(build_cpp)
 }
 ATF_TEST_CASE_BODY(build_cpp)
 {
+    ATF_TEST_CASE_USE(h_build_cpp_ok);
     run_h_tc< ATF_TEST_CASE_NAME(h_build_cpp_ok) >();
-    ATF_REQUIRE(grep_file("stdout", "-o.*test.p"));
-    ATF_REQUIRE(grep_file("stdout", "test.c"));
-    ATF_REQUIRE(grep_file("test.p", "foo bar"));
+    ATF_REQUIRE(atf::utils::grep_file("-o.*test.p", "stdout"));
+    ATF_REQUIRE(atf::utils::grep_file("test.c", "stdout"));
+    ATF_REQUIRE(atf::utils::grep_file("foo bar", "test.p"));
 
+    ATF_TEST_CASE_USE(h_build_cpp_fail);
     run_h_tc< ATF_TEST_CASE_NAME(h_build_cpp_fail) >();
-    ATF_REQUIRE(grep_file("stdout", "-o test.p"));
-    ATF_REQUIRE(grep_file("stdout", "test.c"));
-    ATF_REQUIRE(grep_file("stderr", "test.c"));
-    ATF_REQUIRE(grep_file("stderr", "non-existent.h"));
+    ATF_REQUIRE(atf::utils::grep_file("-o test.p", "stdout"));
+    ATF_REQUIRE(atf::utils::grep_file("test.c", "stdout"));
+    ATF_REQUIRE(atf::utils::grep_file("test.c", "stderr"));
+    ATF_REQUIRE(atf::utils::grep_file("non-existent.h", "stderr"));
 }
 
 ATF_TEST_CASE(build_cxx_o);
@@ -228,15 +232,17 @@ ATF_TEST_CASE_HEAD(build_cxx_o)
 }
 ATF_TEST_CASE_BODY(build_cxx_o)
 {
+    ATF_TEST_CASE_USE(h_build_cxx_o_ok);
     run_h_tc< ATF_TEST_CASE_NAME(h_build_cxx_o_ok) >();
-    ATF_REQUIRE(grep_file("stdout", "-o test.o"));
-    ATF_REQUIRE(grep_file("stdout", "-c test.cpp"));
+    ATF_REQUIRE(atf::utils::grep_file("-o test.o", "stdout"));
+    ATF_REQUIRE(atf::utils::grep_file("-c test.cpp", "stdout"));
 
+    ATF_TEST_CASE_USE(h_build_cxx_o_fail);
     run_h_tc< ATF_TEST_CASE_NAME(h_build_cxx_o_fail) >();
-    ATF_REQUIRE(grep_file("stdout", "-o test.o"));
-    ATF_REQUIRE(grep_file("stdout", "-c test.cpp"));
-    ATF_REQUIRE(grep_file("stderr", "test.cpp"));
-    ATF_REQUIRE(grep_file("stderr", "UNDEFINED_SYMBOL"));
+    ATF_REQUIRE(atf::utils::grep_file("-o test.o", "stdout"));
+    ATF_REQUIRE(atf::utils::grep_file("-c test.cpp", "stdout"));
+    ATF_REQUIRE(atf::utils::grep_file("test.cpp", "stderr"));
+    ATF_REQUIRE(atf::utils::grep_file("UNDEFINED_SYMBOL", "stderr"));
 }
 
 ATF_TEST_CASE(exec_cleanup);
index d9ddf9e944fb9c3da9550c47fcdac9243dbce05f..7b7d6416c34ca52834ea1c2e7b1866d0974a76b4 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 1d25fe324984e0bbdb86931c96015d1a239a4f86..e11b9bb21d209e7e99b5532b372969491dff4b16 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 663d1f4fadd33dba13421eb9b1dd5aa9bb662b2a..a3cd2bb511d4c0b47451d1676499f589736e0e8a 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index ead6ec3dcac200a3acac99c6ceec8cee6edd1a58..2d53514bdf7e92d19a3f7e0b18855a430ce445f1 100644 (file)
@@ -3,6 +3,7 @@ Content-Type: application/X-atf-atffile; version="1"
 prop: test-suite = atf
 
 tp: application_test
+tp: auto_array_test
 tp: env_test
 tp: exceptions_test
 tp: expand_test
diff --git a/unit/atf-src/atf-c++/detail/Kyuafile b/unit/atf-src/atf-c++/detail/Kyuafile
new file mode 100644 (file)
index 0000000..fd0d7ab
--- /dev/null
@@ -0,0 +1,14 @@
+syntax("kyuafile", 1)
+
+test_suite("atf")
+
+atf_test_program{name="application_test"}
+atf_test_program{name="auto_array_test"}
+atf_test_program{name="env_test"}
+atf_test_program{name="exceptions_test"}
+atf_test_program{name="expand_test"}
+atf_test_program{name="fs_test"}
+atf_test_program{name="parser_test"}
+atf_test_program{name="sanity_test"}
+atf_test_program{name="text_test"}
+atf_test_program{name="ui_test"}
index 4c064cbcc67b835a4a4d296eb2993fd5f9ba5905..0a7bd151e6f740edafd39fdfdf7b8a271f8de65b 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -29,6 +29,7 @@
 
 libatf_c___la_SOURCES += atf-c++/detail/application.cpp \
                          atf-c++/detail/application.hpp \
+                         atf-c++/detail/auto_array.hpp \
                          atf-c++/detail/env.cpp \
                          atf-c++/detail/env.hpp \
                          atf-c++/detail/exceptions.cpp \
@@ -47,7 +48,8 @@ libatf_c___la_SOURCES += atf-c++/detail/application.cpp \
                          atf-c++/detail/ui.cpp \
                          atf-c++/detail/ui.hpp
 
-tests_atf_c___detail_DATA = atf-c++/detail/Atffile
+tests_atf_c___detail_DATA = atf-c++/detail/Atffile \
+                            atf-c++/detail/Kyuafile
 tests_atf_c___detaildir = $(pkgtestsdir)/atf-c++/detail
 EXTRA_DIST += $(tests_atf_c___detail_DATA)
 
@@ -57,42 +59,46 @@ atf_c___detail_libtest_helpers_la_SOURCES = atf-c++/detail/test_helpers.cpp \
 
 tests_atf_c___detail_PROGRAMS = atf-c++/detail/application_test
 atf_c___detail_application_test_SOURCES = atf-c++/detail/application_test.cpp
-atf_c___detail_application_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_application_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
+
+tests_atf_c___detail_PROGRAMS += atf-c++/detail/auto_array_test
+atf_c___detail_auto_array_test_SOURCES = atf-c++/detail/auto_array_test.cpp
+atf_c___detail_auto_array_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_c___detail_PROGRAMS += atf-c++/detail/env_test
 atf_c___detail_env_test_SOURCES = atf-c++/detail/env_test.cpp
-atf_c___detail_env_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_env_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_c___detail_PROGRAMS += atf-c++/detail/exceptions_test
 atf_c___detail_exceptions_test_SOURCES = atf-c++/detail/exceptions_test.cpp
-atf_c___detail_exceptions_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_exceptions_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_c___detail_PROGRAMS += atf-c++/detail/expand_test
 atf_c___detail_expand_test_SOURCES = atf-c++/detail/expand_test.cpp
-atf_c___detail_expand_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_expand_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_c___detail_PROGRAMS += atf-c++/detail/fs_test
 atf_c___detail_fs_test_SOURCES = atf-c++/detail/fs_test.cpp
-atf_c___detail_fs_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_fs_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_c___detail_PROGRAMS += atf-c++/detail/parser_test
 atf_c___detail_parser_test_SOURCES = atf-c++/detail/parser_test.cpp
-atf_c___detail_parser_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_parser_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_c___detail_PROGRAMS += atf-c++/detail/process_test
 atf_c___detail_process_test_SOURCES = atf-c++/detail/process_test.cpp
-atf_c___detail_process_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_process_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_c___detail_PROGRAMS += atf-c++/detail/sanity_test
 atf_c___detail_sanity_test_SOURCES = atf-c++/detail/sanity_test.cpp
-atf_c___detail_sanity_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_sanity_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_c___detail_PROGRAMS += atf-c++/detail/text_test
 atf_c___detail_text_test_SOURCES = atf-c++/detail/text_test.cpp
-atf_c___detail_text_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_text_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_c___detail_PROGRAMS += atf-c++/detail/ui_test
 atf_c___detail_ui_test_SOURCES = atf-c++/detail/ui_test.cpp
-atf_c___detail_ui_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_c___detail_ui_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
index bc1dac035d523fee480dd420f90df3b2c278c4d0..878b010bcde8770adf6e1b3b8a530ce944e258a0 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -41,6 +41,10 @@ extern "C" {
 #include <cstring>
 #include <iostream>
 
+extern "C" {
+#include "atf-c/defs.h"
+}
+
 #include "application.hpp"
 #include "sanity.hpp"
 #include "ui.hpp"
@@ -151,7 +155,8 @@ impl::app::specific_options(void)
 }
 
 void
-impl::app::process_option(int ch, const char* arg)
+impl::app::process_option(int ch ATF_DEFS_ATTRIBUTE_UNUSED,
+                          const char* arg ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
@@ -178,6 +183,7 @@ impl::app::process_options(void)
     }
 
     int ch;
+    const int old_opterr = ::opterr;
     ::opterr = 0;
     while ((ch = ::getopt(m_argc, m_argv, optstr.c_str())) != -1) {
         switch (ch) {
@@ -201,6 +207,7 @@ impl::app::process_options(void)
     m_argv += ::optind;
 
     // Clear getopt state just in case the test wants to use it.
+    opterr = old_opterr;
     optind = 1;
 #if defined(HAVE_OPTRESET)
     optreset = 1;
index 98644211a7bf1b6378c77db6c5abca0b3d02b65b..9d1f242004a3c7867f206e4c3fd7b08c07aa3151 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index ca7dfe2472756f31140b009d642a8167165ff498..2a788bfb28805c69287f2c05217ba7f34e56baf5 100644 (file)
@@ -52,13 +52,16 @@ public:
         char *const argv[] = { arg1, arg2, arg3, arg4, NULL };
 
         int ch;
+        bool zflag;
 
         // Given that this obviously is an application, and that we used the
         // same driver to start, we can test getopt(3) right here without doing
         // any fancy stuff.
+        zflag = false;
         while ((ch = ::getopt(argc, argv, ":Z")) != -1) {
             switch (ch) {
             case 'Z':
+                zflag = true;
                 break;
 
             case '?':
@@ -68,6 +71,7 @@ public:
             }
         }
 
+        ATF_REQUIRE(zflag);
         ATF_REQUIRE_EQ(1, argc - optind);
         ATF_REQUIRE_EQ(std::string("foo"), argv[optind]);
 
diff --git a/unit/atf-src/atf-c++/detail/auto_array.hpp b/unit/atf-src/atf-c++/detail/auto_array.hpp
new file mode 100644 (file)
index 0000000..1459284
--- /dev/null
@@ -0,0 +1,179 @@
+//
+// Automated Testing Framework (atf)
+//
+// Copyright (c) 2007 The NetBSD Foundation, 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:
+// 1. Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+// 2. 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.
+//
+// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+//
+
+#if !defined(_ATF_CXX_AUTO_ARRAY_HPP_)
+#define _ATF_CXX_AUTO_ARRAY_HPP_
+
+#include <cstddef>
+
+namespace atf {
+
+// ------------------------------------------------------------------------
+// The "auto_array" class.
+// ------------------------------------------------------------------------
+
+template< class T >
+struct auto_array_ref {
+    T* m_ptr;
+
+    explicit auto_array_ref(T*);
+};
+
+template< class T >
+auto_array_ref< T >::auto_array_ref(T* ptr) :
+    m_ptr(ptr)
+{
+}
+
+template< class T >
+class auto_array {
+    T* m_ptr;
+
+public:
+    auto_array(T* = NULL) throw();
+    auto_array(auto_array< T >&) throw();
+    auto_array(auto_array_ref< T >) throw();
+    ~auto_array(void) throw();
+
+    T* get(void) throw();
+    const T* get(void) const throw();
+    T* release(void) throw();
+    void reset(T* = NULL) throw();
+
+    auto_array< T >& operator=(auto_array< T >&) throw();
+    auto_array< T >& operator=(auto_array_ref< T >) throw();
+
+    T& operator[](int) throw();
+    operator auto_array_ref< T >(void) throw();
+};
+
+template< class T >
+auto_array< T >::auto_array(T* ptr)
+    throw() :
+    m_ptr(ptr)
+{
+}
+
+template< class T >
+auto_array< T >::auto_array(auto_array< T >& ptr)
+    throw() :
+    m_ptr(ptr.release())
+{
+}
+
+template< class T >
+auto_array< T >::auto_array(auto_array_ref< T > ref)
+    throw() :
+    m_ptr(ref.m_ptr)
+{
+}
+
+template< class T >
+auto_array< T >::~auto_array(void)
+    throw()
+{
+    if (m_ptr != NULL)
+        delete [] m_ptr;
+}
+
+template< class T >
+T*
+auto_array< T >::get(void)
+    throw()
+{
+    return m_ptr;
+}
+
+template< class T >
+const T*
+auto_array< T >::get(void)
+    const throw()
+{
+    return m_ptr;
+}
+
+template< class T >
+T*
+auto_array< T >::release(void)
+    throw()
+{
+    T* ptr = m_ptr;
+    m_ptr = NULL;
+    return ptr;
+}
+
+template< class T >
+void
+auto_array< T >::reset(T* ptr)
+    throw()
+{
+    if (m_ptr != NULL)
+        delete [] m_ptr;
+    m_ptr = ptr;
+}
+
+template< class T >
+auto_array< T >&
+auto_array< T >::operator=(auto_array< T >& ptr)
+    throw()
+{
+    reset(ptr.release());
+    return *this;
+}
+
+template< class T >
+auto_array< T >&
+auto_array< T >::operator=(auto_array_ref< T > ref)
+    throw()
+{
+    if (m_ptr != ref.m_ptr) {
+        delete [] m_ptr;
+        m_ptr = ref.m_ptr;
+    }
+    return *this;
+}
+
+template< class T >
+T&
+auto_array< T >::operator[](int pos)
+    throw()
+{
+    return m_ptr[pos];
+}
+
+template< class T >
+auto_array< T >::operator auto_array_ref< T >(void)
+    throw()
+{
+    return auto_array_ref< T >(release());
+}
+
+} // namespace atf
+
+#endif // !defined(_ATF_CXX_AUTO_ARRAY_HPP_)
diff --git a/unit/atf-src/atf-c++/detail/auto_array_test.cpp b/unit/atf-src/atf-c++/detail/auto_array_test.cpp
new file mode 100644 (file)
index 0000000..dcfe415
--- /dev/null
@@ -0,0 +1,304 @@
+//
+// Automated Testing Framework (atf)
+//
+// Copyright (c) 2007 The NetBSD Foundation, 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:
+// 1. Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+// 2. 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.
+//
+// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+//
+
+extern "C" {
+#include <sys/types.h>
+}
+
+#include <iostream>
+
+#include "atf-c/defs.h"
+
+#include "../macros.hpp"
+
+#include "auto_array.hpp"
+
+// ------------------------------------------------------------------------
+// Tests for the "auto_array" class.
+// ------------------------------------------------------------------------
+
+class test_array {
+public:
+    int m_value;
+
+    static ssize_t m_nblocks;
+
+    static
+    atf::auto_array< test_array >
+    do_copy(atf::auto_array< test_array >& ta)
+    {
+        return atf::auto_array< test_array >(ta);
+    }
+
+    void* operator new(size_t size ATF_DEFS_ATTRIBUTE_UNUSED)
+    {
+        ATF_FAIL("New called but should have been new[]");
+        return new int(5);
+    }
+
+    void* operator new[](size_t size)
+    {
+        m_nblocks++;
+        void* mem = ::operator new(size);
+        std::cout << "Allocated 'test_array' object " << mem << "\n";
+        return mem;
+    }
+
+    void operator delete(void* mem ATF_DEFS_ATTRIBUTE_UNUSED)
+    {
+        ATF_FAIL("Delete called but should have been delete[]");
+    }
+
+    void operator delete[](void* mem)
+    {
+        std::cout << "Releasing 'test_array' object " << mem << "\n";
+        if (m_nblocks == 0)
+            ATF_FAIL("Unbalanced delete[]");
+        m_nblocks--;
+        ::operator delete(mem);
+    }
+};
+
+ssize_t test_array::m_nblocks = 0;
+
+ATF_TEST_CASE(auto_array_scope);
+ATF_TEST_CASE_HEAD(auto_array_scope)
+{
+    set_md_var("descr", "Tests the automatic scope handling in the "
+               "auto_array smart pointer class");
+}
+ATF_TEST_CASE_BODY(auto_array_scope)
+{
+    using atf::auto_array;
+
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    {
+        auto_array< test_array > t(new test_array[10]);
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+    }
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+}
+
+ATF_TEST_CASE(auto_array_copy);
+ATF_TEST_CASE_HEAD(auto_array_copy)
+{
+    set_md_var("descr", "Tests the auto_array smart pointer class' copy "
+               "constructor");
+}
+ATF_TEST_CASE_BODY(auto_array_copy)
+{
+    using atf::auto_array;
+
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    {
+        auto_array< test_array > t1(new test_array[10]);
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+
+        {
+            auto_array< test_array > t2(t1);
+            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+        }
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    }
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+}
+
+ATF_TEST_CASE(auto_array_copy_ref);
+ATF_TEST_CASE_HEAD(auto_array_copy_ref)
+{
+    set_md_var("descr", "Tests the auto_array smart pointer class' copy "
+               "constructor through the auxiliary auto_array_ref object");
+}
+ATF_TEST_CASE_BODY(auto_array_copy_ref)
+{
+    using atf::auto_array;
+
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    {
+        auto_array< test_array > t1(new test_array[10]);
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+
+        {
+            auto_array< test_array > t2 = test_array::do_copy(t1);
+            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+        }
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    }
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+}
+
+ATF_TEST_CASE(auto_array_get);
+ATF_TEST_CASE_HEAD(auto_array_get)
+{
+    set_md_var("descr", "Tests the auto_array smart pointer class' get "
+               "method");
+}
+ATF_TEST_CASE_BODY(auto_array_get)
+{
+    using atf::auto_array;
+
+    test_array* ta = new test_array[10];
+    auto_array< test_array > t(ta);
+    ATF_REQUIRE_EQ(t.get(), ta);
+}
+
+ATF_TEST_CASE(auto_array_release);
+ATF_TEST_CASE_HEAD(auto_array_release)
+{
+    set_md_var("descr", "Tests the auto_array smart pointer class' release "
+               "method");
+}
+ATF_TEST_CASE_BODY(auto_array_release)
+{
+    using atf::auto_array;
+
+    test_array* ta1 = new test_array[10];
+    {
+        auto_array< test_array > t(ta1);
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+        test_array* ta2 = t.release();
+        ATF_REQUIRE_EQ(ta2, ta1);
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+    }
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+    delete [] ta1;
+}
+
+ATF_TEST_CASE(auto_array_reset);
+ATF_TEST_CASE_HEAD(auto_array_reset)
+{
+    set_md_var("descr", "Tests the auto_array smart pointer class' reset "
+               "method");
+}
+ATF_TEST_CASE_BODY(auto_array_reset)
+{
+    using atf::auto_array;
+
+    test_array* ta1 = new test_array[10];
+    test_array* ta2 = new test_array[10];
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 2);
+
+    {
+        auto_array< test_array > t(ta1);
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 2);
+        t.reset(ta2);
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+        t.reset();
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    }
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+}
+
+ATF_TEST_CASE(auto_array_assign);
+ATF_TEST_CASE_HEAD(auto_array_assign)
+{
+    set_md_var("descr", "Tests the auto_array smart pointer class' "
+               "assignment operator");
+}
+ATF_TEST_CASE_BODY(auto_array_assign)
+{
+    using atf::auto_array;
+
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    {
+        auto_array< test_array > t1(new test_array[10]);
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+
+        {
+            auto_array< test_array > t2;
+            t2 = t1;
+            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+        }
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    }
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+}
+
+ATF_TEST_CASE(auto_array_assign_ref);
+ATF_TEST_CASE_HEAD(auto_array_assign_ref)
+{
+    set_md_var("descr", "Tests the auto_array smart pointer class' "
+               "assignment operator through the auxiliary auto_array_ref "
+               "object");
+}
+ATF_TEST_CASE_BODY(auto_array_assign_ref)
+{
+    using atf::auto_array;
+
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    {
+        auto_array< test_array > t1(new test_array[10]);
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+
+        {
+            auto_array< test_array > t2;
+            t2 = test_array::do_copy(t1);
+            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
+        }
+        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    }
+    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+}
+
+ATF_TEST_CASE(auto_array_access);
+ATF_TEST_CASE_HEAD(auto_array_access)
+{
+    set_md_var("descr", "Tests the auto_array smart pointer class' access "
+               "operator");
+}
+ATF_TEST_CASE_BODY(auto_array_access)
+{
+    using atf::auto_array;
+
+    auto_array< test_array > t(new test_array[10]);
+
+    for (int i = 0; i < 10; i++)
+        t[i].m_value = i * 2;
+
+    for (int i = 0; i < 10; i++)
+        ATF_REQUIRE_EQ(t[i].m_value, i * 2);
+}
+
+// ------------------------------------------------------------------------
+// Main.
+// ------------------------------------------------------------------------
+
+ATF_INIT_TEST_CASES(tcs)
+{
+    // Add the test for the "auto_array" class.
+    ATF_ADD_TEST_CASE(tcs, auto_array_scope);
+    ATF_ADD_TEST_CASE(tcs, auto_array_copy);
+    ATF_ADD_TEST_CASE(tcs, auto_array_copy_ref);
+    ATF_ADD_TEST_CASE(tcs, auto_array_get);
+    ATF_ADD_TEST_CASE(tcs, auto_array_release);
+    ATF_ADD_TEST_CASE(tcs, auto_array_reset);
+    ATF_ADD_TEST_CASE(tcs, auto_array_assign);
+    ATF_ADD_TEST_CASE(tcs, auto_array_assign_ref);
+    ATF_ADD_TEST_CASE(tcs, auto_array_access);
+}
index 2d345aab6f061cea8fb3f7c2c64f9fd30676f50e..5ca7f09c4f0aca6e4d0d16485d83633bcf88f496 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 97ce87bcc2ea24984a393fcfa9eb3785f45a07f0..afdf69be593514f06b524d4b8a1b7ff0fefba94b 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 9367854977515079a9ad71e74b7921bce20e004f..a7b681d14e116befd118d8a68d283da0a7f01b5e 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 8c15b30eae8a69f5c56f6cf4d10ac39ed92784ce..79c5b489e7476514d87fb0a17feb84a4178e47eb 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -34,6 +34,7 @@
 #include <cstdarg>
 #include <cstdio>
 #include <cstring>
+#include <new>
 
 extern "C" {
 #include "../../atf-c/error.h"
index f10dfd5de32d91b35fa29b7cfbaa196c5de675c7..f655a84d8263154ce56a1195bae8f9234a3ef38b 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -31,6 +31,7 @@
 #define _ATF_CXX_EXCEPTIONS_HPP_
 
 #include <stdexcept>
+#include <string>
 
 extern "C" {
 struct atf_error;
index b1c9eadf90b275a175f6a2977877cfdea074fdc3..821c192dd229fa40ba034ba42319b62dd663aeab 100644 (file)
@@ -32,6 +32,7 @@ extern "C" {
 }
 
 #include <cstdio>
+#include <new>
 
 #include "../macros.hpp"
 
index 03a70db6a2136b9c5779d273f3cc3d46968abf7a..f6f9b6882ec67296893a45d163f561d43b395ea3 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 6419f512b32667e3bd15591a9bb593ca797f5a7b..7f4071ee847264d39e3ece23c370f2dbeebcee07 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 55ea718f9768ab1013bed01e26250520c3d1f481..222ab3a92c290d78dd44cad0ac040749aa5b6937 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 31ef1609679a511a815eb0d9f7e7104a9c9e892d..3517e261f93999c1e53f66fab512a0476bb14a66 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 8d7a7ba5f7cb60687ecc8ac978d11cd51b885e01..4ffb39b2a582aee811e8969b55508da3790cd46a 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 8fe3dfd8e2bf768a41ac785e7f24bce12654166f..6cf9bf6c636cba5fb023c67d291575dcb31b0732 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 5435920438c565e2aaa5d2ac6fe81308c6d606e8..7e7f680c573fa4a9c375c3cfc89f3b633a64e444 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 060126432deae0f968bad959948a9696f12ed688..f1595f531f55eac6d5d133c130387ac98ddef596 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 5d8901479afb6304d2208b33a223e89d310f3758..491c01457964fbc683d1f924e1e38fca211b05bd 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index e442622e282d3885a33e06e61dd248212351112c..f7ae6d49de00dc12eb4138ce8f611eb584968d36 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2008 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -50,10 +50,10 @@ namespace impl = atf::process;
 // ------------------------------------------------------------------------
 
 template< class C >
-atf::utils::auto_array< const char* >
+atf::auto_array< const char* >
 collection_to_argv(const C& c)
 {
-    atf::utils::auto_array< const char* > argv(new const char*[c.size() + 1]);
+    atf::auto_array< const char* > argv(new const char*[c.size() + 1]);
 
     std::size_t pos = 0;
     for (typename C::const_iterator iter = c.begin(); iter != c.end();
index 8a020b6efb1079fd2a83d20b3d1fd2aab94c1ad5..bc55a5721c74e893d28e08c6585019a22440db70 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2008 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,10 @@ extern "C" {
 #include <string>
 #include <vector>
 
+#include "auto_array.hpp"
 #include "exceptions.hpp"
 #include "fs.hpp"
 
-#include "../utils.hpp"
-
 namespace atf {
 namespace process {
 
@@ -64,7 +63,7 @@ class argv_array {
     // std::tr1::shared_array instead when it becomes widely available.
     // The reason would be to remove all copy constructors and assignment
     // operators from this class.
-    utils::auto_array< const char* > m_exec_argv;
+    auto_array< const char* > m_exec_argv;
     void ctor_init_exec_argv(void);
 
 public:
@@ -118,7 +117,7 @@ class stream_capture : basic_stream {
     child fork(void (*)(void*), const OutStream&, const ErrStream&, void*);
     template< class OutStream, class ErrStream > friend
     status exec(const atf::fs::path&, const argv_array&,
-                const OutStream&, const ErrStream&);
+                const OutStream&, const ErrStream&, void (*)(void));
 
 public:
     stream_capture(void);
@@ -130,7 +129,7 @@ class stream_connect : basic_stream {
     child fork(void (*)(void*), const OutStream&, const ErrStream&, void*);
     template< class OutStream, class ErrStream > friend
     status exec(const atf::fs::path&, const argv_array&,
-                const OutStream&, const ErrStream&);
+                const OutStream&, const ErrStream&, void (*)(void));
 
 public:
     stream_connect(const int, const int);
@@ -142,7 +141,7 @@ class stream_inherit : basic_stream {
     child fork(void (*)(void*), const OutStream&, const ErrStream&, void*);
     template< class OutStream, class ErrStream > friend
     status exec(const atf::fs::path&, const argv_array&,
-                const OutStream&, const ErrStream&);
+                const OutStream&, const ErrStream&, void (*)(void));
 
 public:
     stream_inherit(void);
@@ -154,7 +153,7 @@ class stream_redirect_fd : basic_stream {
     child fork(void (*)(void*), const OutStream&, const ErrStream&, void*);
     template< class OutStream, class ErrStream > friend
     status exec(const atf::fs::path&, const argv_array&,
-                const OutStream&, const ErrStream&);
+                const OutStream&, const ErrStream&, void (*)(void));
 
 public:
     stream_redirect_fd(const int);
@@ -166,7 +165,7 @@ class stream_redirect_path : basic_stream {
     child fork(void (*)(void*), const OutStream&, const ErrStream&, void*);
     template< class OutStream, class ErrStream > friend
     status exec(const atf::fs::path&, const argv_array&,
-                const OutStream&, const ErrStream&);
+                const OutStream&, const ErrStream&, void (*)(void));
 
 public:
     stream_redirect_path(const fs::path&);
@@ -182,7 +181,7 @@ class status {
     friend class child;
     template< class OutStream, class ErrStream > friend
     status exec(const atf::fs::path&, const argv_array&,
-                const OutStream&, const ErrStream&);
+                const OutStream&, const ErrStream&, void (*)(void));
 
     status(atf_process_status_t&);
 
@@ -249,7 +248,8 @@ fork(void (*start)(void*), const OutStream& outsb,
 template< class OutStream, class ErrStream >
 status
 exec(const atf::fs::path& prog, const argv_array& argv,
-     const OutStream& outsb, const ErrStream& errsb)
+     const OutStream& outsb, const ErrStream& errsb,
+     void (*prehook)(void))
 {
     atf_process_status_t s;
 
@@ -257,13 +257,22 @@ exec(const atf::fs::path& prog, const argv_array& argv,
     atf_error_t err = atf_process_exec_array(&s, prog.c_path(),
                                              argv.exec_argv(),
                                              outsb.get_sb(),
-                                             errsb.get_sb());
+                                             errsb.get_sb(),
+                                             prehook);
     if (atf_is_error(err))
         throw_atf_error(err);
 
     return status(s);
 }
 
+template< class OutStream, class ErrStream >
+status
+exec(const atf::fs::path& prog, const argv_array& argv,
+     const OutStream& outsb, const ErrStream& errsb)
+{
+    return exec(prog, argv, outsb, errsb, NULL);
+}
+
 } // namespace process
 } // namespace atf
 
index ea2bc9f5e743fad8b7c077c54a9d673b2dc41b7f..d13ab9453a8cbfc2e40913374a7b751722fc2a8b 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2008 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 37ff3188ebf6cc7f10fce25b8396e7f5bd933a54..6021a6e6890ceb2e787cba62a78fcc67a2f047fd 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 8b2a736853754c4bc7e53816ff490af5b7275733..191649d03d5984b27cc499c20fb317c953f74902 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2009 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 
-extern "C" {
-#include <regex.h>
-}
-
 #include <fstream>
 #include <iostream>
 #include <string>
@@ -45,27 +41,31 @@ extern "C" {
 #include "test_helpers.hpp"
 
 void
-build_check_cxx_o_aux(const atf::fs::path& sfile, const char* failmsg)
+build_check_cxx_o_aux(const atf::fs::path& sfile, const char* failmsg,
+                      const bool expect_pass)
 {
     std::vector< std::string > optargs;
     optargs.push_back("-I" + atf::config::get("atf_includedir"));
+    optargs.push_back("-Wall");
+    optargs.push_back("-Werror");
 
-    if (!atf::check::build_cxx_o(sfile.str(), "test.o",
-                                 atf::process::argv_array(optargs)))
+    const bool result = atf::check::build_cxx_o(
+        sfile.str(), "test.o", atf::process::argv_array(optargs));
+    if ((expect_pass && !result) || (!expect_pass && result))
         ATF_FAIL(failmsg);
 }
 
 void
 build_check_cxx_o(const atf::tests::tc& tc, const char* sfile,
-                  const char* failmsg)
+                  const char* failmsg, const bool expect_pass)
 {
     const atf::fs::path sfilepath =
         atf::fs::path(tc.get_config_var("srcdir")) / sfile;
-    build_check_cxx_o_aux(sfilepath, failmsg);
+    build_check_cxx_o_aux(sfilepath, failmsg, expect_pass);
 }
 
 void
-header_check(const atf::tests::tc& tc, const char *hdrname)
+header_check(const char *hdrname)
 {
     std::ofstream srcfile("test.c");
     ATF_REQUIRE(srcfile);
@@ -74,7 +74,7 @@ header_check(const atf::tests::tc& tc, const char *hdrname)
 
     const std::string failmsg = std::string("Header check failed; ") +
         hdrname + " is not self-contained";
-    build_check_cxx_o_aux(atf::fs::path("test.c"), failmsg.c_str());
+    build_check_cxx_o_aux(atf::fs::path("test.c"), failmsg.c_str(), true);
 }
 
 atf::fs::path
@@ -84,43 +84,6 @@ get_process_helpers_path(const atf::tests::tc& tc)
            ".." / "atf-c" / "detail" / "process_helpers";
 }
 
-bool
-grep_file(const char* name, const char* regex)
-{
-    std::ifstream is(name);
-    ATF_REQUIRE(is);
-
-    bool found = false;
-
-    std::string line;
-    std::getline(is, line);
-    while (!found && is.good()) {
-        if (grep_string(line, regex))
-            found = true;
-        else
-            std::getline(is, line);
-    }
-
-    return found;
-}
-
-bool
-grep_string(const std::string& str, const char* regex)
-{
-    int res;
-    regex_t preg;
-
-    std::cout << "Looking for '" << regex << "' in '" << str << "'\n";
-    ATF_REQUIRE(::regcomp(&preg, regex, REG_EXTENDED) == 0);
-
-    res = ::regexec(&preg, str.c_str(), 0, NULL, 0);
-    ATF_REQUIRE(res == 0 || res == REG_NOMATCH);
-
-    ::regfree(&preg);
-
-    return res == 0;
-}
-
 void
 test_helpers_detail::check_equal(const char* expected[],
                                  const string_vector& actual)
index 7da2ac481fdf9d93be7d508180ae47e53ae3c308..4a39331de4d490dc9a7274246e4df3f5ed2fc434 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2009 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -53,7 +53,7 @@
     } \
     ATF_TEST_CASE_BODY(name) \
     { \
-        header_check(*this, hdrname); \
+        header_check(hdrname); \
     }
 
 #define BUILD_TC(name, sfile, descr, failmsg) \
     } \
     ATF_TEST_CASE_BODY(name) \
     { \
-        build_check_cxx_o(*this, sfile, failmsg); \
+        build_check_cxx_o(*this, sfile, failmsg, true);      \
+    }
+
+#define BUILD_TC_FAIL(name, sfile, descr, failmsg) \
+    ATF_TEST_CASE(name); \
+    ATF_TEST_CASE_HEAD(name) \
+    { \
+        set_md_var("descr", descr); \
+    } \
+    ATF_TEST_CASE_BODY(name) \
+    { \
+        build_check_cxx_o(*this, sfile, failmsg, false);      \
     }
 
 namespace atf {
@@ -73,11 +84,9 @@ class tc;
 }
 }
 
-void header_check(const atf::tests::tc&, const char*);
-void build_check_cxx_o(const atf::tests::tc&, const char*, const char*);
+void header_check(const char*);
+void build_check_cxx_o(const atf::tests::tc&, const char*, const char*, bool);
 atf::fs::path get_process_helpers_path(const atf::tests::tc&);
-bool grep_file(const char*, const char*);
-bool grep_string(const std::string&, const char*);
 
 struct run_h_tc_data {
     const atf::tests::vars_map& m_config;
index a97c230d512ad09e541eb675363f6d14cca2ddb4..66eebf0a77e759e095ceadbf1b48ba6052dcddeb 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -133,3 +133,28 @@ impl::to_bool(const std::string& str)
 
     return b;
 }
+
+int64_t
+impl::to_bytes(std::string str)
+{
+    if (str.empty())
+        throw std::runtime_error("Empty value");
+
+    const char unit = str[str.length() - 1];
+    int64_t multiplier;
+    switch (unit) {
+    case 'k': case 'K': multiplier = 1 << 10; break;
+    case 'm': case 'M': multiplier = 1 << 20; break;
+    case 'g': case 'G': multiplier = 1 << 30; break;
+    case 't': case 'T': multiplier = int64_t(1) << 40; break;
+    default:
+        if (!std::isdigit(unit))
+            throw std::runtime_error(std::string("Unknown size unit '") + unit
+                                     + "'");
+        multiplier = 1;
+    }
+    if (multiplier != 1)
+        str.erase(str.length() - 1);
+
+    return to_type< int64_t >(str) * multiplier;
+}
index 88896e3cd49b28cdab7f721b790b9b176b4a1922..6a1b027c1896c7fa59875c5964a05b979fb622b1 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 #if !defined(_ATF_CXX_TEXT_HPP_)
 #define _ATF_CXX_TEXT_HPP_
 
+extern "C" {
+#include <stdint.h>
+}
+
 #include <sstream>
 #include <stdexcept>
 #include <string>
@@ -97,6 +101,11 @@ std::string trim(const std::string&);
 //!
 bool to_bool(const std::string&);
 
+//!
+//! \brief Converts the given string to a bytes size.
+//!
+int64_t to_bytes(std::string);
+
 //!
 //! \brief Changes the case of a string to lowercase.
 //!
@@ -133,7 +142,7 @@ to_type(const std::string& str)
     std::istringstream ss(str);
     T value;
     ss >> value;
-    if (!ss.eof() || (!ss.eof() && !ss.good()))
+    if (!ss.eof() || (ss.eof() && (ss.fail() || ss.bad())))
         throw std::runtime_error("Cannot convert string to requested type");
     return value;
 }
index 75e0386a7adf478a6ed99df1c4ae4ace428b4870..b7c0ba1af82734ac64ec70b1c2071ad2ac934272 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -310,6 +310,29 @@ ATF_TEST_CASE_BODY(to_bool)
     ATF_REQUIRE_THROW(std::runtime_error, to_bool("false2"));
 }
 
+ATF_TEST_CASE(to_bytes);
+ATF_TEST_CASE_HEAD(to_bytes)
+{
+    set_md_var("descr", "Tests the to_bytes function");
+}
+ATF_TEST_CASE_BODY(to_bytes)
+{
+    using atf::text::to_bytes;
+
+    ATF_REQUIRE_EQ(0, to_bytes("0"));
+    ATF_REQUIRE_EQ(12345, to_bytes("12345"));
+    ATF_REQUIRE_EQ(2 * 1024, to_bytes("2k"));
+    ATF_REQUIRE_EQ(4 * 1024 * 1024, to_bytes("4m"));
+    ATF_REQUIRE_EQ(int64_t(8) * 1024 * 1024 * 1024, to_bytes("8g"));
+    ATF_REQUIRE_EQ(int64_t(16) * 1024 * 1024 * 1024 * 1024, to_bytes("16t"));
+
+    ATF_REQUIRE_THROW_RE(std::runtime_error, "Empty", to_bytes(""));
+    ATF_REQUIRE_THROW_RE(std::runtime_error, "Unknown size unit 'd'",
+                         to_bytes("12d"));
+    ATF_REQUIRE_THROW(std::runtime_error, to_bytes(" "));
+    ATF_REQUIRE_THROW(std::runtime_error, to_bytes(" k"));
+}
+
 ATF_TEST_CASE(to_string);
 ATF_TEST_CASE_HEAD(to_string)
 {
@@ -335,6 +358,7 @@ ATF_TEST_CASE_BODY(to_type)
 
     ATF_REQUIRE_EQ(to_type< int >("0"), 0);
     ATF_REQUIRE_EQ(to_type< int >("1234"), 1234);
+    ATF_REQUIRE_THROW(std::runtime_error, to_type< int >("   "));
     ATF_REQUIRE_THROW(std::runtime_error, to_type< int >("0 a"));
     ATF_REQUIRE_THROW(std::runtime_error, to_type< int >("a"));
 
@@ -360,6 +384,7 @@ ATF_INIT_TEST_CASES(tcs)
     ATF_ADD_TEST_CASE(tcs, split_delims);
     ATF_ADD_TEST_CASE(tcs, trim);
     ATF_ADD_TEST_CASE(tcs, to_bool);
+    ATF_ADD_TEST_CASE(tcs, to_bytes);
     ATF_ADD_TEST_CASE(tcs, to_string);
     ATF_ADD_TEST_CASE(tcs, to_type);
 }
index 8b6b797663b04c50cb63fd8bd0d47f9516daba3b..07bde4f87dba17b7b0d1c4ad7eb160e60f8d6098 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 //
 
 extern "C" {
-#include <unistd.h>
-
 #include <sys/ioctl.h>
 
 #include <termios.h>
+#include <unistd.h>
 }
 
 #include <sstream>
index c51c839fc40a11b82b980fd0249289c8bd77a4fe..1c81c56a963db4226673c762f5c78f6109b0b706 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 73eb71a165d827ab9b324eb581a9393adf51a045..c6ce9c2be59e1562476c7d3df70a01b786405284 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 
 #include <atf-c++/tests.hpp>
 
+// Do not define inline methods for the test case classes.  Doing so
+// significantly increases the memory requirements of GNU G++ during
+// compilation.
+
 #define ATF_TEST_CASE_WITHOUT_HEAD(name) \
+    namespace { \
     class atfu_tc_ ## name : public atf::tests::tc { \
         void body(void) const; \
     public: \
-        atfu_tc_ ## name(void) : atf::tests::tc(#name, false) {} \
-    };
+        atfu_tc_ ## name(void); \
+    }; \
+    static atfu_tc_ ## name* atfu_tcptr_ ## name; \
+    atfu_tc_ ## name::atfu_tc_ ## name(void) : atf::tests::tc(#name, false) {} \
+    }
 
 #define ATF_TEST_CASE(name) \
+    namespace { \
     class atfu_tc_ ## name : public atf::tests::tc { \
         void head(void); \
         void body(void) const; \
     public: \
-        atfu_tc_ ## name(void) : atf::tests::tc(#name, false) {} \
-    };
+        atfu_tc_ ## name(void); \
+    }; \
+    static atfu_tc_ ## name* atfu_tcptr_ ## name; \
+    atfu_tc_ ## name::atfu_tc_ ## name(void) : atf::tests::tc(#name, false) {} \
+    }
 
 #define ATF_TEST_CASE_WITH_CLEANUP(name) \
+    namespace { \
     class atfu_tc_ ## name : public atf::tests::tc { \
         void head(void); \
         void body(void) const; \
         void cleanup(void) const; \
     public: \
-        atfu_tc_ ## name(void) : atf::tests::tc(#name, true) {} \
-    };
+        atfu_tc_ ## name(void); \
+    }; \
+    static atfu_tc_ ## name* atfu_tcptr_ ## name; \
+    atfu_tc_ ## name::atfu_tc_ ## name(void) : atf::tests::tc(#name, true) {} \
+    }
 
 #define ATF_TEST_CASE_NAME(name) atfu_tc_ ## name
+#define ATF_TEST_CASE_USE(name) (atfu_tcptr_ ## name) = NULL
 
 #define ATF_TEST_CASE_HEAD(name) \
     void \
         } \
     } while (false)
 
+#define ATF_REQUIRE_IN(element, collection) \
+    ATF_REQUIRE((collection).find(element) != (collection).end())
+
+#define ATF_REQUIRE_NOT_IN(element, collection) \
+    ATF_REQUIRE((collection).find(element) == (collection).end())
+
 #define ATF_REQUIRE_MATCH(regexp, string) \
     do { \
         if (!atf::tests::detail::match(regexp, string)) { \
 
 #define ATF_ADD_TEST_CASE(tcs, tcname) \
     do { \
-        atf::tests::tc* tcptr = new atfu_tc_ ## tcname(); \
-        (tcs).push_back(tcptr); \
+        atfu_tcptr_ ## tcname = new atfu_tc_ ## tcname(); \
+        (tcs).push_back(atfu_tcptr_ ## tcname); \
     } while (0);
 
 #endif // !defined(_ATF_CXX_MACROS_HPP_)
index 77c4147315fb2771909991b114b08b2088a7a3f8..2cb75360a4d7cde7b19891d958acc6c2ab0d3ebd 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2008 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -106,6 +106,7 @@ ATF_TEST_CASE(TEST_MACRO_1);
 ATF_TEST_CASE_HEAD(TEST_MACRO_1) { }
 ATF_TEST_CASE_BODY(TEST_MACRO_1) { }
 void instantiate_1(void) {
+    ATF_TEST_CASE_USE(TEST_MACRO_1);
     atf::tests::tc* the_test = new ATF_TEST_CASE_NAME(TEST_MACRO_1)();
     delete the_test;
 }
@@ -114,12 +115,16 @@ ATF_TEST_CASE_HEAD(TEST_MACRO_2) { }
 ATF_TEST_CASE_BODY(TEST_MACRO_2) { }
 ATF_TEST_CASE_CLEANUP(TEST_MACRO_2) { }
 void instatiate_2(void) {
+    ATF_TEST_CASE_USE(TEST_MACRO_2);
     atf::tests::tc* the_test = new ATF_TEST_CASE_NAME(TEST_MACRO_2)();
     delete the_test;
 }
 ATF_TEST_CASE_WITH_CLEANUP(TEST_MACRO_3);
+ATF_TEST_CASE_HEAD(TEST_MACRO_3) { }
 ATF_TEST_CASE_BODY(TEST_MACRO_3) { }
+ATF_TEST_CASE_CLEANUP(TEST_MACRO_3) { }
 void instatiate_3(void) {
+    ATF_TEST_CASE_USE(TEST_MACRO_3);
     atf::tests::tc* the_test = new ATF_TEST_CASE_NAME(TEST_MACRO_3)();
     delete the_test;
 }
index 2fc1d5e045e4ffc2f89da3701cf74ecc79fd5238..67e41061c8b0127e91f30437ffa95eca0b3094d5 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2008 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -38,6 +38,7 @@ extern "C" {
 #include <stdexcept>
 
 #include "macros.hpp"
+#include "utils.hpp"
 
 #include "detail/fs.hpp"
 #include "detail/process.hpp"
@@ -51,7 +52,7 @@ extern "C" {
 
 static
 void
-create_ctl_file(const atf::tests::tc& tc, const char *name)
+create_ctl_file(const char *name)
 {
     ATF_REQUIRE(open(name, O_CREAT | O_WRONLY | O_TRUNC, 0644) != -1);
 }
@@ -67,9 +68,9 @@ ATF_TEST_CASE_HEAD(h_pass)
 }
 ATF_TEST_CASE_BODY(h_pass)
 {
-    create_ctl_file(*this, "before");
+    create_ctl_file("before");
     ATF_PASS();
-    create_ctl_file(*this, "after");
+    create_ctl_file("after");
 }
 
 ATF_TEST_CASE(h_fail);
@@ -79,9 +80,9 @@ ATF_TEST_CASE_HEAD(h_fail)
 }
 ATF_TEST_CASE_BODY(h_fail)
 {
-    create_ctl_file(*this, "before");
+    create_ctl_file("before");
     ATF_FAIL("Failed on purpose");
-    create_ctl_file(*this, "after");
+    create_ctl_file("after");
 }
 
 ATF_TEST_CASE(h_skip);
@@ -91,9 +92,9 @@ ATF_TEST_CASE_HEAD(h_skip)
 }
 ATF_TEST_CASE_BODY(h_skip)
 {
-    create_ctl_file(*this, "before");
+    create_ctl_file("before");
     ATF_SKIP("Skipped on purpose");
-    create_ctl_file(*this, "after");
+    create_ctl_file("after");
 }
 
 ATF_TEST_CASE(h_require);
@@ -105,9 +106,9 @@ ATF_TEST_CASE_BODY(h_require)
 {
     bool condition = atf::text::to_bool(get_config_var("condition"));
 
-    create_ctl_file(*this, "before");
+    create_ctl_file("before");
     ATF_REQUIRE(condition);
-    create_ctl_file(*this, "after");
+    create_ctl_file("after");
 }
 
 ATF_TEST_CASE(h_require_eq);
@@ -120,9 +121,28 @@ ATF_TEST_CASE_BODY(h_require_eq)
     long v1 = atf::text::to_type< long >(get_config_var("v1"));
     long v2 = atf::text::to_type< long >(get_config_var("v2"));
 
-    create_ctl_file(*this, "before");
+    create_ctl_file("before");
     ATF_REQUIRE_EQ(v1, v2);
-    create_ctl_file(*this, "after");
+    create_ctl_file("after");
+}
+
+ATF_TEST_CASE(h_require_in);
+ATF_TEST_CASE_HEAD(h_require_in)
+{
+    set_md_var("descr", "Helper test case");
+}
+ATF_TEST_CASE_BODY(h_require_in)
+{
+    const std::string element = get_config_var("value");
+
+    std::set< std::string > collection;
+    collection.insert("foo");
+    collection.insert("bar");
+    collection.insert("baz");
+
+    create_ctl_file("before");
+    ATF_REQUIRE_IN(element, collection);
+    create_ctl_file("after");
 }
 
 ATF_TEST_CASE(h_require_match);
@@ -135,9 +155,28 @@ ATF_TEST_CASE_BODY(h_require_match)
     const std::string regexp = get_config_var("regexp");
     const std::string string = get_config_var("string");
 
-    create_ctl_file(*this, "before");
+    create_ctl_file("before");
     ATF_REQUIRE_MATCH(regexp, string);
-    create_ctl_file(*this, "after");
+    create_ctl_file("after");
+}
+
+ATF_TEST_CASE(h_require_not_in);
+ATF_TEST_CASE_HEAD(h_require_not_in)
+{
+    set_md_var("descr", "Helper test case");
+}
+ATF_TEST_CASE_BODY(h_require_not_in)
+{
+    const std::string element = get_config_var("value");
+
+    std::set< std::string > collection;
+    collection.insert("foo");
+    collection.insert("bar");
+    collection.insert("baz");
+
+    create_ctl_file("before");
+    ATF_REQUIRE_NOT_IN(element, collection);
+    create_ctl_file("after");
 }
 
 ATF_TEST_CASE(h_require_throw);
@@ -147,7 +186,7 @@ ATF_TEST_CASE_HEAD(h_require_throw)
 }
 ATF_TEST_CASE_BODY(h_require_throw)
 {
-    create_ctl_file(*this, "before");
+    create_ctl_file("before");
 
     if (get_config_var("what") == "throw_int")
         ATF_REQUIRE_THROW(std::runtime_error, if (1) throw int(5));
@@ -158,7 +197,7 @@ ATF_TEST_CASE_BODY(h_require_throw)
         ATF_REQUIRE_THROW(std::runtime_error,
                         if (0) throw std::runtime_error("e"));
 
-    create_ctl_file(*this, "after");
+    create_ctl_file("after");
 }
 
 ATF_TEST_CASE(h_require_throw_re);
@@ -168,7 +207,7 @@ ATF_TEST_CASE_HEAD(h_require_throw_re)
 }
 ATF_TEST_CASE_BODY(h_require_throw_re)
 {
-    create_ctl_file(*this, "before");
+    create_ctl_file("before");
 
     if (get_config_var("what") == "throw_int")
         ATF_REQUIRE_THROW_RE(std::runtime_error, "5", if (1) throw int(5));
@@ -182,7 +221,7 @@ ATF_TEST_CASE_BODY(h_require_throw_re)
         ATF_REQUIRE_THROW_RE(std::runtime_error, "e",
                              if (0) throw std::runtime_error("e"));
 
-    create_ctl_file(*this, "after");
+    create_ctl_file("after");
 }
 
 static int
@@ -205,7 +244,7 @@ ATF_TEST_CASE_HEAD(h_check_errno)
 }
 ATF_TEST_CASE_BODY(h_check_errno)
 {
-    create_ctl_file(*this, "before");
+    create_ctl_file("before");
 
     if (get_config_var("what") == "no_error")
         ATF_CHECK_ERRNO(-1, errno_ok_stub() == -1);
@@ -216,7 +255,7 @@ ATF_TEST_CASE_BODY(h_check_errno)
     else
         UNREACHABLE;
 
-    create_ctl_file(*this, "after");
+    create_ctl_file("after");
 }
 
 ATF_TEST_CASE(h_require_errno);
@@ -226,7 +265,7 @@ ATF_TEST_CASE_HEAD(h_require_errno)
 }
 ATF_TEST_CASE_BODY(h_require_errno)
 {
-    create_ctl_file(*this, "before");
+    create_ctl_file("before");
 
     if (get_config_var("what") == "no_error")
         ATF_REQUIRE_ERRNO(-1, errno_ok_stub() == -1);
@@ -237,7 +276,7 @@ ATF_TEST_CASE_BODY(h_require_errno)
     else
         UNREACHABLE;
 
-    create_ctl_file(*this, "after");
+    create_ctl_file("after");
 }
 
 // ------------------------------------------------------------------------
@@ -251,8 +290,9 @@ ATF_TEST_CASE_HEAD(pass)
 }
 ATF_TEST_CASE_BODY(pass)
 {
+    ATF_TEST_CASE_USE(h_pass);
     run_h_tc< ATF_TEST_CASE_NAME(h_pass) >();
-    ATF_REQUIRE(grep_file("result", "^passed"));
+    ATF_REQUIRE(atf::utils::grep_file("^passed", "result"));
     ATF_REQUIRE(atf::fs::exists(atf::fs::path("before")));
     ATF_REQUIRE(!atf::fs::exists(atf::fs::path("after")));
 }
@@ -264,8 +304,9 @@ ATF_TEST_CASE_HEAD(fail)
 }
 ATF_TEST_CASE_BODY(fail)
 {
+    ATF_TEST_CASE_USE(h_fail);
     run_h_tc< ATF_TEST_CASE_NAME(h_fail) >();
-    ATF_REQUIRE(grep_file("result", "^failed: Failed on purpose"));
+    ATF_REQUIRE(atf::utils::grep_file("^failed: Failed on purpose", "result"));
     ATF_REQUIRE(atf::fs::exists(atf::fs::path("before")));
     ATF_REQUIRE(!atf::fs::exists(atf::fs::path("after")));
 }
@@ -277,8 +318,10 @@ ATF_TEST_CASE_HEAD(skip)
 }
 ATF_TEST_CASE_BODY(skip)
 {
+    ATF_TEST_CASE_USE(h_skip);
     run_h_tc< ATF_TEST_CASE_NAME(h_skip) >();
-    ATF_REQUIRE(grep_file("result", "^skipped: Skipped on purpose"));
+    ATF_REQUIRE(atf::utils::grep_file("^skipped: Skipped on purpose",
+        "result"));
     ATF_REQUIRE(atf::fs::exists(atf::fs::path("before")));
     ATF_REQUIRE(!atf::fs::exists(atf::fs::path("after")));
 }
@@ -308,14 +351,16 @@ ATF_TEST_CASE_BODY(require)
 
         std::cout << "Checking with a " << t->cond << " value\n";
 
+        ATF_TEST_CASE_USE(h_require);
         run_h_tc< ATF_TEST_CASE_NAME(h_require) >(config);
 
         ATF_REQUIRE(atf::fs::exists(before));
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf::utils::grep_file("^passed", "result"));
             ATF_REQUIRE(atf::fs::exists(after));
         } else {
-            ATF_REQUIRE(grep_file("result", "^failed: .*condition not met"));
+            ATF_REQUIRE(atf::utils::grep_file(
+                "^failed: .*condition not met", "result"));
             ATF_REQUIRE(!atf::fs::exists(after));
         }
 
@@ -356,14 +401,60 @@ ATF_TEST_CASE_BODY(require_eq)
                   << " and expecting " << (t->ok ? "true" : "false")
                   << "\n";
 
+        ATF_TEST_CASE_USE(h_require_eq);
         run_h_tc< ATF_TEST_CASE_NAME(h_require_eq) >(config);
 
         ATF_REQUIRE(atf::fs::exists(before));
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf::utils::grep_file("^passed", "result"));
             ATF_REQUIRE(atf::fs::exists(after));
         } else {
-            ATF_REQUIRE(grep_file("result", "^failed: .*v1 != v2"));
+            ATF_REQUIRE(atf::utils::grep_file("^failed: .*v1 != v2", "result"));
+            ATF_REQUIRE(!atf::fs::exists(after));
+        }
+
+        atf::fs::remove(before);
+        if (t->ok)
+            atf::fs::remove(after);
+    }
+}
+
+ATF_TEST_CASE(require_in);
+ATF_TEST_CASE_HEAD(require_in)
+{
+    set_md_var("descr", "Tests the ATF_REQUIRE_IN macro");
+}
+ATF_TEST_CASE_BODY(require_in)
+{
+    struct test {
+        const char *value;
+        bool ok;
+    } *t, tests[] = {
+        { "foo", true },
+        { "bar", true },
+        { "baz", true },
+        { "xxx", false },
+        { "fooa", false },
+        { "foo ", false },
+        { NULL, false }
+    };
+
+    const atf::fs::path before("before");
+    const atf::fs::path after("after");
+
+    for (t = &tests[0]; t->value != NULL; t++) {
+        atf::tests::vars_map config;
+        config["value"] = t->value;
+
+        ATF_TEST_CASE_USE(h_require_in);
+        run_h_tc< ATF_TEST_CASE_NAME(h_require_in) >(config);
+
+        ATF_REQUIRE(atf::fs::exists(before));
+        if (t->ok) {
+            ATF_REQUIRE(atf::utils::grep_file("^passed", "result"));
+            ATF_REQUIRE(atf::fs::exists(after));
+        } else {
+            ATF_REQUIRE(atf::utils::grep_file("^failed: ", "result"));
             ATF_REQUIRE(!atf::fs::exists(after));
         }
 
@@ -402,14 +493,60 @@ ATF_TEST_CASE_BODY(require_match)
                   << " and expecting " << (t->ok ? "true" : "false")
                   << "\n";
 
+        ATF_TEST_CASE_USE(h_require_match);
         run_h_tc< ATF_TEST_CASE_NAME(h_require_match) >(config);
 
         ATF_REQUIRE(atf::fs::exists(before));
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf::utils::grep_file("^passed", "result"));
+            ATF_REQUIRE(atf::fs::exists(after));
+        } else {
+            ATF_REQUIRE(atf::utils::grep_file("^failed: ", "result"));
+            ATF_REQUIRE(!atf::fs::exists(after));
+        }
+
+        atf::fs::remove(before);
+        if (t->ok)
+            atf::fs::remove(after);
+    }
+}
+
+ATF_TEST_CASE(require_not_in);
+ATF_TEST_CASE_HEAD(require_not_in)
+{
+    set_md_var("descr", "Tests the ATF_REQUIRE_NOT_IN macro");
+}
+ATF_TEST_CASE_BODY(require_not_in)
+{
+    struct test {
+        const char *value;
+        bool ok;
+    } *t, tests[] = {
+        { "foo", false },
+        { "bar", false },
+        { "baz", false },
+        { "xxx", true },
+        { "fooa", true },
+        { "foo ", true },
+        { NULL, false }
+    };
+
+    const atf::fs::path before("before");
+    const atf::fs::path after("after");
+
+    for (t = &tests[0]; t->value != NULL; t++) {
+        atf::tests::vars_map config;
+        config["value"] = t->value;
+
+        ATF_TEST_CASE_USE(h_require_not_in);
+        run_h_tc< ATF_TEST_CASE_NAME(h_require_not_in) >(config);
+
+        ATF_REQUIRE(atf::fs::exists(before));
+        if (t->ok) {
+            ATF_REQUIRE(atf::utils::grep_file("^passed", "result"));
             ATF_REQUIRE(atf::fs::exists(after));
         } else {
-            ATF_REQUIRE(grep_file("result", "^failed: "));
+            ATF_REQUIRE(atf::utils::grep_file("^failed: ", "result"));
             ATF_REQUIRE(!atf::fs::exists(after));
         }
 
@@ -447,17 +584,18 @@ ATF_TEST_CASE_BODY(require_throw)
         std::cout << "Checking with " << t->what << " and expecting "
                   << (t->ok ? "true" : "false") << "\n";
 
+        ATF_TEST_CASE_USE(h_require_throw);
         run_h_tc< ATF_TEST_CASE_NAME(h_require_throw) >(config);
 
         ATF_REQUIRE(atf::fs::exists(before));
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf::utils::grep_file("^passed", "result"));
             ATF_REQUIRE(atf::fs::exists(after));
         } else {
             std::cout << "Checking that message contains '" << t->msg
                       << "'\n";
             std::string exp_result = std::string("^failed: .*") + t->msg;
-            ATF_REQUIRE(grep_file("result", exp_result.c_str()));
+            ATF_REQUIRE(atf::utils::grep_file(exp_result.c_str(), "result"));
             ATF_REQUIRE(!atf::fs::exists(after));
         }
 
@@ -481,8 +619,9 @@ ATF_TEST_CASE_BODY(require_throw_re)
     } *t, tests[] = {
         { "throw_int", false, "unexpected error" },
         { "throw_rt_match", true, NULL },
-        { "throw_rt_no_match", true, "threw.*runtime_error(baz foo bar a).*"
-          "does not match 'a foo bar baz'" },
+        { "throw_rt_no_match", false,
+          "threw.*runtime_error\\(baz foo bar a\\).*"
+          "does not match 'foo\\.\\*baz'" },
         { "no_throw_rt", false, "did not throw" },
         { NULL, false, NULL }
     };
@@ -497,17 +636,18 @@ ATF_TEST_CASE_BODY(require_throw_re)
         std::cout << "Checking with " << t->what << " and expecting "
                   << (t->ok ? "true" : "false") << "\n";
 
-        run_h_tc< ATF_TEST_CASE_NAME(h_require_throw) >(config);
+        ATF_TEST_CASE_USE(h_require_throw_re);
+        run_h_tc< ATF_TEST_CASE_NAME(h_require_throw_re) >(config);
 
         ATF_REQUIRE(atf::fs::exists(before));
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf::utils::grep_file("^passed", "result"));
             ATF_REQUIRE(atf::fs::exists(after));
         } else {
             std::cout << "Checking that message contains '" << t->msg
                       << "'\n";
             std::string exp_result = std::string("^failed: .*") + t->msg;
-            ATF_REQUIRE(grep_file("result", exp_result.c_str()));
+            ATF_REQUIRE(atf::utils::grep_file(exp_result.c_str(), "result"));
             ATF_REQUIRE(!atf::fs::exists(after));
         }
 
@@ -544,19 +684,20 @@ ATF_TEST_CASE_BODY(check_errno)
         atf::tests::vars_map config;
         config["what"] = t->what;
 
+        ATF_TEST_CASE_USE(h_check_errno);
         run_h_tc< ATF_TEST_CASE_NAME(h_check_errno) >(config);
 
         ATF_REQUIRE(atf::fs::exists(before));
         ATF_REQUIRE(atf::fs::exists(after));
 
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf::utils::grep_file("^passed", "result"));
         } else {
-            ATF_REQUIRE(grep_file("result", "^failed"));
+            ATF_REQUIRE(atf::utils::grep_file("^failed", "result"));
 
             std::string exp_result = "macros_test.cpp:[0-9]+: " +
                 std::string(t->msg) + "$";
-            ATF_REQUIRE(grep_file("stderr", exp_result.c_str()));
+            ATF_REQUIRE(atf::utils::grep_file(exp_result.c_str(), "stderr"));
         }
 
         atf::fs::remove(before);
@@ -591,16 +732,17 @@ ATF_TEST_CASE_BODY(require_errno)
         atf::tests::vars_map config;
         config["what"] = t->what;
 
+        ATF_TEST_CASE_USE(h_require_errno);
         run_h_tc< ATF_TEST_CASE_NAME(h_require_errno) >(config);
 
         ATF_REQUIRE(atf::fs::exists(before));
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf::utils::grep_file("^passed", "result"));
             ATF_REQUIRE(atf::fs::exists(after));
         } else {
             std::string exp_result = "^failed: .*macros_test.cpp:[0-9]+: " +
                 std::string(t->msg) + "$";
-            ATF_REQUIRE(grep_file("result", exp_result.c_str()));
+            ATF_REQUIRE(atf::utils::grep_file(exp_result.c_str(), "result"));
 
             ATF_REQUIRE(!atf::fs::exists(after));
         }
@@ -621,6 +763,11 @@ BUILD_TC(use, "macros_hpp_test.cpp",
          "do not cause syntax errors when used",
          "Build of macros_hpp_test.cpp failed; some macros in "
          "atf-c++/macros.hpp are broken");
+BUILD_TC_FAIL(detect_unused_tests, "unused_test.cpp",
+         "Tests that defining an unused test case raises a warning (and thus "
+         "an error)",
+         "Build of unused_test.cpp passed; unused test cases are not properly "
+         "detected");
 
 // ------------------------------------------------------------------------
 // Main.
@@ -635,7 +782,9 @@ ATF_INIT_TEST_CASES(tcs)
     ATF_ADD_TEST_CASE(tcs, check_errno);
     ATF_ADD_TEST_CASE(tcs, require);
     ATF_ADD_TEST_CASE(tcs, require_eq);
+    ATF_ADD_TEST_CASE(tcs, require_in);
     ATF_ADD_TEST_CASE(tcs, require_match);
+    ATF_ADD_TEST_CASE(tcs, require_not_in);
     ATF_ADD_TEST_CASE(tcs, require_throw);
     ATF_ADD_TEST_CASE(tcs, require_throw_re);
     ATF_ADD_TEST_CASE(tcs, require_errno);
@@ -643,4 +792,5 @@ ATF_INIT_TEST_CASES(tcs)
     // Add the test cases for the header file.
     ATF_ADD_TEST_CASE(tcs, include);
     ATF_ADD_TEST_CASE(tcs, use);
+    ATF_ADD_TEST_CASE(tcs, detect_unused_tests);
 }
diff --git a/unit/atf-src/atf-c++/noncopyable.hpp b/unit/atf-src/atf-c++/noncopyable.hpp
new file mode 100644 (file)
index 0000000..a885a66
--- /dev/null
@@ -0,0 +1,56 @@
+//
+// Automated Testing Framework (atf)
+//
+// Copyright (c) 2007 The NetBSD Foundation, 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:
+// 1. Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+// 2. 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.
+//
+// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+//
+
+#if !defined(_ATF_CXX_NONCOPYABLE_HPP_)
+#define _ATF_CXX_NONCOPYABLE_HPP_
+
+namespace atf {
+
+// ------------------------------------------------------------------------
+// The "noncopyable" class.
+// ------------------------------------------------------------------------
+
+class noncopyable {
+    // The class cannot be empty; otherwise we get ABI-stability warnings
+    // during the build, which will break it due to strict checking.
+    int m_noncopyable_dummy;
+
+    noncopyable(const noncopyable& nc);
+    noncopyable& operator=(const noncopyable& nc);
+
+protected:
+    // Explicitly needed to provide some non-private functions.  Otherwise
+    // we also get some warnings during the build.
+    noncopyable(void) {}
+    ~noncopyable(void) {}
+};
+
+} // namespace atf
+
+#endif // !defined(_ATF_CXX_NONCOPYABLE_HPP_)
index 40b9559bc95af672db1d94fb2d0924ca2da943ad..8409902c0fdbd6a0892fb718b7762511aac364e1 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
index 054c6fbf51c1bf86032c2f4d35edbb7fc64a6ced..2c351fcb3dbbb3f7966f938b0a40defaa938a4c6 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -55,9 +55,11 @@ extern "C" {
 #include "atf-c/utils.h"
 }
 
+#include "noncopyable.hpp"
 #include "tests.hpp"
 
 #include "detail/application.hpp"
+#include "detail/auto_array.hpp"
 #include "detail/env.hpp"
 #include "detail/exceptions.hpp"
 #include "detail/fs.hpp"
@@ -127,7 +129,7 @@ detail::match(const std::string& regexp, const std::string& str)
 static std::map< atf_tc_t*, impl::tc* > wraps;
 static std::map< const atf_tc_t*, const impl::tc* > cwraps;
 
-struct impl::tc_impl : atf::utils::noncopyable {
+struct impl::tc_impl : atf::noncopyable {
     std::string m_ident;
     atf_tc_t m_tc;
     bool m_has_cleanup;
@@ -190,8 +192,7 @@ impl::tc::init(const vars_map& config)
 {
     atf_error_t err;
 
-    utils::auto_array< const char * > array(
-        new const char*[(config.size() * 2) + 1]);
+    auto_array< const char * > array(new const char*[(config.size() * 2) + 1]);
     const char **ptr = array.get();
     for (vars_map::const_iterator iter = config.begin();
          iter != config.end(); iter++) {
@@ -641,6 +642,16 @@ tp::run_tc(const std::string& tcarg)
 
     impl::tc* tc = find_tc(init_tcs(), fields.first);
 
+    if (!atf::env::has("__RUNNING_INSIDE_ATF_RUN") || atf::env::get(
+        "__RUNNING_INSIDE_ATF_RUN") != "internal-yes-value")
+    {
+        std::cerr << m_prog_name << ": WARNING: Running test cases without "
+            "atf-run(1) is unsupported\n";
+        std::cerr << m_prog_name << ": WARNING: No isolation nor timeout "
+            "control is being applied; you may get unexpected failures; see "
+            "atf-test-case(4)\n";
+    }
+
     try {
         switch (fields.second) {
         case BODY:
index 208e33da256bd70f52d652690c2f50603bc7e09f..22a2a8706a9ac5a7073074eed40c52fa922ca0eb 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@ extern "C" {
 #include <atf-c/defs.h>
 }
 
-#include <atf-c++/utils.hpp>
+#include <atf-c++/noncopyable.hpp>
 
 namespace atf {
 namespace tests {
@@ -74,7 +74,7 @@ typedef std::map< std::string, std::string > vars_map;
 
 struct tc_impl;
 
-class tc : utils::noncopyable {
+class tc : noncopyable {
     std::auto_ptr< tc_impl > pimpl;
 
 protected:
index 02337a11f7d0daf7db31a37c29f17be4811361d8..63ab2ef91a5d53034513b4475f9f38acc9c2dbd4 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/unit/atf-src/atf-c++/unused_test.cpp b/unit/atf-src/atf-c++/unused_test.cpp
new file mode 100644 (file)
index 0000000..2a18a45
--- /dev/null
@@ -0,0 +1,52 @@
+//
+// Automated Testing Framework (atf)
+//
+// Copyright (c) 2012 The NetBSD Foundation, 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:
+// 1. Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+// 2. 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.
+//
+// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+//
+
+#include <atf-c++/macros.hpp>
+
+ATF_TEST_CASE(this_is_used);
+ATF_TEST_CASE_HEAD(this_is_used)
+{
+}
+ATF_TEST_CASE_BODY(this_is_used)
+{
+}
+
+ATF_TEST_CASE(this_is_unused);
+ATF_TEST_CASE_HEAD(this_is_unused)
+{
+}
+ATF_TEST_CASE_BODY(this_is_unused)
+{
+}
+
+ATF_INIT_TEST_CASES(tcs)
+{
+    ATF_ADD_TEST_CASE(tcs, this_is_used);
+    //ATF_ADD_TEST_CASE(tcs, this_is_unused);
+}
diff --git a/unit/atf-src/atf-c++/utils.cpp b/unit/atf-src/atf-c++/utils.cpp
new file mode 100644 (file)
index 0000000..cc338bb
--- /dev/null
@@ -0,0 +1,104 @@
+//
+// Automated Testing Framework (atf)
+//
+// Copyright (c) 2007 The NetBSD Foundation, 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:
+// 1. Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+// 2. 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.
+//
+// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+//
+
+extern "C" {
+#include "atf-c/utils.h"
+}
+
+#include <cstdlib>
+#include <iostream>
+
+#include "utils.hpp"
+
+void
+atf::utils::cat_file(const std::string& path, const std::string& prefix)
+{
+    atf_utils_cat_file(path.c_str(), prefix.c_str());
+}
+
+void
+atf::utils::copy_file(const std::string& source, const std::string& destination)
+{
+    atf_utils_copy_file(source.c_str(), destination.c_str());
+}
+
+bool
+atf::utils::compare_file(const std::string& path, const std::string& contents)
+{
+    return atf_utils_compare_file(path.c_str(), contents.c_str());
+}
+
+void
+atf::utils::create_file(const std::string& path, const std::string& contents)
+{
+    atf_utils_create_file(path.c_str(), "%s", contents.c_str());
+}
+
+bool
+atf::utils::file_exists(const std::string& path)
+{
+    return atf_utils_file_exists(path.c_str());
+}
+
+pid_t
+atf::utils::fork(void)
+{
+    std::cout.flush();
+    std::cerr.flush();
+    return atf_utils_fork();
+}
+
+bool
+atf::utils::grep_file(const std::string& regex, const std::string& path)
+{
+    return atf_utils_grep_file("%s", path.c_str(), regex.c_str());
+}
+
+bool
+atf::utils::grep_string(const std::string& regex, const std::string& str)
+{
+    return atf_utils_grep_string("%s", str.c_str(), regex.c_str());
+}
+
+void
+atf::utils::redirect(const int fd, const std::string& path)
+{
+    if (fd == STDOUT_FILENO)
+        std::cout.flush();
+    else if (fd == STDERR_FILENO)
+        std::cerr.flush();
+    atf_utils_redirect(fd, path.c_str());
+}
+
+void
+atf::utils::wait(const pid_t pid, const int exitstatus,
+                 const std::string& expout, const std::string& experr)
+{
+    atf_utils_wait(pid, exitstatus, expout.c_str(), experr.c_str());
+}
index 98233c3d13cec6bf9296971171e643196aab3799..b8596aecdc0c576e52269e264256a5835eaa851d 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 #if !defined(_ATF_CXX_UTILS_HPP_)
 #define _ATF_CXX_UTILS_HPP_
 
-#include <cstddef>
-
-namespace atf {
-namespace utils {
-
-// ------------------------------------------------------------------------
-// The "auto_array" class.
-// ------------------------------------------------------------------------
-
-template< class T >
-struct auto_array_ref {
-    T* m_ptr;
-
-    explicit auto_array_ref(T*);
-};
-
-template< class T >
-auto_array_ref< T >::auto_array_ref(T* ptr) :
-    m_ptr(ptr)
-{
-}
-
-template< class T >
-class auto_array {
-    T* m_ptr;
-
-public:
-    auto_array(T* = NULL) throw();
-    auto_array(auto_array< T >&) throw();
-    auto_array(auto_array_ref< T >) throw();
-    ~auto_array(void) throw();
-
-    T* get(void) throw();
-    const T* get(void) const throw();
-    T* release(void) throw();
-    void reset(T* = NULL) throw();
-
-    auto_array< T >& operator=(auto_array< T >&) throw();
-    auto_array< T >& operator=(auto_array_ref< T >) throw();
-
-    T& operator[](int) throw();
-    operator auto_array_ref< T >(void) throw();
-};
-
-template< class T >
-auto_array< T >::auto_array(T* ptr)
-    throw() :
-    m_ptr(ptr)
-{
-}
-
-template< class T >
-auto_array< T >::auto_array(auto_array< T >& ptr)
-    throw() :
-    m_ptr(ptr.release())
-{
-}
-
-template< class T >
-auto_array< T >::auto_array(auto_array_ref< T > ref)
-    throw() :
-    m_ptr(ref.m_ptr)
-{
-}
-
-template< class T >
-auto_array< T >::~auto_array(void)
-    throw()
-{
-    if (m_ptr != NULL)
-        delete [] m_ptr;
+extern "C" {
+#include <unistd.h>
 }
 
-template< class T >
-T*
-auto_array< T >::get(void)
-    throw()
-{
-    return m_ptr;
-}
+#include <string>
 
-template< class T >
-const T*
-auto_array< T >::get(void)
-    const throw()
-{
-    return m_ptr;
-}
-
-template< class T >
-T*
-auto_array< T >::release(void)
-    throw()
-{
-    T* ptr = m_ptr;
-    m_ptr = NULL;
-    return ptr;
-}
-
-template< class T >
-void
-auto_array< T >::reset(T* ptr)
-    throw()
-{
-    if (m_ptr != NULL)
-        delete [] m_ptr;
-    m_ptr = ptr;
-}
-
-template< class T >
-auto_array< T >&
-auto_array< T >::operator=(auto_array< T >& ptr)
-    throw()
-{
-    reset(ptr.release());
-    return *this;
-}
+namespace atf {
+namespace utils {
 
-template< class T >
-auto_array< T >&
-auto_array< T >::operator=(auto_array_ref< T > ref)
-    throw()
+void cat_file(const std::string&, const std::string&);
+bool compare_file(const std::string&, const std::string&);
+void copy_file(const std::string&, const std::string&);
+void create_file(const std::string&, const std::string&);
+bool file_exists(const std::string&);
+pid_t fork(void);
+bool grep_file(const std::string&, const std::string&);
+bool grep_string(const std::string&, const std::string&);
+void redirect(const int, const std::string&);
+void wait(const pid_t, const int, const std::string&, const std::string&);
+
+template< typename Collection >
+bool
+grep_collection(const std::string& regexp, const Collection& collection)
 {
-    if (m_ptr != ref.m_ptr) {
-        delete [] m_ptr;
-        m_ptr = ref.m_ptr;
+    for (typename Collection::const_iterator iter = collection.begin();
+         iter != collection.end(); ++iter) {
+        if (grep_string(regexp, *iter))
+            return true;
     }
-    return *this;
-}
-
-template< class T >
-T&
-auto_array< T >::operator[](int pos)
-    throw()
-{
-    return m_ptr[pos];
-}
-
-template< class T >
-auto_array< T >::operator auto_array_ref< T >(void)
-    throw()
-{
-    return auto_array_ref< T >(release());
+    return false;
 }
 
-// ------------------------------------------------------------------------
-// The "noncopyable" class.
-// ------------------------------------------------------------------------
-
-class noncopyable {
-    // The class cannot be empty; otherwise we get ABI-stability warnings
-    // during the build, which will break it due to strict checking.
-    int m_noncopyable_dummy;
-
-    noncopyable(const noncopyable& nc);
-    noncopyable& operator=(const noncopyable& nc);
-
-protected:
-    // Explicitly needed to provide some non-private functions.  Otherwise
-    // we also get some warnings during the build.
-    noncopyable(void) {}
-    ~noncopyable(void) {}
-};
-
 } // namespace utils
 } // namespace atf
 
index 5b0f5e62341ba8fc3a39cce3a53ad36d087c00d2..37457ff2b838901f9bf1ca610a4ea64fec224bd6 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 
+extern "C" {
+#include <sys/stat.h>
+#include <sys/wait.h>
+
+#include <fcntl.h>
+#include <unistd.h>
+}
+
+#include <cstdlib>
 #include <iostream>
+#include <set>
+#include <string>
+#include <vector>
 
 #include "macros.hpp"
 #include "utils.hpp"
 
 #include "detail/test_helpers.hpp"
 
+static std::string
+read_file(const char *path)
+{
+    char buffer[1024];
+
+    const int fd = open(path, O_RDONLY);
+    if (fd == -1)
+        ATF_FAIL("Cannot open " + std::string(path));
+    const ssize_t length = read(fd, buffer, sizeof(buffer) - 1);
+    close(fd);
+    ATF_REQUIRE(length != -1);
+    if (length == sizeof(buffer) - 1)
+        ATF_FAIL("Internal buffer not long enough to read temporary file");
+    ((char *)buffer)[length] = '\0';
+
+    return buffer;
+}
+
 // ------------------------------------------------------------------------
-// Tests for the "auto_array" class.
+// Tests cases for the free functions.
 // ------------------------------------------------------------------------
 
-class test_array {
-public:
-    int m_value;
+ATF_TEST_CASE_WITHOUT_HEAD(cat_file__empty);
+ATF_TEST_CASE_BODY(cat_file__empty)
+{
+    atf::utils::create_file("file.txt", "");
+    atf::utils::redirect(STDOUT_FILENO, "captured.txt");
+    atf::utils::cat_file("file.txt", "PREFIX");
+    std::cout.flush();
+    close(STDOUT_FILENO);
 
-    static ssize_t m_nblocks;
+    ATF_REQUIRE_EQ("", read_file("captured.txt"));
+}
 
-    static
-    atf::utils::auto_array< test_array >
-    do_copy(atf::utils::auto_array< test_array >& ta)
-    {
-        return atf::utils::auto_array< test_array >(ta);
-    }
+ATF_TEST_CASE_WITHOUT_HEAD(cat_file__one_line);
+ATF_TEST_CASE_BODY(cat_file__one_line)
+{
+    atf::utils::create_file("file.txt", "This is a single line\n");
+    atf::utils::redirect(STDOUT_FILENO, "captured.txt");
+    atf::utils::cat_file("file.txt", "PREFIX");
+    std::cout.flush();
+    close(STDOUT_FILENO);
 
-    void* operator new(size_t size)
-    {
-        ATF_FAIL("New called but should have been new[]");
-        return new int(5);
-    }
+    ATF_REQUIRE_EQ("PREFIXThis is a single line\n", read_file("captured.txt"));
+}
 
-    void* operator new[](size_t size)
-    {
-        m_nblocks++;
-        void* mem = ::operator new(size);
-        std::cout << "Allocated 'test_array' object " << mem << "\n";
-        return mem;
-    }
+ATF_TEST_CASE_WITHOUT_HEAD(cat_file__several_lines);
+ATF_TEST_CASE_BODY(cat_file__several_lines)
+{
+    atf::utils::create_file("file.txt", "First\nSecond line\nAnd third\n");
+    atf::utils::redirect(STDOUT_FILENO, "captured.txt");
+    atf::utils::cat_file("file.txt", ">");
+    std::cout.flush();
+    close(STDOUT_FILENO);
+
+    ATF_REQUIRE_EQ(">First\n>Second line\n>And third\n",
+                   read_file("captured.txt"));
+}
 
-    void operator delete(void* mem)
-    {
-        ATF_FAIL("Delete called but should have been delete[]");
-    }
+ATF_TEST_CASE_WITHOUT_HEAD(cat_file__no_newline_eof);
+ATF_TEST_CASE_BODY(cat_file__no_newline_eof)
+{
+    atf::utils::create_file("file.txt", "Foo\n bar baz");
+    atf::utils::redirect(STDOUT_FILENO, "captured.txt");
+    atf::utils::cat_file("file.txt", "PREFIX");
+    std::cout.flush();
+    close(STDOUT_FILENO);
 
-    void operator delete[](void* mem)
-    {
-        std::cout << "Releasing 'test_array' object " << mem << "\n";
-        if (m_nblocks == 0)
-            ATF_FAIL("Unbalanced delete[]");
-        m_nblocks--;
-        ::operator delete(mem);
-    }
-};
+    ATF_REQUIRE_EQ("PREFIXFoo\nPREFIX bar baz", read_file("captured.txt"));
+}
 
-ssize_t test_array::m_nblocks = 0;
+ATF_TEST_CASE_WITHOUT_HEAD(compare_file__empty__match);
+ATF_TEST_CASE_BODY(compare_file__empty__match)
+{
+    atf::utils::create_file("test.txt", "");
+    ATF_REQUIRE(atf::utils::compare_file("test.txt", ""));
+}
 
-ATF_TEST_CASE(auto_array_scope);
-ATF_TEST_CASE_HEAD(auto_array_scope)
+ATF_TEST_CASE_WITHOUT_HEAD(compare_file__empty__not_match);
+ATF_TEST_CASE_BODY(compare_file__empty__not_match)
 {
-    set_md_var("descr", "Tests the automatic scope handling in the "
-               "auto_array smart pointer class");
+    atf::utils::create_file("test.txt", "");
+    ATF_REQUIRE(!atf::utils::compare_file("test.txt", "\n"));
+    ATF_REQUIRE(!atf::utils::compare_file("test.txt", "foo"));
+    ATF_REQUIRE(!atf::utils::compare_file("test.txt", " "));
 }
-ATF_TEST_CASE_BODY(auto_array_scope)
+
+ATF_TEST_CASE_WITHOUT_HEAD(compare_file__short__match);
+ATF_TEST_CASE_BODY(compare_file__short__match)
 {
-    using atf::utils::auto_array;
+    atf::utils::create_file("test.txt", "this is a short file");
+    ATF_REQUIRE(atf::utils::compare_file("test.txt", "this is a short file"));
+}
 
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+ATF_TEST_CASE_WITHOUT_HEAD(compare_file__short__not_match);
+ATF_TEST_CASE_BODY(compare_file__short__not_match)
+{
+    atf::utils::create_file("test.txt", "this is a short file");
+    ATF_REQUIRE(!atf::utils::compare_file("test.txt", ""));
+    ATF_REQUIRE(!atf::utils::compare_file("test.txt", "\n"));
+    ATF_REQUIRE(!atf::utils::compare_file("test.txt", "this is a Short file"));
+    ATF_REQUIRE(!atf::utils::compare_file("test.txt", "this is a short fil"));
+    ATF_REQUIRE(!atf::utils::compare_file("test.txt", "this is a short file "));
 }
 
-ATF_TEST_CASE(auto_array_copy);
-ATF_TEST_CASE_HEAD(auto_array_copy)
+ATF_TEST_CASE_WITHOUT_HEAD(compare_file__long__match);
+ATF_TEST_CASE_BODY(compare_file__long__match)
 {
-    set_md_var("descr", "Tests the auto_array smart pointer class' copy "
-               "constructor");
+    char long_contents[3456];
+    size_t i = 0;
+    for (; i < sizeof(long_contents) - 1; i++)
+        long_contents[i] = '0' + (i % 10);
+    long_contents[i] = '\0';
+    atf::utils::create_file("test.txt", long_contents);
+
+    ATF_REQUIRE(atf::utils::compare_file("test.txt", long_contents));
 }
-ATF_TEST_CASE_BODY(auto_array_copy)
+
+ATF_TEST_CASE_WITHOUT_HEAD(compare_file__long__not_match);
+ATF_TEST_CASE_BODY(compare_file__long__not_match)
 {
-    using atf::utils::auto_array;
-
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t1(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-
-        {
-            auto_array< test_array > t2(t1);
-            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        }
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    char long_contents[3456];
+    size_t i = 0;
+    for (; i < sizeof(long_contents) - 1; i++)
+        long_contents[i] = '0' + (i % 10);
+    long_contents[i] = '\0';
+    atf::utils::create_file("test.txt", long_contents);
+
+    ATF_REQUIRE(!atf::utils::compare_file("test.txt", ""));
+    ATF_REQUIRE(!atf::utils::compare_file("test.txt", "\n"));
+    ATF_REQUIRE(!atf::utils::compare_file("test.txt", "0123456789"));
+    long_contents[i - 1] = 'Z';
+    ATF_REQUIRE(!atf::utils::compare_file("test.txt", long_contents));
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(copy_file__empty);
+ATF_TEST_CASE_BODY(copy_file__empty)
+{
+    atf::utils::create_file("src.txt", "");
+    ATF_REQUIRE(chmod("src.txt", 0520) != -1);
+
+    atf::utils::copy_file("src.txt", "dest.txt");
+    ATF_REQUIRE(atf::utils::compare_file("dest.txt", ""));
+    struct stat sb;
+    ATF_REQUIRE(stat("dest.txt", &sb) != -1);
+    ATF_REQUIRE_EQ(0520, sb.st_mode & 0xfff);
 }
 
-ATF_TEST_CASE(auto_array_copy_ref);
-ATF_TEST_CASE_HEAD(auto_array_copy_ref)
+ATF_TEST_CASE_WITHOUT_HEAD(copy_file__some_contents);
+ATF_TEST_CASE_BODY(copy_file__some_contents)
 {
-    set_md_var("descr", "Tests the auto_array smart pointer class' copy "
-               "constructor through the auxiliary auto_array_ref object");
+    atf::utils::create_file("src.txt", "This is a\ntest file\n");
+    atf::utils::copy_file("src.txt", "dest.txt");
+    ATF_REQUIRE(atf::utils::compare_file("dest.txt", "This is a\ntest file\n"));
 }
-ATF_TEST_CASE_BODY(auto_array_copy_ref)
+
+ATF_TEST_CASE_WITHOUT_HEAD(create_file);
+ATF_TEST_CASE_BODY(create_file)
 {
-    using atf::utils::auto_array;
-
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t1(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-
-        {
-            auto_array< test_array > t2 = test_array::do_copy(t1);
-            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        }
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    atf::utils::create_file("test.txt", "This is a %d test");
+
+    ATF_REQUIRE_EQ("This is a %d test", read_file("test.txt"));
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(file_exists);
+ATF_TEST_CASE_BODY(file_exists)
+{
+    atf::utils::create_file("test.txt", "foo");
+
+    ATF_REQUIRE( atf::utils::file_exists("test.txt"));
+    ATF_REQUIRE( atf::utils::file_exists("./test.txt"));
+    ATF_REQUIRE(!atf::utils::file_exists("./test.tx"));
+    ATF_REQUIRE(!atf::utils::file_exists("test.txt2"));
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(fork);
+ATF_TEST_CASE_BODY(fork)
+{
+    std::cout << "Should not get into child\n";
+    std::cerr << "Should not get into child\n";
+    pid_t pid = atf::utils::fork();
+    if (pid == 0) {
+        std::cout << "Child stdout\n";
+        std::cerr << "Child stderr\n";
+        exit(EXIT_SUCCESS);
     }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+
+    int status;
+    ATF_REQUIRE(waitpid(pid, &status, 0) != -1);
+    ATF_REQUIRE(WIFEXITED(status));
+    ATF_REQUIRE_EQ(EXIT_SUCCESS, WEXITSTATUS(status));
+
+    ATF_REQUIRE_EQ("Child stdout\n", read_file("atf_utils_fork_out.txt"));
+    ATF_REQUIRE_EQ("Child stderr\n", read_file("atf_utils_fork_err.txt"));
 }
 
-ATF_TEST_CASE(auto_array_get);
-ATF_TEST_CASE_HEAD(auto_array_get)
+ATF_TEST_CASE_WITHOUT_HEAD(grep_collection__set);
+ATF_TEST_CASE_BODY(grep_collection__set)
 {
-    set_md_var("descr", "Tests the auto_array smart pointer class' get "
-               "method");
+    std::set< std::string > strings;
+    strings.insert("First");
+    strings.insert("Second");
+
+    ATF_REQUIRE( atf::utils::grep_collection("irs", strings));
+    ATF_REQUIRE( atf::utils::grep_collection("cond", strings));
+    ATF_REQUIRE(!atf::utils::grep_collection("Third", strings));
 }
-ATF_TEST_CASE_BODY(auto_array_get)
+
+ATF_TEST_CASE_WITHOUT_HEAD(grep_collection__vector);
+ATF_TEST_CASE_BODY(grep_collection__vector)
 {
-    using atf::utils::auto_array;
+    std::vector< std::string > strings;
+    strings.push_back("First");
+    strings.push_back("Second");
 
-    test_array* ta = new test_array[10];
-    auto_array< test_array > t(ta);
-    ATF_REQUIRE_EQ(t.get(), ta);
+    ATF_REQUIRE( atf::utils::grep_collection("irs", strings));
+    ATF_REQUIRE( atf::utils::grep_collection("cond", strings));
+    ATF_REQUIRE(!atf::utils::grep_collection("Third", strings));
 }
 
-ATF_TEST_CASE(auto_array_release);
-ATF_TEST_CASE_HEAD(auto_array_release)
+ATF_TEST_CASE_WITHOUT_HEAD(grep_file);
+ATF_TEST_CASE_BODY(grep_file)
 {
-    set_md_var("descr", "Tests the auto_array smart pointer class' release "
-               "method");
+    atf::utils::create_file("test.txt", "line1\nthe second line\naaaabbbb\n");
+
+    ATF_REQUIRE(atf::utils::grep_file("line1", "test.txt"));
+    ATF_REQUIRE(atf::utils::grep_file("second line", "test.txt"));
+    ATF_REQUIRE(atf::utils::grep_file("aa.*bb", "test.txt"));
+    ATF_REQUIRE(!atf::utils::grep_file("foo", "test.txt"));
+    ATF_REQUIRE(!atf::utils::grep_file("bar", "test.txt"));
+    ATF_REQUIRE(!atf::utils::grep_file("aaaaa", "test.txt"));
 }
-ATF_TEST_CASE_BODY(auto_array_release)
+
+ATF_TEST_CASE_WITHOUT_HEAD(grep_string);
+ATF_TEST_CASE_BODY(grep_string)
 {
-    using atf::utils::auto_array;
-
-    test_array* ta1 = new test_array[10];
-    {
-        auto_array< test_array > t(ta1);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        test_array* ta2 = t.release();
-        ATF_REQUIRE_EQ(ta2, ta1);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-    delete [] ta1;
+    const char *str = "a string - aaaabbbb";
+    ATF_REQUIRE(atf::utils::grep_string("a string", str));
+    ATF_REQUIRE(atf::utils::grep_string("^a string", str));
+    ATF_REQUIRE(atf::utils::grep_string("aaaabbbb$", str));
+    ATF_REQUIRE(atf::utils::grep_string("aa.*bb", str));
+    ATF_REQUIRE(!atf::utils::grep_string("foo", str));
+    ATF_REQUIRE(!atf::utils::grep_string("bar", str));
+    ATF_REQUIRE(!atf::utils::grep_string("aaaaa", str));
 }
 
-ATF_TEST_CASE(auto_array_reset);
-ATF_TEST_CASE_HEAD(auto_array_reset)
+ATF_TEST_CASE_WITHOUT_HEAD(redirect__stdout);
+ATF_TEST_CASE_BODY(redirect__stdout)
 {
-    set_md_var("descr", "Tests the auto_array smart pointer class' reset "
-               "method");
+    std::cout << "Buffer this";
+    atf::utils::redirect(STDOUT_FILENO, "captured.txt");
+    std::cout << "The printed message";
+    std::cout.flush();
+
+    ATF_REQUIRE_EQ("The printed message", read_file("captured.txt"));
 }
-ATF_TEST_CASE_BODY(auto_array_reset)
+
+ATF_TEST_CASE_WITHOUT_HEAD(redirect__stderr);
+ATF_TEST_CASE_BODY(redirect__stderr)
 {
-    using atf::utils::auto_array;
-
-    test_array* ta1 = new test_array[10];
-    test_array* ta2 = new test_array[10];
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 2);
-
-    {
-        auto_array< test_array > t(ta1);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 2);
-        t.reset(ta2);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        t.reset();
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    std::cerr << "Buffer this";
+    atf::utils::redirect(STDERR_FILENO, "captured.txt");
+    std::cerr << "The printed message";
+    std::cerr.flush();
+
+    ATF_REQUIRE_EQ("The printed message", read_file("captured.txt"));
 }
 
-ATF_TEST_CASE(auto_array_assign);
-ATF_TEST_CASE_HEAD(auto_array_assign)
+ATF_TEST_CASE_WITHOUT_HEAD(redirect__other);
+ATF_TEST_CASE_BODY(redirect__other)
 {
-    set_md_var("descr", "Tests the auto_array smart pointer class' "
-               "assignment operator");
+    const std::string message = "Foo bar\nbaz\n";
+    atf::utils::redirect(15, "captured.txt");
+    ATF_REQUIRE(write(15, message.c_str(), message.length()) != -1);
+    close(15);
+
+    ATF_REQUIRE_EQ(message, read_file("captured.txt"));
 }
-ATF_TEST_CASE_BODY(auto_array_assign)
+
+static void
+fork_and_wait(const int exitstatus, const char* expout, const char* experr)
 {
-    using atf::utils::auto_array;
-
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t1(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-
-        {
-            auto_array< test_array > t2;
-            t2 = t1;
-            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        }
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    const pid_t pid = atf::utils::fork();
+    if (pid == 0) {
+        std::cout << "Some output\n";
+        std::cerr << "Some error\n";
+        exit(123);
     }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    atf::utils::wait(pid, exitstatus, expout, experr);
+    exit(EXIT_SUCCESS);
 }
 
-ATF_TEST_CASE(auto_array_assign_ref);
-ATF_TEST_CASE_HEAD(auto_array_assign_ref)
+ATF_TEST_CASE_WITHOUT_HEAD(wait__ok);
+ATF_TEST_CASE_BODY(wait__ok)
 {
-    set_md_var("descr", "Tests the auto_array smart pointer class' "
-               "assignment operator through the auxiliary auto_array_ref "
-               "object");
+    const pid_t control = fork();
+    ATF_REQUIRE(control != -1);
+    if (control == 0)
+        fork_and_wait(123, "Some output\n", "Some error\n");
+    else {
+        int status;
+        ATF_REQUIRE(waitpid(control, &status, 0) != -1);
+        ATF_REQUIRE(WIFEXITED(status));
+        ATF_REQUIRE_EQ(EXIT_SUCCESS, WEXITSTATUS(status));
+    }
 }
-ATF_TEST_CASE_BODY(auto_array_assign_ref)
+
+ATF_TEST_CASE_WITHOUT_HEAD(wait__invalid_exitstatus);
+ATF_TEST_CASE_BODY(wait__invalid_exitstatus)
 {
-    using atf::utils::auto_array;
-
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
-    {
-        auto_array< test_array > t1(new test_array[10]);
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-
-        {
-            auto_array< test_array > t2;
-            t2 = test_array::do_copy(t1);
-            ATF_REQUIRE_EQ(test_array::m_nblocks, 1);
-        }
-        ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
+    const pid_t control = fork();
+    ATF_REQUIRE(control != -1);
+    if (control == 0)
+        fork_and_wait(120, "Some output\n", "Some error\n");
+    else {
+        int status;
+        ATF_REQUIRE(waitpid(control, &status, 0) != -1);
+        ATF_REQUIRE(WIFEXITED(status));
+        ATF_REQUIRE_EQ(EXIT_FAILURE, WEXITSTATUS(status));
     }
-    ATF_REQUIRE_EQ(test_array::m_nblocks, 0);
 }
 
-ATF_TEST_CASE(auto_array_access);
-ATF_TEST_CASE_HEAD(auto_array_access)
+ATF_TEST_CASE_WITHOUT_HEAD(wait__invalid_stdout);
+ATF_TEST_CASE_BODY(wait__invalid_stdout)
 {
-    set_md_var("descr", "Tests the auto_array smart pointer class' access "
-               "operator");
+    const pid_t control = fork();
+    ATF_REQUIRE(control != -1);
+    if (control == 0)
+        fork_and_wait(123, "Some output foo\n", "Some error\n");
+    else {
+        int status;
+        ATF_REQUIRE(waitpid(control, &status, 0) != -1);
+        ATF_REQUIRE(WIFEXITED(status));
+        ATF_REQUIRE_EQ(EXIT_FAILURE, WEXITSTATUS(status));
+    }
 }
-ATF_TEST_CASE_BODY(auto_array_access)
-{
-    using atf::utils::auto_array;
 
-    auto_array< test_array > t(new test_array[10]);
+ATF_TEST_CASE_WITHOUT_HEAD(wait__invalid_stderr);
+ATF_TEST_CASE_BODY(wait__invalid_stderr)
+{
+    const pid_t control = fork();
+    ATF_REQUIRE(control != -1);
+    if (control == 0)
+        fork_and_wait(123, "Some output\n", "Some error foo\n");
+    else {
+        int status;
+        ATF_REQUIRE(waitpid(control, &status, 0) != -1);
+        ATF_REQUIRE(WIFEXITED(status));
+        ATF_REQUIRE_EQ(EXIT_FAILURE, WEXITSTATUS(status));
+    }
+}
 
-    for (int i = 0; i < 10; i++)
-        t[i].m_value = i * 2;
+ATF_TEST_CASE_WITHOUT_HEAD(wait__save_stdout);
+ATF_TEST_CASE_BODY(wait__save_stdout)
+{
+    const pid_t control = fork();
+    ATF_REQUIRE(control != -1);
+    if (control == 0)
+        fork_and_wait(123, "save:my-output.txt", "Some error\n");
+    else {
+        int status;
+        ATF_REQUIRE(waitpid(control, &status, 0) != -1);
+        ATF_REQUIRE(WIFEXITED(status));
+        ATF_REQUIRE_EQ(EXIT_SUCCESS, WEXITSTATUS(status));
+
+        ATF_REQUIRE(atf::utils::compare_file("my-output.txt", "Some output\n"));
+    }
+}
 
-    for (int i = 0; i < 10; i++)
-        ATF_REQUIRE_EQ(t[i].m_value, i * 2);
+ATF_TEST_CASE_WITHOUT_HEAD(wait__save_stderr);
+ATF_TEST_CASE_BODY(wait__save_stderr)
+{
+    const pid_t control = fork();
+    ATF_REQUIRE(control != -1);
+    if (control == 0)
+        fork_and_wait(123, "Some output\n", "save:my-output.txt");
+    else {
+        int status;
+        ATF_REQUIRE(waitpid(control, &status, 0) != -1);
+        ATF_REQUIRE(WIFEXITED(status));
+        ATF_REQUIRE_EQ(EXIT_SUCCESS, WEXITSTATUS(status));
+
+        ATF_REQUIRE(atf::utils::compare_file("my-output.txt", "Some error\n"));
+    }
 }
 
 // ------------------------------------------------------------------------
@@ -292,16 +444,43 @@ HEADER_TC(include, "atf-c++/utils.hpp");
 
 ATF_INIT_TEST_CASES(tcs)
 {
-    // Add the test for the "auto_array" class.
-    ATF_ADD_TEST_CASE(tcs, auto_array_scope);
-    ATF_ADD_TEST_CASE(tcs, auto_array_copy);
-    ATF_ADD_TEST_CASE(tcs, auto_array_copy_ref);
-    ATF_ADD_TEST_CASE(tcs, auto_array_get);
-    ATF_ADD_TEST_CASE(tcs, auto_array_release);
-    ATF_ADD_TEST_CASE(tcs, auto_array_reset);
-    ATF_ADD_TEST_CASE(tcs, auto_array_assign);
-    ATF_ADD_TEST_CASE(tcs, auto_array_assign_ref);
-    ATF_ADD_TEST_CASE(tcs, auto_array_access);
+    // Add the test for the free functions.
+    ATF_ADD_TEST_CASE(tcs, cat_file__empty);
+    ATF_ADD_TEST_CASE(tcs, cat_file__one_line);
+    ATF_ADD_TEST_CASE(tcs, cat_file__several_lines);
+    ATF_ADD_TEST_CASE(tcs, cat_file__no_newline_eof);
+
+    ATF_ADD_TEST_CASE(tcs, compare_file__empty__match);
+    ATF_ADD_TEST_CASE(tcs, compare_file__empty__not_match);
+    ATF_ADD_TEST_CASE(tcs, compare_file__short__match);
+    ATF_ADD_TEST_CASE(tcs, compare_file__short__not_match);
+    ATF_ADD_TEST_CASE(tcs, compare_file__long__match);
+    ATF_ADD_TEST_CASE(tcs, compare_file__long__not_match);
+
+    ATF_ADD_TEST_CASE(tcs, copy_file__empty);
+    ATF_ADD_TEST_CASE(tcs, copy_file__some_contents);
+
+    ATF_ADD_TEST_CASE(tcs, create_file);
+
+    ATF_ADD_TEST_CASE(tcs, file_exists);
+
+    ATF_ADD_TEST_CASE(tcs, fork);
+
+    ATF_ADD_TEST_CASE(tcs, grep_collection__set);
+    ATF_ADD_TEST_CASE(tcs, grep_collection__vector);
+    ATF_ADD_TEST_CASE(tcs, grep_file);
+    ATF_ADD_TEST_CASE(tcs, grep_string);
+
+    ATF_ADD_TEST_CASE(tcs, redirect__stdout);
+    ATF_ADD_TEST_CASE(tcs, redirect__stderr);
+    ATF_ADD_TEST_CASE(tcs, redirect__other);
+
+    ATF_ADD_TEST_CASE(tcs, wait__ok);
+    ATF_ADD_TEST_CASE(tcs, wait__invalid_exitstatus);
+    ATF_ADD_TEST_CASE(tcs, wait__invalid_stdout);
+    ATF_ADD_TEST_CASE(tcs, wait__invalid_stderr);
+    ATF_ADD_TEST_CASE(tcs, wait__save_stdout);
+    ATF_ADD_TEST_CASE(tcs, wait__save_stderr);
 
     // Add the test cases for the header file.
     ATF_ADD_TEST_CASE(tcs, include);
index b8b0cd08168e558c7bc6ac4158d46541a4d071c7..86606df3f9d2050ca6fb28751b763cdeb58e889b 100644 (file)
@@ -32,5 +32,6 @@
 
 #include <atf-c/error.h>
 #include <atf-c/macros.h>
+#include <atf-c/utils.h>
 
 #endif /* !defined(ATF_C_H) */
index d05d7c2a8d61e278ee67ba089b8bef4c6a5da456..522e6f4c5195702a2ab34248adc00c4b02b2090b 100644 (file)
@@ -10,6 +10,7 @@ tp: check_test
 tp: config_test
 tp: error_test
 tp: macros_test
+tp: pkg_config_test
 tp: tc_test
 tp: tp_test
 tp: utils_test
diff --git a/unit/atf-src/atf-c/Kyuafile b/unit/atf-src/atf-c/Kyuafile
new file mode 100644 (file)
index 0000000..2f3b82e
--- /dev/null
@@ -0,0 +1,16 @@
+syntax("kyuafile", 1)
+
+test_suite("atf")
+
+atf_test_program{name="atf_c_test"}
+atf_test_program{name="build_test"}
+atf_test_program{name="check_test"}
+atf_test_program{name="config_test"}
+atf_test_program{name="error_test"}
+atf_test_program{name="macros_test"}
+atf_test_program{name="pkg_config_test"}
+atf_test_program{name="tc_test"}
+atf_test_program{name="tp_test"}
+atf_test_program{name="utils_test"}
+
+include("detail/Kyuafile")
index f7903f04f7639d6c4d009fb32e8adbd82375751d..b813ec4bc1d49a07b9b2b2764fd62607e8f162a2 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -62,6 +62,7 @@ libatf_c_la_CPPFLAGS = "-DATF_ARCH=\"$(atf_arch)\"" \
                        "-DATF_SHELL=\"$(ATF_SHELL)\"" \
                        "-DATF_WORKDIR=\"$(ATF_WORKDIR)\"" \
                        -I$(srcdir)/atf-c
+libatf_c_la_LDFLAGS = -version-info 0:0:0
 
 # XXX For some reason, the nodist line above does not work as expected.
 # Work this problem around.
@@ -84,21 +85,26 @@ atf_cdir = $(includedir)/atf-c
 
 dist_man_MANS += atf-c/atf-c-api.3
 
+atf_aclocal_DATA += atf-c/atf-common.m4 atf-c/atf-c.m4
+EXTRA_DIST += atf-c/atf-common.m4 atf-c/atf-c.m4
+
 atf_cpkgconfigdir = $(atf_pkgconfigdir)
 atf_cpkgconfig_DATA = atf-c/atf-c.pc
 CLEANFILES += atf-c/atf-c.pc
 EXTRA_DIST += atf-c/atf-c.pc.in
-atf-c/atf-c.pc: $(srcdir)/atf-c/atf-c.pc.in
+atf-c/atf-c.pc: $(srcdir)/atf-c/atf-c.pc.in Makefile
        test -d atf-c || mkdir -p atf-c
-       sed -e 's,__ATF_VERSION__,@PACKAGE_VERSION@,g' \
-           -e 's,__CC__,$(CC),g' \
-           -e 's,__INCLUDEDIR__,$(includedir),g' \
-           -e 's,__LIBDIR__,$(libdir),g' \
+       sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \
+           -e 's#__CC__#$(CC)#g' \
+           -e 's#__INCLUDEDIR__#$(includedir)#g' \
+           -e 's#__LIBDIR__#$(libdir)#g' \
            <$(srcdir)/atf-c/atf-c.pc.in >atf-c/atf-c.pc.tmp
        mv atf-c/atf-c.pc.tmp atf-c/atf-c.pc
 
 tests_atf_c_DATA = atf-c/Atffile \
-                   atf-c/macros_h_test.c
+                   atf-c/Kyuafile \
+                   atf-c/macros_h_test.c \
+                   atf-c/unused_test.c
 tests_atf_cdir = $(pkgtestsdir)/atf-c
 EXTRA_DIST += $(tests_atf_c_DATA)
 
index 987231708ac791d4fd8397e3a0441ac5f9f9cd2f..0ef47a49ccdc6ec96d4ff564f016a95beb2062f2 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" Automated Testing Framework (atf)
 .\"
-.\" Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 1, 2010
+.Dd November 30, 2012
 .Dt ATF-C-API 3
 .Os
 .Sh NAME
+.Nm atf-c-api ,
 .Nm ATF_CHECK ,
 .Nm ATF_CHECK_MSG ,
 .Nm ATF_CHECK_EQ ,
 .Nm ATF_CHECK_EQ_MSG ,
+.Nm ATF_CHECK_MATCH ,
+.Nm ATF_CHECK_MATCH_MSG ,
 .Nm ATF_CHECK_STREQ ,
 .Nm ATF_CHECK_STREQ_MSG ,
 .Nm ATF_CHECK_ERRNO ,
@@ -41,6 +44,8 @@
 .Nm ATF_REQUIRE_MSG ,
 .Nm ATF_REQUIRE_EQ ,
 .Nm ATF_REQUIRE_EQ_MSG ,
+.Nm ATF_REQUIRE_MATCH ,
+.Nm ATF_REQUIRE_MATCH_MSG ,
 .Nm ATF_REQUIRE_STREQ ,
 .Nm ATF_REQUIRE_STREQ_MSG ,
 .Nm ATF_REQUIRE_ERRNO ,
 .Nm ATF_TC_WITHOUT_HEAD ,
 .Nm ATF_TP_ADD_TC ,
 .Nm ATF_TP_ADD_TCS ,
+.Nm atf_tc_get_config_var ,
+.Nm atf_tc_get_config_var_wd ,
+.Nm atf_tc_get_config_var_as_bool ,
+.Nm atf_tc_get_config_var_as_bool_wd ,
+.Nm atf_tc_get_config_var_as_long ,
+.Nm atf_tc_get_config_var_as_long_wd ,
 .Nm atf_no_error ,
 .Nm atf_tc_expect_death ,
 .Nm atf_tc_expect_exit ,
 .Nm atf_tc_fail ,
 .Nm atf_tc_fail_nonfatal ,
 .Nm atf_tc_pass ,
-.Nm atf_tc_skip
+.Nm atf_tc_skip ,
+.Nm atf_utils_cat_file ,
+.Nm atf_utils_compare_file ,
+.Nm atf_utils_copy_file ,
+.Nm atf_utils_create_file ,
+.Nm atf_utils_file_exists ,
+.Nm atf_utils_fork ,
+.Nm atf_utils_free_charpp ,
+.Nm atf_utils_grep_file ,
+.Nm atf_utils_grep_string ,
+.Nm atf_utils_readline ,
+.Nm atf_utils_redirect ,
+.Nm atf_utils_wait
 .Nd C API to write ATF-based test programs
 .Sh SYNOPSIS
 .In atf-c.h
@@ -74,6 +97,8 @@
 .Fn ATF_CHECK_MSG "expression" "fail_msg_fmt" ...
 .Fn ATF_CHECK_EQ "expression_1" "expression_2"
 .Fn ATF_CHECK_EQ_MSG "expression_1" "expression_2" "fail_msg_fmt" ...
+.Fn ATF_CHECK_MATCH "regexp" "string"
+.Fn ATF_CHECK_MATCH_MSG "regexp" "string" "fail_msg_fmt" ...
 .Fn ATF_CHECK_STREQ "string_1" "string_2"
 .Fn ATF_CHECK_STREQ_MSG "string_1" "string_2" "fail_msg_fmt" ...
 .Fn ATF_CHECK_ERRNO "exp_errno" "bool_expression"
 .Fn ATF_REQUIRE_MSG "expression" "fail_msg_fmt" ...
 .Fn ATF_REQUIRE_EQ "expression_1" "expression_2"
 .Fn ATF_REQUIRE_EQ_MSG "expression_1" "expression_2" "fail_msg_fmt" ...
+.Fn ATF_REQUIRE_MATCH "regexp" "string"
+.Fn ATF_REQUIRE_MATCH_MSG "regexp" "string" "fail_msg_fmt" ...
 .Fn ATF_REQUIRE_STREQ "string_1" "string_2"
 .Fn ATF_REQUIRE_STREQ_MSG "string_1" "string_2" "fail_msg_fmt" ...
 .Fn ATF_REQUIRE_ERRNO "exp_errno" "bool_expression"
 .Fn ATF_TC_WITHOUT_HEAD "name"
 .Fn ATF_TP_ADD_TC "tp_name" "tc_name"
 .Fn ATF_TP_ADD_TCS "tp_name"
+.Fn atf_tc_get_config_var "tc" "varname"
+.Fn atf_tc_get_config_var_wd "tc" "variable_name" "default_value"
+.Fn atf_tc_get_config_var_as_bool "tc" "variable_name"
+.Fn atf_tc_get_config_var_as_bool_wd "tc" "variable_name" "default_value"
+.Fn atf_tc_get_config_var_as_long "tc" "variable_name"
+.Fn atf_tc_get_config_var_as_long_wd "tc" "variable_name" "default_value"
 .Fn atf_no_error
 .Fn atf_tc_expect_death "reason" "..."
 .Fn atf_tc_expect_exit "exitcode" "reason" "..."
 .Fn atf_tc_fail_nonfatal "reason"
 .Fn atf_tc_pass
 .Fn atf_tc_skip "reason"
+.Ft void
+.Fo atf_utils_cat_file
+.Fa "const char *file"
+.Fa "const char *prefix"
+.Fc
+.Ft bool
+.Fo atf_utils_compare_file
+.Fa "const char *file"
+.Fa "const char *contents"
+.Fc
+.Ft void
+.Fo atf_utils_copy_file
+.Fa "const char *source"
+.Fa "const char *destination"
+.Fc
+.Ft void
+.Fo atf_utils_create_file
+.Fa "const char *file"
+.Fa "const char *contents"
+.Fa "..."
+.Fc
+.Ft void
+.Fo atf_utils_file_exists
+.Fa "const char *file"
+.Fc
+.Ft pid_t
+.Fo atf_utils_fork
+.Fa "void"
+.Fc
+.Ft void
+.Fo atf_utils_free_charpp
+.Fa "char **argv"
+.Fc
+.Ft bool
+.Fo atf_utils_grep_file
+.Fa "const char *regexp"
+.Fa "const char *file"
+.Fa "..."
+.Fc
+.Ft bool
+.Fo atf_utils_grep_string
+.Fa "const char *regexp"
+.Fa "const char *str"
+.Fa "..."
+.Fc
+.Ft char *
+.Fo atf_utils_readline
+.Fa "int fd"
+.Fc
+.Ft void
+.Fo atf_utils_redirect
+.Fa "const int fd"
+.Fa "const char *file"
+.Fc
+.Ft void
+.Fo atf_utils_wait
+.Fa "const pid_t pid"
+.Fa "const int expected_exit_status"
+.Fa "const char *expected_stdout"
+.Fa "const char *expected_stderr"
+.Fc
 .Sh DESCRIPTION
 The ATF
 .Pp
@@ -248,6 +342,16 @@ and the
 .Ft long
 .Fn atf_tc_get_config_var_as_long_wd
 functions, which can be called in any of the three parts of a test case.
+.Pp
+The
+.Sq _wd
+variants take a default value for the variable which is returned if the
+variable is not defined.
+The other functions without the
+.Sq _wd
+suffix
+.Em require
+the variable to be defined.
 .Ss Access to the source directory
 It is possible to get the path to the test case's source directory from any
 of its three components by querying the
@@ -360,7 +464,7 @@ variant of the macros immediately abort the test case as soon as an error
 condition is detected by calling the
 .Fn atf_tc_fail
 function.
-Use this variant whenever it makes now sense to continue the execution of a
+Use this variant whenever it makes no sense to continue the execution of a
 test case when the checked condition is not met.
 The
 .Sq CHECK
@@ -395,6 +499,16 @@ and
 .Fn ATF_REQUIRE_EQ_MSG
 take two expressions and fail if the two evaluated values are not equal.
 .Pp
+.Fn ATF_CHECK_MATCH ,
+.Fn ATF_CHECK_MATCH_MSG ,
+.Fn ATF_REQUIRE_MATCH
+and
+.Fn ATF_REQUIRE_MATCH_MSG
+take a regular expression and a string and fail if the regular expression does
+not match the given string.
+Note that the regular expression is not anchored, so it will match anywhere in
+the string.
+.Pp
 .Fn ATF_CHECK_STREQ ,
 .Fn ATF_CHECK_STREQ_MSG ,
 .Fn ATF_REQUIRE_STREQ
@@ -411,6 +525,180 @@ variable and, second, a boolean expression that, if evaluates to true,
 means that a call failed and
 .Va errno
 has to be checked against the first value.
+.Ss Utility functions
+The following functions are provided as part of the
+.Nm
+API to simplify the creation of a variety of tests.
+In particular, these are useful to write tests for command-line interfaces.
+.Pp
+.Ft void
+.Fo atf_utils_cat_file
+.Fa "const char *file"
+.Fa "const char *prefix"
+.Fc
+.Bd -offset indent
+Prints the contents of
+.Fa file
+to the standard output, prefixing every line with the string in
+.Fa prefix .
+.Ed
+.Pp
+.Ft bool
+.Fo atf_utils_compare_file
+.Fa "const char *file"
+.Fa "const char *contents"
+.Fc
+.Bd -offset indent
+Returns true if the given
+.Fa file
+matches exactly the expected inlined
+.Fa contents .
+.Ed
+.Pp
+.Ft void
+.Fo atf_utils_copy_file
+.Fa "const char *source"
+.Fa "const char *destination"
+.Fc
+.Bd -offset indent
+Copies the file
+.Fa source
+to
+.Fa destination .
+The permissions of the file are preserved during the code.
+.Ed
+.Pp
+.Ft void
+.Fo atf_utils_create_file
+.Fa "const char *file"
+.Fa "const char *contents"
+.Fa "..."
+.Fc
+.Bd -offset indent
+Creates
+.Fa file
+with the text given in
+.Fa contents ,
+which is a formatting string that uses the rest of the variable arguments.
+.Ed
+.Pp
+.Ft void
+.Fo atf_utils_file_exists
+.Fa "const char *file"
+.Fc
+.Bd -offset indent
+Checks if
+.Fa file
+exists.
+.Ed
+.Pp
+.Ft pid_t
+.Fo atf_utils_fork
+.Fa "void"
+.Fc
+.Bd -offset indent
+Forks a process and redirects the standard output and standard error of the
+child to files for later validation with
+.Fn atf_utils_wait .
+Fails the test case if the fork fails, so this does not return an error.
+.Ed
+.Pp
+.Ft void
+.Fo atf_utils_free_charpp
+.Fa "char **argv"
+.Fc
+.Bd -offset indent
+Frees a dynamically-allocated array of dynamically-allocated strings.
+.Ed
+.Pp
+.Ft bool
+.Fo atf_utils_grep_file
+.Fa "const char *regexp"
+.Fa "const char *file"
+.Fa "..."
+.Fc
+.Bd -offset indent
+Searches for the
+.Fa regexp ,
+which is a formatting string representing the regular expression,
+in the
+.Fa file .
+The variable arguments are used to construct the regular expression.
+.Ed
+.Pp
+.Ft bool
+.Fo atf_utils_grep_string
+.Fa "const char *regexp"
+.Fa "const char *str"
+.Fa "..."
+.Fc
+.Bd -offset indent
+Searches for the
+.Fa regexp ,
+which is a formatting string representing the regular expression,
+in the literal string
+.Fa str .
+The variable arguments are used to construct the regular expression.
+.Ed
+.Pp
+.Ft char *
+.Fo atf_utils_readline
+.Fa "int fd"
+.Fc
+.Bd -offset indent
+Reads a line from the file descriptor
+.Fa fd .
+The line, if any, is returned as a dynamically-allocated buffer that must be
+released with
+.Xr free 3 .
+If there was nothing to read, returns
+.Sq NULL .
+.Ed
+.Pp
+.Ft void
+.Fo atf_utils_redirect
+.Fa "const int fd"
+.Fa "const char *file"
+.Fc
+.Bd -offset indent
+Redirects the given file descriptor
+.Fa fd
+to
+.Fa file .
+This function exits the process in case of an error and does not properly mark
+the test case as failed.
+As a result, it should only be used in subprocesses of the test case; specially
+those spawned by
+.Fn atf_utils_fork .
+.Ed
+.Pp
+.Ft void
+.Fo atf_utils_wait
+.Fa "const pid_t pid"
+.Fa "const int expected_exit_status"
+.Fa "const char *expected_stdout"
+.Fa "const char *expected_stderr"
+.Fc
+.Bd -offset indent
+Waits and validates the result of a subprocess spawned with
+.Fn atf_utils_wait .
+The validation involves checking that the subprocess exited cleanly and returned
+the code specified in
+.Fa expected_exit_status
+and that its standard output and standard error match the strings given in
+.Fa expected_stdout
+and
+.Fa expected_stderr .
+.Pp
+If any of the
+.Fa expected_stdout
+or
+.Fa expected_stderr
+strings are prefixed with
+.Sq save: ,
+then they specify the name of the file into which to store the stdout or stderr
+of the subprocess, and no comparison is performed.
+.Ed
 .Sh EXAMPLES
 The following shows a complete test program with a single test case that
 validates the addition operator:
diff --git a/unit/atf-src/atf-c/atf-c.m4 b/unit/atf-src/atf-c/atf-c.m4
new file mode 100644 (file)
index 0000000..d0237b8
--- /dev/null
@@ -0,0 +1,48 @@
+dnl
+dnl Automated Testing Framework (atf)
+dnl
+dnl Copyright 2011 Google Inc.
+dnl All rights reserved.
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted provided that the following conditions are
+dnl met:
+dnl
+dnl * Redistributions of source code must retain the above copyright
+dnl   notice, this list of conditions and the following disclaimer.
+dnl * Redistributions in binary form must reproduce the above copyright
+dnl   notice, this list of conditions and the following disclaimer in the
+dnl   documentation and/or other materials provided with the distribution.
+dnl * Neither the name of Google Inc. nor the names of its contributors
+dnl   may be used to endorse or promote products derived from this software
+dnl   without specific prior written permission.
+dnl
+dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+dnl OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+dnl
+
+dnl ATF_CHECK_C([version-spec])
+dnl
+dnl Checks if atf-c is present.  If version-spec is provided, ensures that
+dnl the installed version of atf-sh matches the required version.  This
+dnl argument must be something like '>= 0.14' and accepts any version
+dnl specification supported by pkg-config.
+dnl
+dnl Defines and substitutes ATF_C_CFLAGS and ATF_C_LIBS with the compiler
+dnl and linker flags need to build against atf-c.
+AC_DEFUN([ATF_CHECK_C], [
+    spec="atf-c[]m4_default_nblank([ $1], [])"
+    _ATF_CHECK_ARG_WITH(
+        [PKG_CHECK_MODULES([ATF_C], [${spec}],
+                           [found=yes found_atf_c=yes], [found=no])],
+        [required ${spec} not found])
+])
diff --git a/unit/atf-src/atf-c/atf-common.m4 b/unit/atf-src/atf-c/atf-common.m4
new file mode 100644 (file)
index 0000000..464a5a7
--- /dev/null
@@ -0,0 +1,92 @@
+dnl
+dnl Automated Testing Framework (atf)
+dnl
+dnl Copyright 2011 Google Inc.
+dnl All rights reserved.
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted provided that the following conditions are
+dnl met:
+dnl
+dnl * Redistributions of source code must retain the above copyright
+dnl   notice, this list of conditions and the following disclaimer.
+dnl * Redistributions in binary form must reproduce the above copyright
+dnl   notice, this list of conditions and the following disclaimer in the
+dnl   documentation and/or other materials provided with the distribution.
+dnl * Neither the name of Google Inc. nor the names of its contributors
+dnl   may be used to endorse or promote products derived from this software
+dnl   without specific prior written permission.
+dnl
+dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+dnl OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+dnl
+
+dnl ATF_ARG_WITH
+dnl
+dnl Adds a --with-atf flag to the configure script that allows the user to
+dnl enable or disable atf support.
+dnl
+dnl The ATF_CHECK_{C,CXX,SH} macros honor the flag defined herein if
+dnl instantiated.  If not instantiated, they will request the presence of
+dnl the libraries unconditionally.
+dnl
+dnl Defines the WITH_ATF Automake conditional if ATF has been found by any
+dnl of the ATF_CHECK_{C,CXX,SH} macros.
+AC_DEFUN([ATF_ARG_WITH], [
+    m4_define([atf_arg_with_called], [yes])
+
+    m4_divert_text([DEFAULTS], [with_atf=auto])
+    AC_ARG_WITH([atf],
+                [AS_HELP_STRING([--with-atf=<yes|no|auto>],
+                                [build atf-based test programs])],
+                [with_atf=${withval}], [with_atf=auto])
+
+    m4_divert_text([DEFAULTS], [
+        found_atf_c=no
+        found_atf_cxx=no
+        found_atf_sh=no
+    ])
+    AM_CONDITIONAL([WITH_ATF], [test x"${found_atf_c}" = x"yes" -o \
+                                     x"${found_atf_cxx}" = x"yes" -o \
+                                     x"${found_atf_sh}" = x"yes"])
+])
+
+dnl _ATF_CHECK_ARG_WITH(check, error_message)
+dnl
+dnl Internal macro to execute a check conditional on the --with-atf flag
+dnl and handle the result accordingly.
+dnl
+dnl 'check' specifies the piece of code to be run to detect the feature.
+dnl This code must set the 'found' shell variable to yes or no depending
+dnl on the raw result of the check.
+AC_DEFUN([_ATF_CHECK_ARG_WITH], [
+    m4_ifdef([atf_arg_with_called], [
+        m4_fatal([ATF_ARG_WITH must be called after the ATF_CHECK_* checks])
+    ])
+
+    m4_divert_text([DEFAULTS], [with_atf=yes])
+
+    if test x"${with_atf}" = x"no"; then
+        _found=no
+    else
+        $1
+        if test x"${with_atf}" = x"auto"; then
+            _found="${found}"
+        else
+            if test x"${found}" = x"yes"; then
+                _found=yes
+            else
+                AC_MSG_ERROR([$2])
+            fi
+        fi
+    fi
+])
index 81818100d1f75f8d1b91ed253e26f27e50a85847..f44d87fb09c25a2f67ca197fcbefd536e6444f9b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 610063ba1d1714206d152d69dedd471df88fb492..d7a908d3c56adad0236b167e22dcb321eb31cf92 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -306,8 +306,6 @@ atf_check_result_init(atf_check_result_t *r, const char *const *argv,
     if (r->pimpl == NULL)
         return atf_no_memory_error();
 
-    (void) atf_config_get("atf_workdir");
-
     err = array_to_list(argv, &r->pimpl->m_argv);
     if (atf_is_error(err))
         goto out;
index 29f42f9cbc0141c8ca918cce01268907cbe56f46..f36aa3eaef79edbe7ba1e955d835a24bb47576b0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 56fe68241a78b09ab7d23b7b75bb3a88308d6ba1..a26e032e11c51a718ba2e5b6190f419d4f9e779c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -90,14 +90,10 @@ static
 void
 check_line(int fd, const char *exp)
 {
-    atf_dynstr_t line;
-
-    atf_dynstr_init(&line);
-    ATF_CHECK(!read_line(fd, &line));
-    ATF_CHECK_MSG(atf_equal_dynstr_cstring(&line, exp),
-                  "read: '%s', expected: '%s'",
-                  atf_dynstr_cstring(&line), exp);
-    atf_dynstr_fini(&line);
+    char *line = atf_utils_readline(fd);
+    ATF_CHECK(line != NULL);
+    ATF_CHECK_STREQ_MSG(exp, line, "read: '%s', expected: '%s'", line, exp);
+    free(line);
 }
 
 /* ---------------------------------------------------------------------
@@ -246,15 +242,15 @@ ATF_TC_BODY(build_c_o, tc)
 {
     init_and_run_h_tc(&ATF_TC_NAME(h_build_c_o_ok),
              &ATF_TC_PACK_NAME(h_build_c_o_ok), "stdout", "stderr");
-    ATF_CHECK(grep_file("stdout", "-o test.o"));
-    ATF_CHECK(grep_file("stdout", "-c test.c"));
+    ATF_CHECK(atf_utils_grep_file("-o test.o", "stdout"));
+    ATF_CHECK(atf_utils_grep_file("-c test.c", "stdout"));
 
     init_and_run_h_tc(&ATF_TC_NAME(h_build_c_o_fail),
              &ATF_TC_PACK_NAME(h_build_c_o_fail), "stdout", "stderr");
-    ATF_CHECK(grep_file("stdout", "-o test.o"));
-    ATF_CHECK(grep_file("stdout", "-c test.c"));
-    ATF_CHECK(grep_file("stderr", "test.c"));
-    ATF_CHECK(grep_file("stderr", "UNDEFINED_SYMBOL"));
+    ATF_CHECK(atf_utils_grep_file("-o test.o", "stdout"));
+    ATF_CHECK(atf_utils_grep_file("-c test.c", "stdout"));
+    ATF_CHECK(atf_utils_grep_file("test.c", "stderr"));
+    ATF_CHECK(atf_utils_grep_file("UNDEFINED_SYMBOL", "stderr"));
 }
 
 ATF_TC(build_cpp);
@@ -267,16 +263,16 @@ ATF_TC_BODY(build_cpp, tc)
 {
     init_and_run_h_tc(&ATF_TC_NAME(h_build_cpp_ok),
              &ATF_TC_PACK_NAME(h_build_cpp_ok), "stdout", "stderr");
-    ATF_CHECK(grep_file("stdout", "-o.*test.p"));
-    ATF_CHECK(grep_file("stdout", "test.c"));
-    ATF_CHECK(grep_file("test.p", "foo bar"));
+    ATF_CHECK(atf_utils_grep_file("-o.*test.p", "stdout"));
+    ATF_CHECK(atf_utils_grep_file("test.c", "stdout"));
+    ATF_CHECK(atf_utils_grep_file("foo bar", "test.p"));
 
     init_and_run_h_tc(&ATF_TC_NAME(h_build_cpp_fail),
              &ATF_TC_PACK_NAME(h_build_cpp_fail), "stdout", "stderr");
-    ATF_CHECK(grep_file("stdout", "-o test.p"));
-    ATF_CHECK(grep_file("stdout", "test.c"));
-    ATF_CHECK(grep_file("stderr", "test.c"));
-    ATF_CHECK(grep_file("stderr", "non-existent.h"));
+    ATF_CHECK(atf_utils_grep_file("-o test.p", "stdout"));
+    ATF_CHECK(atf_utils_grep_file("test.c", "stdout"));
+    ATF_CHECK(atf_utils_grep_file("test.c", "stderr"));
+    ATF_CHECK(atf_utils_grep_file("non-existent.h", "stderr"));
 }
 
 ATF_TC(build_cxx_o);
@@ -289,15 +285,15 @@ ATF_TC_BODY(build_cxx_o, tc)
 {
     init_and_run_h_tc(&ATF_TC_NAME(h_build_cxx_o_ok),
              &ATF_TC_PACK_NAME(h_build_cxx_o_ok), "stdout", "stderr");
-    ATF_CHECK(grep_file("stdout", "-o test.o"));
-    ATF_CHECK(grep_file("stdout", "-c test.cpp"));
+    ATF_CHECK(atf_utils_grep_file("-o test.o", "stdout"));
+    ATF_CHECK(atf_utils_grep_file("-c test.cpp", "stdout"));
 
     init_and_run_h_tc(&ATF_TC_NAME(h_build_cxx_o_fail),
              &ATF_TC_PACK_NAME(h_build_cxx_o_fail), "stdout", "stderr");
-    ATF_CHECK(grep_file("stdout", "-o test.o"));
-    ATF_CHECK(grep_file("stdout", "-c test.cpp"));
-    ATF_CHECK(grep_file("stderr", "test.cpp"));
-    ATF_CHECK(grep_file("stderr", "UNDEFINED_SYMBOL"));
+    ATF_CHECK(atf_utils_grep_file("-o test.o", "stdout"));
+    ATF_CHECK(atf_utils_grep_file("-c test.cpp", "stdout"));
+    ATF_CHECK(atf_utils_grep_file("test.cpp", "stderr"));
+    ATF_CHECK(atf_utils_grep_file("UNDEFINED_SYMBOL", "stderr"));
 }
 
 ATF_TC(exec_array);
index f90b5ee4f123fae61fb2fe8213913382e119abbb..f1047f05583e1d17a59fd4715da1c5365258a0ea 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 25ea85158a2493048cfc1b1897894ccdc8e3ea8d..a21d68fe58ccc540e1a82f81fbe5b8607bfd9694 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 98ce9da9301d6b6c55294d7ad6620b3787eabd9c..7925107cf83ad5a4d11b8556bca91813be874586 100644 (file)
@@ -30,6 +30,8 @@
 #if !defined(ATF_C_DEFS_H)
 #define ATF_C_DEFS_H
 
+#define ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(a, b) @ATTRIBUTE_FORMAT_PRINTF@
 #define ATF_DEFS_ATTRIBUTE_NORETURN @ATTRIBUTE_NORETURN@
+#define ATF_DEFS_ATTRIBUTE_UNUSED @ATTRIBUTE_UNUSED@
 
 #endif /* !defined(ATF_C_DEFS_H) */
index f715c98cfb742823869c7dc903c348cb6cf217a8..5fd859382c56f6bc932dc98c0885a5719a34d296 100644 (file)
@@ -9,6 +9,5 @@ tp: list_test
 tp: map_test
 tp: process_test
 tp: sanity_test
-tp: test_helpers_test
 tp: text_test
 tp: user_test
diff --git a/unit/atf-src/atf-c/detail/Kyuafile b/unit/atf-src/atf-c/detail/Kyuafile
new file mode 100644 (file)
index 0000000..bb741da
--- /dev/null
@@ -0,0 +1,13 @@
+syntax("kyuafile", 1)
+
+test_suite("atf")
+
+atf_test_program{name="dynstr_test"}
+atf_test_program{name="env_test"}
+atf_test_program{name="fs_test"}
+atf_test_program{name="list_test"}
+atf_test_program{name="map_test"}
+atf_test_program{name="process_test"}
+atf_test_program{name="sanity_test"}
+atf_test_program{name="text_test"}
+atf_test_program{name="user_test"}
index b9ed023556e85928f727793cf8013631e3d6cc1d..20a8dc57c205dcd12dd0eb4d3244edb537f3e050 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,8 @@ libatf_c_la_SOURCES += atf-c/detail/dynstr.c \
                        atf-c/detail/user.c \
                        atf-c/detail/user.h
 
-tests_atf_c_detail_DATA = atf-c/detail/Atffile
+tests_atf_c_detail_DATA = atf-c/detail/Atffile \
+                          atf-c/detail/Kyuafile
 tests_atf_c_detaildir = $(pkgtestsdir)/atf-c/detail
 EXTRA_DIST += $(tests_atf_c_detail_DATA)
 
@@ -68,11 +69,6 @@ tests_atf_c_detail_PROGRAMS += atf-c/detail/fs_test
 atf_c_detail_fs_test_SOURCES = atf-c/detail/fs_test.c
 atf_c_detail_fs_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
 
-tests_atf_c_detail_PROGRAMS += atf-c/detail/test_helpers_test
-atf_c_detail_test_helpers_test_SOURCES = atf-c/detail/test_helpers_test.c
-atf_c_detail_test_helpers_test_LDADD = atf-c/detail/libtest_helpers.la \
-                                       libatf-c.la
-
 tests_atf_c_detail_PROGRAMS += atf-c/detail/list_test
 atf_c_detail_list_test_SOURCES = atf-c/detail/list_test.c
 atf_c_detail_list_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la
index bbdd4ac20cdd16d8850a24bacf8eab958f35360b..e533a811ffc8b3076ad0aac172d8a5989dd52fa5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 981cefbd1b9e05df94894525386877bd004bc80a..c82209a48046f5e907530a9bbba8345fc10497f5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 6aa3e58fb975858a442bf10fc13721a8918d95ab..1b68d38b7722fa64065f10a409042153bb8e7575 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index ac76a6ba8f0d05777d5003ddf7c076b92d1ef4b0..feb4ee53e7631d380810ce35df7db8ba61cdd34a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index cf8642b500c42c54fda413c0650f5b89c9fc686f..6ebf36c8bbefe8e472a1fff587ee761b7e40e7f0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 03cf3f23b17df3958e1da345de3eed9413f1d315..22cbca439b36c7c0fee5fc6224808e5935b97824 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -46,6 +46,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "atf-c/defs.h"
 #include "atf-c/error.h"
 
 #include "fs.h"
@@ -584,7 +585,7 @@ atf_fs_stat_copy(atf_fs_stat_t *dest, const atf_fs_stat_t *src)
 }
 
 void
-atf_fs_stat_fini(atf_fs_stat_t *st)
+atf_fs_stat_fini(atf_fs_stat_t *st ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
index 90707e7d46b9a7ddf1f45aeb598a159ae2c83a3e..ec77c3bb73d4d11fb66fdd353ae544c032374c50 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index cb017cab29220c053a3cb79008b882ee28bfc44b..043304a0c7d3eb9a64906c2a6d90573af1d8d9af 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index fa78abfd4f0ee5d4f380bcef175336d4b4df60fb..0d005ad051816508e76f662927596c1b585a3432 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index c58f55c9bcb8683bcf35feae1b9aaf5cadd5d253..2c0fbcba1eda31dd3f9e61378b5147893f027cd5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 64f6cd67817a232972ef75c1cc99d6855721e4ca..3aa576cae6b3c5618fe959530603666fc50b9d11 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 045abd329ac172382d4110eb82fc92426ed9ed6b..7395adfebd9789b6a6c58595426c03b4bc2417c6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 310a73bdedbb0317903aab87f779ffe95efb93cb..a3ed7a22745ebf2d7cfbe4d1a8b659ca985f7ad9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 31b00085a31097f6a857c307dea5488cd28e35fd..644ab6926c155dbb915b46d034a55587f7383662 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 7c2b7b97edfe44750ab6043f85c75df60be1593d..bc36b570e7d3f037d37a01ff1ae1e9b35ccabb75 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -197,7 +197,7 @@ atf_process_status_init(atf_process_status_t *s, int status)
 }
 
 void
-atf_process_status_fini(atf_process_status_t *s)
+atf_process_status_fini(atf_process_status_t *s ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
@@ -592,6 +592,7 @@ list_to_array(const atf_list_t *l, const char ***ap)
 struct exec_args {
     const atf_fs_path_t *m_prog;
     const char *const *m_argv;
+    void (*m_prehook)(void);
 };
 
 static
@@ -600,6 +601,9 @@ do_exec(void *v)
 {
     struct exec_args *ea = v;
 
+    if (ea->m_prehook != NULL)
+        ea->m_prehook();
+
     const int ret = const_execvp(atf_fs_path_cstring(ea->m_prog), ea->m_argv);
     const int errnocopy = errno;
     INV(ret == -1);
@@ -613,11 +617,12 @@ atf_process_exec_array(atf_process_status_t *s,
                        const atf_fs_path_t *prog,
                        const char *const *argv,
                        const atf_process_stream_t *outsb,
-                       const atf_process_stream_t *errsb)
+                       const atf_process_stream_t *errsb,
+                       void (*prehook)(void))
 {
     atf_error_t err;
     atf_process_child_t c;
-    struct exec_args ea = { prog, argv };
+    struct exec_args ea = { prog, argv, prehook };
 
     PRE(outsb == NULL ||
         atf_process_stream_type(outsb) != atf_process_stream_type_capture);
@@ -645,7 +650,8 @@ atf_process_exec_list(atf_process_status_t *s,
                       const atf_fs_path_t *prog,
                       const atf_list_t *argv,
                       const atf_process_stream_t *outsb,
-                      const atf_process_stream_t *errsb)
+                      const atf_process_stream_t *errsb,
+                      void (*prehook)(void))
 {
     atf_error_t err;
     const char **argv2;
@@ -660,7 +666,7 @@ atf_process_exec_list(atf_process_status_t *s,
     if (atf_is_error(err))
         goto out;
 
-    err = atf_process_exec_array(s, prog, argv2, outsb, errsb);
+    err = atf_process_exec_array(s, prog, argv2, outsb, errsb, prehook);
 
     free(argv2);
 out:
index afab2a97c3460f1755214a0f4d56dd5d67b8beae..b4aad3d93a184c76b89415f410c394b61108f3b6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -124,11 +124,13 @@ atf_error_t atf_process_exec_array(atf_process_status_t *,
                                    const atf_fs_path_t *,
                                    const char *const *,
                                    const atf_process_stream_t *,
-                                   const atf_process_stream_t *);
+                                   const atf_process_stream_t *,
+                                   void (*)(void));
 atf_error_t atf_process_exec_list(atf_process_status_t *,
                                   const atf_fs_path_t *,
                                   const atf_list_t *,
                                   const atf_process_stream_t *,
-                                  const atf_process_stream_t *);
+                                  const atf_process_stream_t *,
+                                  void (*)(void));
 
 #endif /* !defined(ATF_C_PROCESS_H) */
index df87d0d579a21a69c6c1c6622e1669936d861cc4..61f1b67c980e3498b5a6b7a3e89beb29f8b26f41 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index b76500d9350a0ad28dff8c6767523ac6b75b0ae2..9e55f70e321498a281c6affc3e482b7c6ce5cb42 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -28,8 +28,8 @@
  */
 
 #include <sys/types.h>
-#include <sys/resource.h>
 #include <sys/time.h>
+#include <sys/resource.h>
 #include <sys/wait.h>
 
 #include <errno.h>
@@ -95,12 +95,12 @@ check_file(const enum out_type type)
 {
     switch (type) {
     case stdout_type:
-        ATF_CHECK(grep_file("stdout", "stdout: msg"));
-        ATF_CHECK(!grep_file("stdout", "stderr: msg"));
+        ATF_CHECK(atf_utils_grep_file("stdout: msg", "stdout"));
+        ATF_CHECK(!atf_utils_grep_file("stderr: msg", "stdout"));
         break;
     case stderr_type:
-        ATF_CHECK(grep_file("stderr", "stderr: msg"));
-        ATF_CHECK(!grep_file("stderr", "stdout: msg"));
+        ATF_CHECK(atf_utils_grep_file("stderr: msg", "stderr"));
+        ATF_CHECK(!atf_utils_grep_file("stdout: msg", "stderr"));
         break;
     default:
         UNREACHABLE;
@@ -110,7 +110,7 @@ check_file(const enum out_type type)
 struct capture_stream {
     struct base_stream m_base;
 
-    atf_dynstr_t m_msg;
+    char *m_msg;
 };
 #define CAPTURE_STREAM(type) \
     { .m_base = BASE_STREAM(capture_stream_init, \
@@ -126,7 +126,7 @@ capture_stream_init(void *v)
 
     s->m_base.m_sb_ptr = &s->m_base.m_sb;
     RE(atf_process_stream_init_capture(&s->m_base.m_sb));
-    RE(atf_dynstr_init(&s->m_msg));
+    s->m_msg = NULL;
 }
 
 static
@@ -137,10 +137,10 @@ capture_stream_process(void *v, atf_process_child_t *c)
 
     switch (s->m_base.m_type) {
     case stdout_type:
-        (void) read_line(atf_process_child_stdout(c), &s->m_msg);
+        s->m_msg = atf_utils_readline(atf_process_child_stdout(c));
         break;
     case stderr_type:
-        (void) read_line(atf_process_child_stderr(c), &s->m_msg);
+        s->m_msg = atf_utils_readline(atf_process_child_stderr(c));
         break;
     default:
         UNREACHABLE;
@@ -155,18 +155,18 @@ capture_stream_fini(void *v)
 
     switch (s->m_base.m_type) {
     case stdout_type:
-        ATF_CHECK(grep_string(&s->m_msg, "stdout: msg"));
-        ATF_CHECK(!grep_string(&s->m_msg, "stderr: msg"));
+        ATF_CHECK(atf_utils_grep_string("stdout: msg", s->m_msg));
+        ATF_CHECK(!atf_utils_grep_string("stderr: msg", s->m_msg));
         break;
     case stderr_type:
-        ATF_CHECK(!grep_string(&s->m_msg, "stdout: msg"));
-        ATF_CHECK(grep_string(&s->m_msg, "stderr: msg"));
+        ATF_CHECK(!atf_utils_grep_string("stdout: msg", s->m_msg));
+        ATF_CHECK(atf_utils_grep_string("stderr: msg", s->m_msg));
         break;
     default:
         UNREACHABLE;
     }
 
-    atf_dynstr_fini(&s->m_msg);
+    free(s->m_msg);
     atf_process_stream_fini(&s->m_base.m_sb);
 }
 
@@ -689,7 +689,7 @@ static void child_report_pid(void *) ATF_DEFS_ATTRIBUTE_NORETURN;
 
 static
 void
-child_report_pid(void *v)
+child_report_pid(void *v ATF_DEFS_ATTRIBUTE_UNUSED)
 {
     const pid_t pid = getpid();
     if (write(STDOUT_FILENO, &pid, sizeof(pid)) != sizeof(pid))
@@ -730,7 +730,7 @@ ATF_TC_BODY(child_pid, tc)
 
 static
 void
-child_loop(void *v)
+child_loop(void *v ATF_DEFS_ATTRIBUTE_UNUSED)
 {
     for (;;)
         sleep(1);
@@ -738,13 +738,13 @@ child_loop(void *v)
 
 static
 void
-nop_signal(int sig)
+nop_signal(int sig ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
 static
 void
-child_spawn_loop_and_wait_eintr(void *v)
+child_spawn_loop_and_wait_eintr(void *v ATF_DEFS_ATTRIBUTE_UNUSED)
 {
     atf_process_child_t child;
     atf_process_status_t status;
@@ -860,7 +860,8 @@ ATF_TC_BODY(child_wait_eintr, tc)
 
 static
 void
-do_exec(const atf_tc_t *tc, const char *helper_name, atf_process_status_t *s)
+do_exec(const atf_tc_t *tc, const char *helper_name, atf_process_status_t *s,
+        void (*prehook)(void))
 {
     atf_fs_path_t process_helpers;
     const char *argv[3];
@@ -872,7 +873,7 @@ do_exec(const atf_tc_t *tc, const char *helper_name, atf_process_status_t *s)
     argv[2] = NULL;
     printf("Executing %s %s\n", argv[0], argv[1]);
 
-    RE(atf_process_exec_array(s, &process_helpers, argv, NULL, NULL));
+    RE(atf_process_exec_array(s, &process_helpers, argv, NULL, NULL, prehook));
     atf_fs_path_fini(&process_helpers);
 }
 
@@ -880,16 +881,10 @@ static
 void
 check_line(int fd, const char *exp)
 {
-    atf_dynstr_t line;
-    bool eof;
-
-    atf_dynstr_init(&line);
-    eof = read_line(fd, &line);
-    ATF_CHECK(!eof);
-    ATF_CHECK_MSG(atf_equal_dynstr_cstring(&line, exp),
-                  "read: '%s', expected: '%s'",
-                  atf_dynstr_cstring(&line), exp);
-    atf_dynstr_fini(&line);
+    char *line = atf_utils_readline(fd);
+    ATF_CHECK(line != NULL);
+    ATF_CHECK_STREQ_MSG(exp, line, "read: '%s', expected: '%s'", line, exp);
+    free(line);
 }
 
 ATF_TC(exec_failure);
@@ -901,7 +896,7 @@ ATF_TC_BODY(exec_failure, tc)
 {
     atf_process_status_t status;
 
-    do_exec(tc, "exit-failure", &status);
+    do_exec(tc, "exit-failure", &status, NULL);
     ATF_CHECK(atf_process_status_exited(&status));
     ATF_CHECK_EQ(atf_process_status_exitstatus(&status), EXIT_FAILURE);
     atf_process_status_fini(&status);
@@ -931,7 +926,7 @@ ATF_TC_BODY(exec_list, tc)
         RE(atf_fs_path_init_fmt(&outpath, "stdout"));
         RE(atf_process_stream_init_redirect_path(&outsb, &outpath));
         RE(atf_process_exec_list(&status, &process_helpers, &argv, &outsb,
-                                 NULL));
+                                 NULL, NULL));
         atf_process_stream_fini(&outsb);
         atf_fs_path_fini(&outpath);
     }
@@ -951,6 +946,27 @@ ATF_TC_BODY(exec_list, tc)
     atf_fs_path_fini(&process_helpers);
 }
 
+static void
+exit_early(void)
+{
+    exit(80);
+}
+
+ATF_TC(exec_prehook);
+ATF_TC_HEAD(exec_prehook, tc)
+{
+    atf_tc_set_md_var(tc, "descr", "Tests execing a command with a prehook");
+}
+ATF_TC_BODY(exec_prehook, tc)
+{
+    atf_process_status_t status;
+
+    do_exec(tc, "exit-success", &status, exit_early);
+    ATF_CHECK(atf_process_status_exited(&status));
+    ATF_CHECK_EQ(atf_process_status_exitstatus(&status), 80);
+    atf_process_status_fini(&status);
+}
+
 ATF_TC(exec_success);
 ATF_TC_HEAD(exec_success, tc)
 {
@@ -960,7 +976,7 @@ ATF_TC_BODY(exec_success, tc)
 {
     atf_process_status_t status;
 
-    do_exec(tc, "exit-success", &status);
+    do_exec(tc, "exit-success", &status, NULL);
     ATF_CHECK(atf_process_status_exited(&status));
     ATF_CHECK_EQ(atf_process_status_exitstatus(&status), EXIT_SUCCESS);
     atf_process_status_fini(&status);
@@ -1103,6 +1119,7 @@ ATF_TP_ADD_TCS(tp)
     /* Add the tests for the free functions. */
     ATF_TP_ADD_TC(tp, exec_failure);
     ATF_TP_ADD_TC(tp, exec_list);
+    ATF_TP_ADD_TC(tp, exec_prehook);
     ATF_TP_ADD_TC(tp, exec_success);
     ATF_TP_ADD_TC(tp, fork_cookie);
     ATF_TP_ADD_TC(tp, fork_out_capture_err_capture);
index d99f96f3be3163cca94bfacc59a3f47f9f612aeb..7c8285b5193c1d73826740875cbb092da3bde880 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 
 enum type { inv, pre, post, unreachable };
 
-static
-bool
-grep(const atf_dynstr_t *line, const char *text)
-{
-    const char *l = atf_dynstr_cstring(line);
-    bool found;
-
-    found = false;
-
-    if (strstr(l, text) != NULL)
-        found = true;
-
-    return found;
-}
-
 struct test_data {
     enum type m_type;
     bool m_cond;
@@ -109,9 +94,8 @@ do_test(enum type t, bool cond)
 {
     atf_process_child_t child;
     atf_process_status_t status;
-    bool eof;
     int nlines;
-    atf_dynstr_t lines[3];
+    char *lines[3];
 
     {
         atf_process_stream_t outsb, errsb;
@@ -125,13 +109,9 @@ do_test(enum type t, bool cond)
     }
 
     nlines = 0;
-    eof = false;
-    do {
-        RE(atf_dynstr_init(&lines[nlines]));
-        if (!eof)
-            eof = read_line(atf_process_child_stderr(&child), &lines[nlines]);
+    while (nlines < 3 && (lines[nlines] =
+           atf_utils_readline(atf_process_child_stderr(&child))) != NULL)
         nlines++;
-    } while (nlines < 3);
     ATF_REQUIRE(nlines == 0 || nlines == 3);
 
     RE(atf_process_child_wait(&child, &status));
@@ -147,29 +127,29 @@ do_test(enum type t, bool cond)
     if (!cond) {
         switch (t) {
         case inv:
-            ATF_REQUIRE(grep(&lines[0], "Invariant"));
+            ATF_REQUIRE(atf_utils_grep_string("Invariant", lines[0]));
             break;
 
         case pre:
-            ATF_REQUIRE(grep(&lines[0], "Precondition"));
+            ATF_REQUIRE(atf_utils_grep_string("Precondition", lines[0]));
             break;
 
         case post:
-            ATF_REQUIRE(grep(&lines[0], "Postcondition"));
+            ATF_REQUIRE(atf_utils_grep_string("Postcondition", lines[0]));
             break;
 
         case unreachable:
-            ATF_REQUIRE(grep(&lines[0], "Invariant"));
+            ATF_REQUIRE(atf_utils_grep_string("Invariant", lines[0]));
             break;
         }
 
-        ATF_REQUIRE(grep(&lines[0], __FILE__));
-        ATF_REQUIRE(grep(&lines[2], PACKAGE_BUGREPORT));
+        ATF_REQUIRE(atf_utils_grep_string(__FILE__, lines[0]));
+        ATF_REQUIRE(atf_utils_grep_string(PACKAGE_BUGREPORT, lines[2]));
     }
 
     while (nlines > 0) {
         nlines--;
-        atf_dynstr_fini(&lines[nlines]);
+        free(lines[nlines]);
     }
 }
 
index e6c4eea6eb3018579e8be061e236496b851753ac..aa64c12de40546f71a52669cab193a07f7948579 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -30,7 +30,6 @@
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <regex.h>
 #include <unistd.h>
 
 #include "atf-c/build.h"
 
 static
 void
-build_check_c_o_aux(const char *path, const char *failmsg)
+build_check_c_o_aux(const char *path, const char *failmsg,
+                    const bool expect_pass)
 {
     bool success;
     atf_dynstr_t iflag;
-    const char *optargs[2];
+    const char *optargs[4];
 
     RE(atf_dynstr_init_fmt(&iflag, "-I%s", atf_config_get("atf_includedir")));
 
     optargs[0] = atf_dynstr_cstring(&iflag);
-    optargs[1] = NULL;
+    optargs[1] = "-Wall";
+    optargs[2] = "-Werror";
+    optargs[3] = NULL;
 
     RE(atf_check_build_c_o(path, "test.o", optargs, &success));
 
     atf_dynstr_fini(&iflag);
 
-    if (!success)
-        atf_tc_fail(failmsg);
+    if ((expect_pass && !success) || (!expect_pass && success))
+        atf_tc_fail("%s", failmsg);
 }
 
 void
-build_check_c_o(const atf_tc_t *tc, const char *sfile, const char *failmsg)
+build_check_c_o(const atf_tc_t *tc, const char *sfile, const char *failmsg,
+                const bool expect_pass)
 {
     atf_fs_path_t path;
 
     RE(atf_fs_path_init_fmt(&path, "%s/%s",
                             atf_tc_get_config_var(tc, "srcdir"), sfile));
-    build_check_c_o_aux(atf_fs_path_cstring(&path), failmsg);
+    build_check_c_o_aux(atf_fs_path_cstring(&path), failmsg, expect_pass);
     atf_fs_path_fini(&path);
 }
 
 void
-header_check(const atf_tc_t *tc, const char *hdrname)
+header_check(const char *hdrname)
 {
     FILE *srcfile;
     char failmsg[128];
@@ -90,7 +93,7 @@ header_check(const atf_tc_t *tc, const char *hdrname)
     snprintf(failmsg, sizeof(failmsg),
              "Header check failed; %s is not self-contained", hdrname);
 
-    build_check_c_o_aux("test.c", failmsg);
+    build_check_c_o_aux("test.c", failmsg, true);
 }
 
 void
@@ -102,72 +105,6 @@ get_process_helpers_path(const atf_tc_t *tc, const bool is_detail,
                             is_detail ? "" : "detail/"));
 }
 
-bool
-grep_string(const atf_dynstr_t *str, const char *regex)
-{
-    int res;
-    regex_t preg;
-
-    printf("Looking for '%s' in '%s'\n", regex, atf_dynstr_cstring(str));
-    ATF_REQUIRE(regcomp(&preg, regex, REG_EXTENDED) == 0);
-
-    res = regexec(&preg, atf_dynstr_cstring(str), 0, NULL, 0);
-    ATF_REQUIRE(res == 0 || res == REG_NOMATCH);
-
-    regfree(&preg);
-
-    return res == 0;
-}
-
-bool
-grep_file(const char *file, const char *regex, ...)
-{
-    bool done, found;
-    int fd;
-    va_list ap;
-    atf_dynstr_t formatted;
-
-    va_start(ap, regex);
-    RE(atf_dynstr_init_ap(&formatted, regex, ap));
-    va_end(ap);
-
-    done = false;
-    found = false;
-    ATF_REQUIRE((fd = open(file, O_RDONLY)) != -1);
-    do {
-        atf_dynstr_t line;
-
-        RE(atf_dynstr_init(&line));
-
-        done = read_line(fd, &line);
-        if (!done)
-            found = grep_string(&line, atf_dynstr_cstring(&formatted));
-
-        atf_dynstr_fini(&line);
-    } while (!found && !done);
-    close(fd);
-
-    atf_dynstr_fini(&formatted);
-
-    return found;
-}
-
-bool
-read_line(int fd, atf_dynstr_t *dest)
-{
-    char ch;
-    ssize_t cnt;
-
-    while ((cnt = read(fd, &ch, sizeof(ch))) == sizeof(ch) &&
-           ch != '\n') {
-        const atf_error_t err = atf_dynstr_append_fmt(dest, "%c", ch);
-        ATF_REQUIRE(!atf_is_error(err));
-    }
-    ATF_REQUIRE(cnt != -1);
-
-    return cnt == 0;
-}
-
 struct run_h_tc_data {
     atf_tc_t *m_tc;
     const char *m_resname;
index 384a053b0eb702f682275a07373e1ae988951253..5df034fb42ad9d0bc6fe8419a6aaa27aff136107 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,7 @@ struct atf_fs_path;
     } \
     ATF_TC_BODY(name, tc) \
     { \
-        header_check(tc, hdrname); \
+        header_check(hdrname); \
     }
 
 #define BUILD_TC(name, sfile, descr, failmsg) \
@@ -63,14 +63,23 @@ struct atf_fs_path;
     } \
     ATF_TC_BODY(name, tc) \
     { \
-        build_check_c_o(tc, sfile, failmsg); \
+        build_check_c_o(tc, sfile, failmsg, true);   \
     }
 
-void build_check_c_o(const atf_tc_t *, const char *, const char *);
-void header_check(const atf_tc_t *, const char *);
+#define BUILD_TC_FAIL(name, sfile, descr, failmsg) \
+    ATF_TC(name); \
+    ATF_TC_HEAD(name, tc) \
+    { \
+        atf_tc_set_md_var(tc, "descr", descr); \
+    } \
+    ATF_TC_BODY(name, tc) \
+    { \
+        build_check_c_o(tc, sfile, failmsg, false);   \
+    }
+
+void build_check_c_o(const atf_tc_t *, const char *, const char *, const bool);
+void header_check(const char *);
 void get_process_helpers_path(const atf_tc_t *, const bool,
                               struct atf_fs_path *);
-bool grep_string(const struct atf_dynstr *, const char *);
-bool grep_file(const char *, const char *, ...);
 bool read_line(int, struct atf_dynstr *);
 void run_h_tc(atf_tc_t *, const char *, const char *, const char *);
diff --git a/unit/atf-src/atf-c/detail/test_helpers_test.c b/unit/atf-src/atf-c/detail/test_helpers_test.c
deleted file mode 100644 (file)
index c0f9b51..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2009, 2010 The NetBSD Foundation, 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:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
- */
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include <atf-c.h>
-
-#include "dynstr.h"
-#include "test_helpers.h"
-
-/* ---------------------------------------------------------------------
- * Test cases for the free functions.
- * --------------------------------------------------------------------- */
-
-/* TODO: Add checks for build_check_c_o and the macros defined in the
- * header file. */
-
-ATF_TC(grep_string);
-ATF_TC_HEAD(grep_string, tc)
-{
-    atf_tc_set_md_var(tc, "descr", "Tests the grep_string helper "
-                      "function");
-}
-ATF_TC_BODY(grep_string, tc)
-{
-    atf_dynstr_t str;
-
-    atf_dynstr_init_fmt(&str, "a string - aaaabbbb");
-    ATF_CHECK(grep_string(&str, "a string"));
-    ATF_CHECK(grep_string(&str, "^a string"));
-    ATF_CHECK(grep_string(&str, "aaaabbbb$"));
-    ATF_CHECK(grep_string(&str, "aa.*bb"));
-    ATF_CHECK(!grep_string(&str, "foo"));
-    ATF_CHECK(!grep_string(&str, "bar"));
-    ATF_CHECK(!grep_string(&str, "aaaaa"));
-
-    atf_dynstr_fini(&str);
-}
-
-
-ATF_TC(grep_file);
-ATF_TC_HEAD(grep_file, tc)
-{
-    atf_tc_set_md_var(tc, "descr", "Tests the grep_file helper function");
-}
-ATF_TC_BODY(grep_file, tc)
-{
-    FILE *f;
-
-    f = fopen("test.txt", "w");
-    ATF_CHECK(f != NULL);
-    fprintf(f, "line1\n");
-    fprintf(f, "the second line\n");
-    fprintf(f, "aaaabbbb\n");
-    fclose(f);
-
-    ATF_CHECK(grep_file("test.txt", "line1"));
-    ATF_CHECK(grep_file("test.txt", "line%d", 1));
-    ATF_CHECK(grep_file("test.txt", "second line"));
-    ATF_CHECK(grep_file("test.txt", "aa.*bb"));
-    ATF_CHECK(!grep_file("test.txt", "foo"));
-    ATF_CHECK(!grep_file("test.txt", "bar"));
-    ATF_CHECK(!grep_file("test.txt", "aaaaa"));
-}
-
-ATF_TC(read_line);
-ATF_TC_HEAD(read_line, tc)
-{
-    atf_tc_set_md_var(tc, "descr", "Tests the read_line function");
-}
-ATF_TC_BODY(read_line, tc)
-{
-    const char *l1 = "First line with % formatting % characters %";
-    const char *l2 = "Second line; much longer than the first one";
-    const char *l3 = "Last line, without terminator";
-
-    {
-        FILE *f;
-
-        f = fopen("test", "w");
-        ATF_REQUIRE(f != NULL);
-        fclose(f);
-    }
-
-    {
-        int fd;
-        atf_dynstr_t dest;
-        bool eof;
-
-        fd = open("test", O_RDONLY);
-        ATF_REQUIRE(fd != -1);
-
-        RE(atf_dynstr_init(&dest));
-        eof = read_line(fd, &dest);
-        ATF_REQUIRE(eof);
-        atf_dynstr_fini(&dest);
-    }
-
-    {
-        FILE *f;
-
-        f = fopen("test", "w");
-        ATF_REQUIRE(f != NULL);
-
-        fprintf(f, "%s\n", l1);
-        fprintf(f, "%s\n", l2);
-        fprintf(f, "%s", l3);
-
-        fclose(f);
-    }
-
-    {
-        int fd;
-        atf_dynstr_t dest;
-        bool eof;
-
-        fd = open("test", O_RDONLY);
-        ATF_REQUIRE(fd != -1);
-
-        RE(atf_dynstr_init(&dest));
-        eof = read_line(fd, &dest);
-        ATF_REQUIRE(!eof);
-        printf("1st line: >%s<\n", atf_dynstr_cstring(&dest));
-        ATF_REQUIRE(atf_equal_dynstr_cstring(&dest, l1));
-        atf_dynstr_fini(&dest);
-
-        RE(atf_dynstr_init(&dest));
-        eof = read_line(fd, &dest);
-        ATF_REQUIRE(!eof);
-        printf("2nd line: >%s<\n", atf_dynstr_cstring(&dest));
-        ATF_REQUIRE(atf_equal_dynstr_cstring(&dest, l2));
-        atf_dynstr_fini(&dest);
-
-        RE(atf_dynstr_init(&dest));
-        eof = read_line(fd, &dest);
-        ATF_REQUIRE(eof);
-        printf("3rd line: >%s<\n", atf_dynstr_cstring(&dest));
-        ATF_REQUIRE(atf_equal_dynstr_cstring(&dest, l3));
-        atf_dynstr_fini(&dest);
-
-        close(fd);
-    }
-}
-
-/* ---------------------------------------------------------------------
- * Main.
- * --------------------------------------------------------------------- */
-
-ATF_TP_ADD_TCS(tp)
-{
-    /* Add the tests for the free functions. */
-    ATF_TP_ADD_TC(tp, grep_string);
-    ATF_TP_ADD_TC(tp, grep_file);
-    ATF_TP_ADD_TC(tp, read_line);
-
-    return atf_no_error();
-}
index 9e3a0753bd7adfb9cab02a9293d46ecc938c1d9f..d91e8d1dcf7e7f1319d7bb194751c1240076d915 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 8f67eed9c9040fcc37a9ee2a037f5febf4de769a..8f8ddf4ccbef265d5a4bf456b4f13e3d01757e9f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 6392c2a56683de13a0691fff466dc2b81036a9ca..7bdf9c83129b8b062ad7da56b01c82f46f6e5369 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -97,7 +97,7 @@ word_acum(const char *word, void *data)
 
 static
 atf_error_t
-word_count(const char *word, void *data)
+word_count(const char *word ATF_DEFS_ATTRIBUTE_UNUSED, void *data)
 {
     size_t *counter = data;
 
@@ -113,7 +113,7 @@ struct fail_at {
 
 static
 atf_error_t
-word_fail_at(const char *word, void *data)
+word_fail_at(const char *word ATF_DEFS_ATTRIBUTE_UNUSED, void *data)
 {
     struct fail_at *fa = data;
     atf_error_t err;
index bb97a73ee5c8de977bd86f9b9622f2884f22a7e4..a62ae0ad615bc79691e7b0ae570bcb17ea3aa3ef 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -44,6 +44,7 @@
 #include "atf-c/utils.h"
 
 #include "dynstr.h"
+#include "env.h"
 #include "fs.h"
 #include "map.h"
 #include "sanity.h"
@@ -127,6 +128,13 @@ print_error(const atf_error_t err)
                 progname);
 }
 
+static
+void
+print_warning(const char *message)
+{
+    fprintf(stderr, "%s: WARNING: %s\n", progname, message);
+}
+
 /* ---------------------------------------------------------------------
  * Options handling.
  * --------------------------------------------------------------------- */
@@ -322,11 +330,13 @@ process_params(int argc, char **argv, struct params *p)
 {
     atf_error_t err;
     int ch;
+    int old_opterr;
 
     err = params_init(p, argv[0]);
     if (atf_is_error(err))
         goto out;
 
+    old_opterr = opterr;
     opterr = 0;
     while (!atf_is_error(err) &&
            (ch = getopt(argc, argv, GETOPT_POSIX ":lr:s:v:")) != -1) {
@@ -360,6 +370,7 @@ process_params(int argc, char **argv, struct params *p)
     argv += optind;
 
     /* Clear getopt state just in case the test wants to use it. */
+    opterr = old_opterr;
     optind = 1;
 #if defined(HAVE_OPTRESET)
     optreset = 1;
@@ -485,6 +496,14 @@ run_tc(const atf_tp_t *tp, struct params *p, int *exitcode)
         goto out;
     }
 
+    if (!atf_env_has("__RUNNING_INSIDE_ATF_RUN") || strcmp(atf_env_get(
+        "__RUNNING_INSIDE_ATF_RUN"), "internal-yes-value") != 0)
+    {
+        print_warning("Running test cases without atf-run(1) is unsupported");
+        print_warning("No isolation nor timeout control is being applied; you "
+                      "may get unexpected failures; see atf-test-case(4)");
+    }
+
     switch (p->m_tcpart) {
     case BODY:
         err = atf_tp_run(tp, p->m_tcname, atf_fs_path_cstring(&p->m_resfile));
index 37a7ffb1e5bb5d248445287ac2f88d62020227d7..5a89bf42b22acda75b1ebc5953d2b060c99b3f26 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index dea7d26f3d37bf5837568ae5060ed0bc64ad1ae2..d682bcfb435571f057d4c6169c5e2c7950a6f9d6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index b699607b3a3e57ae9f4c8c1ad469f09969887529..0bf37e7e3eb728eada83bbbd7c56d2d926536308 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -64,6 +64,7 @@ ATF_TC_BODY(is_member_of_group, tc)
     gid_t gids[NGROUPS_MAX];
     gid_t g, maxgid;
     int ngids;
+    const gid_t maxgid_limit = 1 << 16;
 
     {
         int i;
@@ -73,11 +74,18 @@ ATF_TC_BODY(is_member_of_group, tc)
             atf_tc_fail("Call to getgroups failed");
         maxgid = 0;
         for (i = 0; i < ngids; i++) {
+            printf("User group %d is %u\n", i, gids[i]);
             if (maxgid < gids[i])
                 maxgid = gids[i];
         }
         printf("User belongs to %d groups\n", ngids);
-        printf("Last GID is %d\n", maxgid);
+        printf("Last GID is %u\n", maxgid);
+    }
+
+    if (maxgid > maxgid_limit) {
+        printf("Test truncated from %u groups to %u to keep the run time "
+               "reasonable enough\n", maxgid, maxgid_limit);
+        maxgid = maxgid_limit;
     }
 
     for (g = 0; g < maxgid; g++) {
index b1fe23073eb5102d8659aee02197118d083f8fba..aeb55a8ba47bf21022a6aa6e2d20fe1129f54832 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 2d818c3c91c7a1ab3fe88d81b6b18f5392930149..a8502801b063103e529279a63d02b5d15393f37d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index 6136d592d78223fcef407c01f2577a4b3fd25686..2c2a30789b2c92e022a03ae951f639ca90f4a9fa 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -34,6 +34,7 @@
 
 #include <atf-c.h>
 
+#include "atf-c/defs.h"
 #include "atf-c/error.h"
 
 #include "detail/test_helpers.h"
@@ -44,7 +45,8 @@
 
 static
 void
-test_format(const atf_error_t err, char *buf, size_t buflen)
+test_format(const atf_error_t err ATF_DEFS_ATTRIBUTE_UNUSED,
+            char *buf, size_t buflen)
 {
     snprintf(buf, buflen, "Test formatting function");
 }
index f545414644904547a99cbab72c15e75b90aa65e4..7c33ccbc1e1004d2f305751485f258682bde9588 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 #if !defined(ATF_C_MACROS_H)
 #define ATF_C_MACROS_H
 
+#include <string.h>
+
+#include <atf-c/defs.h>
+#include <atf-c/error.h>
 #include <atf-c/tc.h>
 #include <atf-c/tp.h>
 #include <atf-c/utils.h>
@@ -76,7 +80,7 @@
 #define ATF_TC_HEAD(tc, tcptr) \
     static \
     void \
-    atfu_ ## tc ## _head(atf_tc_t *tcptr)
+    atfu_ ## tc ## _head(atf_tc_t *tcptr ATF_DEFS_ATTRIBUTE_UNUSED)
 
 #define ATF_TC_HEAD_NAME(tc) \
     (atfu_ ## tc ## _head)
@@ -84,7 +88,7 @@
 #define ATF_TC_BODY(tc, tcptr) \
     static \
     void \
-    atfu_ ## tc ## _body(const atf_tc_t *tcptr)
+    atfu_ ## tc ## _body(const atf_tc_t *tcptr ATF_DEFS_ATTRIBUTE_UNUSED)
 
 #define ATF_TC_BODY_NAME(tc) \
     (atfu_ ## tc ## _body)
@@ -92,7 +96,7 @@
 #define ATF_TC_CLEANUP(tc, tcptr) \
     static \
     void \
-    atfu_ ## tc ## _cleanup(const atf_tc_t *tcptr)
+    atfu_ ## tc ## _cleanup(const atf_tc_t *tcptr ATF_DEFS_ATTRIBUTE_UNUSED)
 
 #define ATF_TC_CLEANUP_NAME(tc) \
     (atfu_ ## tc ## _cleanup)
     ATF_CHECK_MSG(strcmp(x, y) == 0, "%s != %s (%s != %s): " fmt, \
                     #x, #y, x, y, ##__VA_ARGS__)
 
+#define ATF_REQUIRE_MATCH(regexp, string) \
+    ATF_REQUIRE_MSG(atf_utils_grep_string("%s", string, regexp), \
+                    "'%s' not matched in '%s'", regexp, string);
+
+#define ATF_CHECK_MATCH(regexp, string) \
+    ATF_CHECK_MSG(atf_utils_grep_string("%s", string, regexp), \
+                  "'%s' not matched in '%s'", regexp, string);
+
+#define ATF_REQUIRE_MATCH_MSG(regexp, string, fmt, ...) \
+    ATF_REQUIRE_MSG(atf_utils_grep_string("%s", string, regexp), \
+                    "'%s' not matched in '%s': " fmt, regexp, string, \
+                    ##__VA_ARGS__);
+
+#define ATF_CHECK_MATCH_MSG(regexp, string, fmt, ...) \
+    ATF_CHECK_MSG(atf_utils_grep_string("%s", string, regexp), \
+                  "'%s' not matched in '%s': " fmt, regexp, string, \
+                  ##__VA_ARGS__);
+
 #define ATF_CHECK_ERRNO(exp_errno, bool_expr) \
     atf_tc_check_errno(__FILE__, __LINE__, exp_errno, #bool_expr, bool_expr)
 
index cd2f40137197fceaa359cb0d7c124c39107fb67c..3dae471e4dd722e84dbf4d693bc615e5420e9364 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -84,20 +84,20 @@ atf_require_errno_semicolons(void)
 #define TEST_MACRO_2 invalid + name
 #define TEST_MACRO_3 invalid + name
 ATF_TC(TEST_MACRO_1);
-ATF_TC_HEAD(TEST_MACRO_1, tc) { }
-ATF_TC_BODY(TEST_MACRO_1, tc) { }
+ATF_TC_HEAD(TEST_MACRO_1, tc) { if (tc != NULL) {} }
+ATF_TC_BODY(TEST_MACRO_1, tc) { if (tc != NULL) {} }
 atf_tc_t *test_name_1 = &ATF_TC_NAME(TEST_MACRO_1);
 void (*head_1)(atf_tc_t *) = ATF_TC_HEAD_NAME(TEST_MACRO_1);
 void (*body_1)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_1);
 ATF_TC_WITH_CLEANUP(TEST_MACRO_2);
-ATF_TC_HEAD(TEST_MACRO_2, tc) { }
-ATF_TC_BODY(TEST_MACRO_2, tc) { }
-ATF_TC_CLEANUP(TEST_MACRO_2, tc) { }
+ATF_TC_HEAD(TEST_MACRO_2, tc) { if (tc != NULL) {} }
+ATF_TC_BODY(TEST_MACRO_2, tc) { if (tc != NULL) {} }
+ATF_TC_CLEANUP(TEST_MACRO_2, tc) { if (tc != NULL) {} }
 atf_tc_t *test_name_2 = &ATF_TC_NAME(TEST_MACRO_2);
 void (*head_2)(atf_tc_t *) = ATF_TC_HEAD_NAME(TEST_MACRO_2);
 void (*body_2)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_2);
 void (*cleanup_2)(const atf_tc_t *) = ATF_TC_CLEANUP_NAME(TEST_MACRO_2);
 ATF_TC_WITHOUT_HEAD(TEST_MACRO_3);
-ATF_TC_BODY(TEST_MACRO_3, tc) { }
+ATF_TC_BODY(TEST_MACRO_3, tc) { if (tc != NULL) {} }
 atf_tc_t *test_name_3 = &ATF_TC_NAME(TEST_MACRO_3);
 void (*body_3)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_3);
index 30c2946334dfe92b5b0f333aebbbdc7a1306ecb7..f077a273d73dd12d405fff84e36ead65eb6ca666 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,7 @@
 
 static
 void
-create_ctl_file(const atf_tc_t *tc, const char *name)
+create_ctl_file(const char *name)
 {
     atf_fs_path_t p;
 
@@ -100,9 +100,9 @@ init_and_run_h_tc(const char *name, void (*head)(atf_tc_t *),
     } \
     ATF_TC_BODY(h_ ## id, tc) \
     { \
-        create_ctl_file(tc, "before"); \
+        create_ctl_file("before"); \
         macro; \
-        create_ctl_file(tc, "after"); \
+        create_ctl_file("after"); \
     }
 
 #define H_CHECK_HEAD_NAME(id) ATF_TC_HEAD_NAME(h_check_ ## id)
@@ -125,6 +125,11 @@ init_and_run_h_tc(const char *name, void (*head)(atf_tc_t *),
 #define H_CHECK_STREQ(id, v1, v2) \
     H_DEF(check_streq_ ## id, ATF_CHECK_STREQ(v1, v2))
 
+#define H_CHECK_MATCH_HEAD_NAME(id) ATF_TC_HEAD_NAME(h_check_match_ ## id)
+#define H_CHECK_MATCH_BODY_NAME(id) ATF_TC_BODY_NAME(h_check_match_ ## id)
+#define H_CHECK_MATCH(id, v1, v2) \
+    H_DEF(check_match_ ## id, ATF_CHECK_MATCH(v1, v2))
+
 #define H_CHECK_EQ_MSG_HEAD_NAME(id) \
     ATF_TC_HEAD_NAME(h_check_eq_msg_ ## id)
 #define H_CHECK_EQ_MSG_BODY_NAME(id) \
@@ -139,6 +144,13 @@ init_and_run_h_tc(const char *name, void (*head)(atf_tc_t *),
 #define H_CHECK_STREQ_MSG(id, v1, v2, msg) \
     H_DEF(check_streq_msg_ ## id, ATF_CHECK_STREQ_MSG(v1, v2, msg))
 
+#define H_CHECK_MATCH_MSG_HEAD_NAME(id) \
+    ATF_TC_HEAD_NAME(h_check_match_msg_ ## id)
+#define H_CHECK_MATCH_MSG_BODY_NAME(id) \
+    ATF_TC_BODY_NAME(h_check_match_msg_ ## id)
+#define H_CHECK_MATCH_MSG(id, v1, v2, msg) \
+    H_DEF(check_match_msg_ ## id, ATF_CHECK_MATCH_MSG(v1, v2, msg))
+
 #define H_CHECK_ERRNO_HEAD_NAME(id) ATF_TC_HEAD_NAME(h_check_errno_ ## id)
 #define H_CHECK_ERRNO_BODY_NAME(id) ATF_TC_BODY_NAME(h_check_errno_ ## id)
 #define H_CHECK_ERRNO(id, exp_errno, bool_expr) \
@@ -164,6 +176,11 @@ init_and_run_h_tc(const char *name, void (*head)(atf_tc_t *),
 #define H_REQUIRE_STREQ(id, v1, v2) \
     H_DEF(require_streq_ ## id, ATF_REQUIRE_STREQ(v1, v2))
 
+#define H_REQUIRE_MATCH_HEAD_NAME(id) ATF_TC_HEAD_NAME(h_require_match_ ## id)
+#define H_REQUIRE_MATCH_BODY_NAME(id) ATF_TC_BODY_NAME(h_require_match_ ## id)
+#define H_REQUIRE_MATCH(id, v1, v2) \
+    H_DEF(require_match_ ## id, ATF_REQUIRE_MATCH(v1, v2))
+
 #define H_REQUIRE_EQ_MSG_HEAD_NAME(id) \
     ATF_TC_HEAD_NAME(h_require_eq_msg_ ## id)
 #define H_REQUIRE_EQ_MSG_BODY_NAME(id) \
@@ -178,6 +195,13 @@ init_and_run_h_tc(const char *name, void (*head)(atf_tc_t *),
 #define H_REQUIRE_STREQ_MSG(id, v1, v2, msg) \
     H_DEF(require_streq_msg_ ## id, ATF_REQUIRE_STREQ_MSG(v1, v2, msg))
 
+#define H_REQUIRE_MATCH_MSG_HEAD_NAME(id) \
+    ATF_TC_HEAD_NAME(h_require_match_msg_ ## id)
+#define H_REQUIRE_MATCH_MSG_BODY_NAME(id) \
+    ATF_TC_BODY_NAME(h_require_match_msg_ ## id)
+#define H_REQUIRE_MATCH_MSG(id, v1, v2, msg) \
+    H_DEF(require_match_msg_ ## id, ATF_REQUIRE_MATCH_MSG(v1, v2, msg))
+
 #define H_REQUIRE_ERRNO_HEAD_NAME(id) ATF_TC_HEAD_NAME(h_require_errno_ ## id)
 #define H_REQUIRE_ERRNO_BODY_NAME(id) ATF_TC_BODY_NAME(h_require_errno_ ## id)
 #define H_REQUIRE_ERRNO(id, exp_errno, bool_expr) \
@@ -240,11 +264,11 @@ ATF_TC_BODY(check_errno, tc)
         ATF_REQUIRE(exists("after"));
 
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf_utils_grep_file("^passed", "result"));
         } else {
-            ATF_REQUIRE(grep_file("result", "^failed"));
-            ATF_REQUIRE(grep_file("error", "macros_test.c:[0-9]+: %s$",
-                t->exp_regex));
+            ATF_REQUIRE(atf_utils_grep_file("^failed", "result"));
+            ATF_REQUIRE(atf_utils_grep_file(
+                "macros_test.c:[0-9]+: %s$", "error", t->exp_regex));
         }
 
         ATF_REQUIRE(unlink("before") != -1);
@@ -282,11 +306,12 @@ ATF_TC_BODY(require_errno, tc)
 
         ATF_REQUIRE(exists("before"));
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf_utils_grep_file("^passed", "result"));
             ATF_REQUIRE(exists("after"));
         } else {
-            ATF_REQUIRE(grep_file("result", "^failed: .*macros_test.c:[0-9]+: "
-                "%s$", t->exp_regex));
+            ATF_REQUIRE(atf_utils_grep_file(
+                "^failed: .*macros_test.c:[0-9]+: %s$", "result",
+                t->exp_regex));
             ATF_REQUIRE(!exists("after"));
         }
 
@@ -340,11 +365,11 @@ ATF_TC_BODY(check, tc)
         ATF_REQUIRE(exists("after"));
 
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf_utils_grep_file("^passed", "result"));
         } else {
-            ATF_REQUIRE(grep_file("result", "^failed"));
-            ATF_REQUIRE(grep_file("error", "Check failed: .*"
-                "macros_test.c:[0-9]+: %s$", t->msg));
+            ATF_REQUIRE(atf_utils_grep_file("^failed", "result"));
+            ATF_REQUIRE(atf_utils_grep_file("Check failed: .*"
+                "macros_test.c:[0-9]+: %s$", "error", t->msg));
         }
 
         ATF_REQUIRE(unlink("before") != -1);
@@ -381,11 +406,11 @@ do_check_eq_tests(const struct check_eq_test *tests)
         ATF_CHECK(exists("after"));
 
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf_utils_grep_file("^passed", "result"));
         } else {
-            ATF_REQUIRE(grep_file("result", "^failed"));
-            ATF_CHECK(grep_file("error", "Check failed: .*"
-                "macros_test.c:[0-9]+: %s$", t->msg));
+            ATF_REQUIRE(atf_utils_grep_file("^failed", "result"));
+            ATF_CHECK(atf_utils_grep_file("Check failed: .*"
+                "macros_test.c:[0-9]+: %s$", "error", t->msg));
         }
 
         ATF_CHECK(unlink("before") != -1);
@@ -484,6 +509,40 @@ ATF_TC_BODY(check_streq, tc)
     do_check_eq_tests(tests);
 }
 
+/* ---------------------------------------------------------------------
+ * Test cases for the ATF_CHECK_MATCH and ATF_CHECK_MATCH_MSG macros.
+ * --------------------------------------------------------------------- */
+
+H_CHECK_MATCH(yes, "hello [a-z]+", "abc hello world");
+H_CHECK_MATCH(no, "hello [a-z]+", "abc hello WORLD");
+H_CHECK_MATCH_MSG(yes, "hello [a-z]+", "abc hello world", "lowercase");
+H_CHECK_MATCH_MSG(no, "hello [a-z]+", "abc hello WORLD", "uppercase");
+
+ATF_TC(check_match);
+ATF_TC_HEAD(check_match, tc)
+{
+    atf_tc_set_md_var(tc, "descr", "Tests the ATF_CHECK_MATCH and "
+                      "ATF_CHECK_MATCH_MSG macros");
+}
+ATF_TC_BODY(check_match, tc)
+{
+    struct check_eq_test tests[] = {
+        { H_CHECK_MATCH_HEAD_NAME(yes), H_CHECK_MATCH_BODY_NAME(yes),
+          "hello [a-z]+", "abc hello world", "", true },
+        { H_CHECK_MATCH_HEAD_NAME(no), H_CHECK_MATCH_BODY_NAME(no),
+          "hello [a-z]+", "abc hello WORLD",
+          "'hello \\[a-z\\]\\+' not matched in 'abc hello WORLD'", false },
+        { H_CHECK_MATCH_MSG_HEAD_NAME(yes), H_CHECK_MATCH_MSG_BODY_NAME(yes),
+          "hello [a-z]+", "abc hello world", "", true },
+        { H_CHECK_MATCH_MSG_HEAD_NAME(no), H_CHECK_MATCH_MSG_BODY_NAME(no),
+          "hello [a-z]+", "abc hello WORLD",
+          "'hello \\[a-z\\]\\+' not matched in 'abc hello WORLD': uppercase",
+          false },
+        { NULL, NULL, 0, 0, "", false }
+    };
+    do_check_eq_tests(tests);
+}
+
 /* ---------------------------------------------------------------------
  * Test cases for the ATF_REQUIRE and ATF_REQUIRE_MSG macros.
  * --------------------------------------------------------------------- */
@@ -526,11 +585,11 @@ ATF_TC_BODY(require, tc)
 
         ATF_REQUIRE(exists("before"));
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf_utils_grep_file("^passed", "result"));
             ATF_REQUIRE(exists("after"));
         } else {
-            ATF_REQUIRE(grep_file("result", "^failed: .*macros_test.c:[0-9]+: "
-                                  "%s$", t->msg));
+            ATF_REQUIRE(atf_utils_grep_file(
+                "^failed: .*macros_test.c:[0-9]+: %s$", "result", t->msg));
             ATF_REQUIRE(!exists("after"));
         }
 
@@ -567,11 +626,11 @@ do_require_eq_tests(const struct require_eq_test *tests)
 
         ATF_REQUIRE(exists("before"));
         if (t->ok) {
-            ATF_REQUIRE(grep_file("result", "^passed"));
+            ATF_REQUIRE(atf_utils_grep_file("^passed", "result"));
             ATF_REQUIRE(exists("after"));
         } else {
-            ATF_REQUIRE(grep_file("result", "^failed: .*macros_test.c"
-                ":[0-9]+: %s$", t->msg));
+            ATF_REQUIRE(atf_utils_grep_file("^failed: .*macros_test.c"
+                ":[0-9]+: %s$", "result", t->msg));
             ATF_REQUIRE(!exists("after"));
         }
 
@@ -672,20 +731,55 @@ ATF_TC_BODY(require_streq, tc)
     do_require_eq_tests(tests);
 }
 
+/* ---------------------------------------------------------------------
+ * Test cases for the ATF_REQUIRE_MATCH and ATF_REQUIRE_MATCH_MSG macros.
+ * --------------------------------------------------------------------- */
+
+H_REQUIRE_MATCH(yes, "hello [a-z]+", "abc hello world");
+H_REQUIRE_MATCH(no, "hello [a-z]+", "abc hello WORLD");
+H_REQUIRE_MATCH_MSG(yes, "hello [a-z]+", "abc hello world", "lowercase");
+H_REQUIRE_MATCH_MSG(no, "hello [a-z]+", "abc hello WORLD", "uppercase");
+
+ATF_TC(require_match);
+ATF_TC_HEAD(require_match, tc)
+{
+    atf_tc_set_md_var(tc, "descr", "Tests the ATF_REQUIRE_MATCH and "
+                      "ATF_REQUIRE_MATCH_MSG macros");
+}
+ATF_TC_BODY(require_match, tc)
+{
+    struct require_eq_test tests[] = {
+        { H_REQUIRE_MATCH_HEAD_NAME(yes), H_REQUIRE_MATCH_BODY_NAME(yes),
+          "hello [a-z]+", "abc hello world", "", true },
+        { H_REQUIRE_MATCH_HEAD_NAME(no), H_REQUIRE_MATCH_BODY_NAME(no),
+          "hello [a-z]+", "abc hello WORLD",
+          "'hello \\[a-z\\]\\+' not matched in 'abc hello WORLD'", false },
+        { H_REQUIRE_MATCH_MSG_HEAD_NAME(yes),
+          H_REQUIRE_MATCH_MSG_BODY_NAME(yes),
+          "hello [a-z]+", "abc hello world", "", true },
+        { H_REQUIRE_MATCH_MSG_HEAD_NAME(no), H_REQUIRE_MATCH_MSG_BODY_NAME(no),
+          "hello [a-z]+", "abc hello WORLD",
+          "'hello \\[a-z\\]\\+' not matched in 'abc hello WORLD': uppercase",
+          false },
+        { NULL, NULL, 0, 0, "", false }
+    };
+    do_require_eq_tests(tests);
+}
+
 /* ---------------------------------------------------------------------
  * Miscellaneous test cases covering several macros.
  * --------------------------------------------------------------------- */
 
 static
 bool
-aux_bool(const char *fmt)
+aux_bool(const char *fmt ATF_DEFS_ATTRIBUTE_UNUSED)
 {
     return false;
 }
 
 static
 const char *
-aux_str(const char *fmt)
+aux_str(const char *fmt ATF_DEFS_ATTRIBUTE_UNUSED)
 {
     return "foo";
 }
@@ -728,12 +822,12 @@ ATF_TC_BODY(msg_embedded_fmt, tc)
 
         if (t->fatal) {
             bool matched =
-                grep_file("result", "^failed: .*macros_test.c:[0-9]+: "
-                          "%s$", t->msg);
+                atf_utils_grep_file(
+                    "^failed: .*macros_test.c:[0-9]+: %s$", "result", t->msg);
             ATF_CHECK_MSG(matched, "couldn't find error string in result");
         } else {
-            bool matched = grep_file("error", "Check failed: .*"
-                "macros_test.c:[0-9]+: %s$", t->msg);
+            bool matched = atf_utils_grep_file("Check failed: .*"
+                "macros_test.c:[0-9]+: %s$", "error", t->msg);
             ATF_CHECK_MSG(matched, "couldn't find error string in output");
         }
     }
@@ -749,6 +843,11 @@ BUILD_TC(use, "macros_h_test.c",
          "do not cause syntax errors when used",
          "Build of macros_h_test.c failed; some macros in atf-c/macros.h "
          "are broken");
+BUILD_TC_FAIL(detect_unused_tests, "unused_test.c",
+         "Tests that defining an unused test case raises a warning (and thus "
+         "an error)",
+         "Build of unused_test.c passed; unused test cases are not properly "
+         "detected");
 
 /* ---------------------------------------------------------------------
  * Main.
@@ -760,17 +859,20 @@ ATF_TP_ADD_TCS(tp)
     ATF_TP_ADD_TC(tp, check_eq);
     ATF_TP_ADD_TC(tp, check_streq);
     ATF_TP_ADD_TC(tp, check_errno);
+    ATF_TP_ADD_TC(tp, check_match);
 
     ATF_TP_ADD_TC(tp, require);
     ATF_TP_ADD_TC(tp, require_eq);
     ATF_TP_ADD_TC(tp, require_streq);
     ATF_TP_ADD_TC(tp, require_errno);
+    ATF_TP_ADD_TC(tp, require_match);
 
     ATF_TP_ADD_TC(tp, msg_embedded_fmt);
 
     /* Add the test cases for the header file. */
     ATF_TP_ADD_TC(tp, include);
     ATF_TP_ADD_TC(tp, use);
+    ATF_TP_ADD_TC(tp, detect_unused_tests);
 
     return atf_no_error();
 }
index 95d8ea7d5cb9a0e6bd761fba4c1310c4ea64c47e..8770808cad8f402442c583a90d10ee2406f4a307 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
index 02d2af0fa61f16d949f68c921e209cf9965a3bd5..cbdd00c4e0b0f92414d638317aaaff0a56b89947 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -29,6 +29,7 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/uio.h>
 
 #include <errno.h>
 #include <fcntl.h>
@@ -103,7 +104,7 @@ static void errno_test(struct context *, const char *, const size_t,
                        const int, const char *, const bool,
                        void (*)(struct context *, atf_dynstr_t *));
 static atf_error_t check_prog_in_dir(const char *, void *);
-static atf_error_t check_prog(struct context *, const char *, void *);
+static atf_error_t check_prog(struct context *, const char *);
 
 static void
 context_init(struct context *ctx, const atf_tc_t *tc, const char *resfile)
@@ -156,30 +157,42 @@ static atf_error_t
 write_resfile(const int fd, const char *result, const int arg,
               const atf_dynstr_t *reason)
 {
-    char buffer[1024];
-    int ret;
-
-    if (arg == -1 && reason == NULL) {
-        if (snprintf(buffer, sizeof(buffer), "%s\n", result) <= 0)
-            goto err;
-    } else if (arg == -1 && reason != NULL) {
-        if (snprintf(buffer, sizeof(buffer), "%s: %s\n", result,
-                     atf_dynstr_cstring(reason)) <= 0)
-            goto err;
-    } else if (arg != -1 && reason != NULL) {
-        if (snprintf(buffer, sizeof(buffer), "%s(%d): %s\n", result,
-                     arg, atf_dynstr_cstring(reason)) <= 0)
-            goto err;
-    } else {
-        UNREACHABLE;
+    static char NL[] = "\n", CS[] = ": ";
+    char buf[64];
+    const char *r;
+    struct iovec iov[5];
+    ssize_t ret;
+    int count = 0;
+
+    INV(arg == -1 || reason != NULL);
+
+#define UNCONST(a) ((void *)(unsigned long)(const void *)(a))
+    iov[count].iov_base = UNCONST(result);
+    iov[count++].iov_len = strlen(result);
+
+    if (reason != NULL) {
+        if (arg != -1) {
+            iov[count].iov_base = buf;
+            iov[count++].iov_len = snprintf(buf, sizeof(buf), "(%d)", arg);
+        }
+
+        iov[count].iov_base = CS;
+        iov[count++].iov_len = sizeof(CS) - 1;
+
+        r = atf_dynstr_cstring(reason);
+        iov[count].iov_base = UNCONST(r);
+        iov[count++].iov_len = strlen(r);
     }
+#undef UNCONST
 
-    while ((ret = write(fd, buffer, strlen(buffer))) == -1 && errno == EINTR)
-        ; /* Retry. */
+    iov[count].iov_base = NL;
+    iov[count++].iov_len = sizeof(NL) - 1;
+
+    while ((ret = writev(fd, iov, count)) == -1 && errno == EINTR)
+        continue; /* Retry. */
     if (ret != -1)
         return atf_no_error();
 
-err:
     return atf_libc_error(
         errno, "Failed to write results file; result %s, reason %s", result,
         reason == NULL ? "null" : atf_dynstr_cstring(reason));
@@ -449,7 +462,7 @@ out_p:
 }
 
 static atf_error_t
-check_prog(struct context *ctx, const char *prog, void *data)
+check_prog(struct context *ctx, const char *prog)
 {
     atf_error_t err;
     atf_fs_path_t p;
@@ -863,7 +876,7 @@ _atf_tc_pass(struct context *ctx)
 static void
 _atf_tc_require_prog(struct context *ctx, const char *prog)
 {
-    check_fatal_error(check_prog(ctx, prog, NULL));
+    check_fatal_error(check_prog(ctx, prog));
 }
 
 static void
index f399f298d5aa667339b5270f0ce9156a5a106b62..3f24186b026460117f9c7f1a81a5faae5858d85a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -103,22 +103,35 @@ atf_error_t atf_tc_run(const atf_tc_t *, const char *);
 atf_error_t atf_tc_cleanup(const atf_tc_t *);
 
 /* To be run from test case bodies only. */
-void atf_tc_fail(const char *, ...) ATF_DEFS_ATTRIBUTE_NORETURN;
-void atf_tc_fail_nonfatal(const char *, ...);
-void atf_tc_pass(void) ATF_DEFS_ATTRIBUTE_NORETURN;
+void atf_tc_fail(const char *, ...)
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2)
+    ATF_DEFS_ATTRIBUTE_NORETURN;
+void atf_tc_fail_nonfatal(const char *, ...)
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2);
+void atf_tc_pass(void)
+    ATF_DEFS_ATTRIBUTE_NORETURN;
 void atf_tc_require_prog(const char *);
-void atf_tc_skip(const char *, ...) ATF_DEFS_ATTRIBUTE_NORETURN;
+void atf_tc_skip(const char *, ...)
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2)
+    ATF_DEFS_ATTRIBUTE_NORETURN;
 void atf_tc_expect_pass(void);
-void atf_tc_expect_fail(const char *, ...);
-void atf_tc_expect_exit(const int, const char *, ...);
-void atf_tc_expect_signal(const int, const char *, ...);
-void atf_tc_expect_death(const char *, ...);
-void atf_tc_expect_timeout(const char *, ...);
+void atf_tc_expect_fail(const char *, ...)
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2);
+void atf_tc_expect_exit(const int, const char *, ...)
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 3);
+void atf_tc_expect_signal(const int, const char *, ...)
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 3);
+void atf_tc_expect_death(const char *, ...)
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2);
+void atf_tc_expect_timeout(const char *, ...)
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 2);
 
 /* To be run from test case bodies only; internal to macros.h. */
-void atf_tc_fail_check(const char *, const size_t, const char *, ...);
+void atf_tc_fail_check(const char *, const size_t, const char *, ...)
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(3, 4);
 void atf_tc_fail_requirement(const char *, const size_t, const char *, ...)
-     ATF_DEFS_ATTRIBUTE_NORETURN;
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(3, 4)
+    ATF_DEFS_ATTRIBUTE_NORETURN;
 void atf_tc_check_errno(const char *, const size_t, const int,
                         const char *, const bool);
 void atf_tc_require_errno(const char *, const size_t, const int,
index 99f60a0b9086221a9348c4c7e4c879a61d204032..4aaf9a54c242f3d152e5477d0583083ba5ba5f29 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 
 ATF_TC_HEAD(empty, tc)
 {
+    if (tc != NULL) {}
 }
-
-ATF_TC_HEAD(test_var, tc)
+ATF_TC_BODY(empty, tc)
 {
-    atf_tc_set_md_var(tc, "test-var", "Test text");
 }
 
-ATF_TC_BODY(empty, tc)
+ATF_TC_HEAD(test_var, tc)
 {
+    atf_tc_set_md_var(tc, "test-var", "Test text");
 }
 
 /* ---------------------------------------------------------------------
index 6c5a9ec7fef719f5b51dae25a583f3bbff9e7c37..7833498ac15eb2eea7ecf5b1fabe54f17ea57a31 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index f832b9003f2f2e61a602ec9ddfcfef8d242e48e3..e4f9ba46e936519762d040284e9a8f00c66e2d1f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
index fc48ef928ff43f6d74f639da7a00748b6860bc20..5da18b20bdac3a1dfa66e10ee184fc6aace0e140 100644 (file)
@@ -54,13 +54,16 @@ ATF_TC_BODY(getopt, tc)
     char *const argv[] = { arg1, arg2, arg3, arg4, NULL };
 
     int ch;
+    bool zflag;
 
     /* Given that this obviously is a test program, and that we used the
      * same driver to start, we can test getopt(3) right here without doing
      * any fancy stuff. */
+    zflag = false;
     while ((ch = getopt(argc, argv, ":Z")) != -1) {
         switch (ch) {
         case 'Z':
+            zflag = true;
             break;
 
         case '?':
@@ -70,6 +73,7 @@ ATF_TC_BODY(getopt, tc)
         }
     }
 
+    ATF_REQUIRE(zflag);
     ATF_REQUIRE_EQ_MSG(1, argc - optind, "Invalid number of arguments left "
         "after the call to getopt(3)");
     ATF_CHECK_STREQ_MSG("foo", argv[optind], "The non-option argument is "
diff --git a/unit/atf-src/atf-c/unused_test.c b/unit/atf-src/atf-c/unused_test.c
new file mode 100644 (file)
index 0000000..e8de682
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Automated Testing Framework (atf)
+ *
+ * Copyright (c) 2012 The NetBSD Foundation, 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:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#include <atf-c/macros.h>
+
+ATF_TC(this_is_used);
+ATF_TC_HEAD(this_is_used, tc)
+{
+    atf_tc_set_md_var(tc, "descr", "A test case that is not referenced");
+}
+ATF_TC_BODY(this_is_used, tc)
+{
+}
+
+ATF_TC(this_is_unused);
+ATF_TC_HEAD(this_is_unused, tc)
+{
+    atf_tc_set_md_var(tc, "descr", "A test case that is referenced");
+}
+ATF_TC_BODY(this_is_unused, tc)
+{
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+    ATF_TP_ADD_TC(tp, this_is_used);
+    /* ATF_TP_ADD_TC(tp, this_is_unused); */
+
+    return atf_no_error();
+}
index c33270390ace6992947f716b9e27b55765ee9b73..4409f7a4fb9efa096d1fdc398f648729c8177c69 100644 (file)
  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "atf-c/utils.h"
+
+#include <sys/stat.h>
+#include <sys/wait.h>
+
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <regex.h>
+#include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 
-#include "atf-c/utils.h"
+#include <atf-c.h>
+
+#include "detail/dynstr.h"
+
+/** Searches for a regexp in a string.
+ *
+ * \param regex The regexp to look for.
+ * \param str The string in which to look for the expression.
+ *
+ * \return True if there is a match; false otherwise. */
+static
+bool
+grep_string(const char *regex, const char *str)
+{
+    int res;
+    regex_t preg;
+
+    printf("Looking for '%s' in '%s'\n", regex, str);
+    ATF_REQUIRE(regcomp(&preg, regex, REG_EXTENDED) == 0);
+
+    res = regexec(&preg, str, 0, NULL, 0);
+    ATF_REQUIRE(res == 0 || res == REG_NOMATCH);
+
+    regfree(&preg);
+
+    return res == 0;
+}
+
+/** Prints the contents of a file to stdout.
+ *
+ * \param name The name of the file to be printed.
+ * \param prefix An string to be prepended to every line of the printed
+ *     file. */
+void
+atf_utils_cat_file(const char *name, const char *prefix)
+{
+    const int fd = open(name, O_RDONLY);
+    ATF_REQUIRE_MSG(fd != -1, "Cannot open %s", name);
+
+    char buffer[1024];
+    ssize_t count;
+    bool continued = false;
+    while ((count = read(fd, buffer, sizeof(buffer) - 1)) > 0) {
+        buffer[count] = '\0';
+
+        if (!continued)
+            printf("%s", prefix);
+
+        char *iter = buffer;
+        char *end;
+        while ((end = strchr(iter, '\n')) != NULL) {
+            *end = '\0';
+            printf("%s\n", iter);
+
+            iter = end + 1;
+            if (iter != buffer + count)
+                printf("%s", prefix);
+            else
+                continued = false;
+        }
+        if (iter < buffer + count) {
+            printf("%s", iter);
+            continued = true;
+        }
+    }
+    ATF_REQUIRE(count == 0);
+}
+
+/** Compares a file against the given golden contents.
+ *
+ * \param name Name of the file to be compared.
+ * \param contents Expected contents of the file.
+ *
+ * \return True if the file matches the contents; false otherwise. */
+bool
+atf_utils_compare_file(const char *name, const char *contents)
+{
+    const int fd = open(name, O_RDONLY);
+    ATF_REQUIRE_MSG(fd != -1, "Cannot open %s", name);
+
+    const char *pos = contents;
+    ssize_t remaining = strlen(contents);
+
+    char buffer[1024];
+    ssize_t count;
+    while ((count = read(fd, buffer, sizeof(buffer))) > 0 &&
+           count <= remaining) {
+        if (memcmp(pos, buffer, count) != 0) {
+            close(fd);
+            return false;
+        }
+        remaining -= count;
+        pos += count;
+    }
+    close(fd);
+    return count == 0 && remaining == 0;
+}
+
+/** Copies a file.
+ *
+ * \param source Path to the source file.
+ * \param destination Path to the destination file. */
+void
+atf_utils_copy_file(const char *source, const char *destination)
+{
+    const int input = open(source, O_RDONLY);
+    ATF_REQUIRE_MSG(input != -1, "Failed to open source file during "
+                    "copy (%s)", source);
+
+    const int output = open(destination, O_WRONLY | O_CREAT | O_TRUNC, 0777);
+    ATF_REQUIRE_MSG(output != -1, "Failed to open destination file during "
+                    "copy (%s)", destination);
+
+    char buffer[1024];
+    ssize_t length;
+    while ((length = read(input, buffer, sizeof(buffer))) > 0)
+        ATF_REQUIRE_MSG(write(output, buffer, length) == length,
+                        "Failed to write to %s during copy", destination);
+    ATF_REQUIRE_MSG(length != -1, "Failed to read from %s during copy", source);
+
+    struct stat sb;
+    ATF_REQUIRE_MSG(fstat(input, &sb) != -1,
+                    "Failed to stat source file %s during copy", source);
+    ATF_REQUIRE_MSG(fchmod(output, sb.st_mode) != -1,
+                    "Failed to chmod destination file %s during copy",
+                    destination);
+
+    close(output);
+    close(input);
+}
 
+/** Creates a file.
+ *
+ * \param name Name of the file to create.
+ * \param contents Text to write into the created file.
+ * \param ... Positional parameters to the contents. */
+void
+atf_utils_create_file(const char *name, const char *contents, ...)
+{
+    va_list ap;
+    atf_dynstr_t formatted;
+    atf_error_t error;
+
+    va_start(ap, contents);
+    error = atf_dynstr_init_ap(&formatted, contents, ap);
+    va_end(ap);
+    ATF_REQUIRE(!atf_is_error(error));
+
+    const int fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
+    ATF_REQUIRE_MSG(fd != -1, "Cannot create file %s", name);
+    ATF_REQUIRE(write(fd, atf_dynstr_cstring(&formatted),
+                      atf_dynstr_length(&formatted)) != -1);
+    close(fd);
+
+    atf_dynstr_fini(&formatted);
+}
+
+/** Checks if a file exists.
+ *
+ * \param path Location of the file to check for.
+ *
+ * \return True if the file exists, false otherwise. */
+bool
+atf_utils_file_exists(const char *path)
+{
+    const int ret = access(path, F_OK);
+    if (ret == -1) {
+        if (errno != ENOENT)
+            atf_tc_fail("Failed to check the existence of %s: %s", path,
+                        strerror(errno));
+        else
+            return false;
+    } else
+        return true;
+}
+
+/** Spawns a subprocess and redirects its output to files.
+ *
+ * Use the atf_utils_wait() function to wait for the completion of the spawned
+ * subprocess and validate its exit conditions.
+ *
+ * \return 0 in the new child; the PID of the new child in the parent.  Does
+ * not return in error conditions. */
+pid_t
+atf_utils_fork(void)
+{
+    const pid_t pid = fork();
+    if (pid == -1)
+        atf_tc_fail("fork failed");
+
+    if (pid == 0) {
+        atf_utils_redirect(STDOUT_FILENO, "atf_utils_fork_out.txt");
+        atf_utils_redirect(STDERR_FILENO, "atf_utils_fork_err.txt");
+    }
+    return pid;
+}
+
+/** Frees an dynamically-allocated "argv" array.
+ *
+ * \param argv A dynamically-allocated array of dynamically-allocated
+ *     strings. */
 void
 atf_utils_free_charpp(char **argv)
 {
@@ -41,3 +252,164 @@ atf_utils_free_charpp(char **argv)
 
     free(argv);
 }
+
+/** Searches for a regexp in a file.
+ *
+ * \param regex The regexp to look for.
+ * \param file The file in which to look for the expression.
+ * \param ... Positional parameters to the regex.
+ *
+ * \return True if there is a match; false otherwise. */
+bool
+atf_utils_grep_file(const char *regex, const char *file, ...)
+{
+    int fd;
+    va_list ap;
+    atf_dynstr_t formatted;
+    atf_error_t error;
+
+    va_start(ap, file);
+    error = atf_dynstr_init_ap(&formatted, regex, ap);
+    va_end(ap);
+    ATF_REQUIRE(!atf_is_error(error));
+
+    ATF_REQUIRE((fd = open(file, O_RDONLY)) != -1);
+    bool found = false;
+    char *line = NULL;
+    while (!found && (line = atf_utils_readline(fd)) != NULL) {
+        found = grep_string(atf_dynstr_cstring(&formatted), line);
+        free(line);
+    }
+    close(fd);
+
+    atf_dynstr_fini(&formatted);
+
+    return found;
+}
+
+/** Searches for a regexp in a string.
+ *
+ * \param regex The regexp to look for.
+ * \param str The string in which to look for the expression.
+ * \param ... Positional parameters to the regex.
+ *
+ * \return True if there is a match; false otherwise. */
+bool
+atf_utils_grep_string(const char *regex, const char *str, ...)
+{
+    bool res;
+    va_list ap;
+    atf_dynstr_t formatted;
+    atf_error_t error;
+
+    va_start(ap, str);
+    error = atf_dynstr_init_ap(&formatted, regex, ap);
+    va_end(ap);
+    ATF_REQUIRE(!atf_is_error(error));
+
+    res = grep_string(atf_dynstr_cstring(&formatted), str);
+
+    atf_dynstr_fini(&formatted);
+
+    return res;
+}
+
+/** Reads a line of arbitrary length.
+ *
+ * \param fd The descriptor from which to read the line.
+ *
+ * \return A pointer to the read line, which must be released with free(), or
+ * NULL if there was nothing to read from the file. */
+char *
+atf_utils_readline(const int fd)
+{
+    char ch;
+    ssize_t cnt;
+    atf_dynstr_t temp;
+    atf_error_t error;
+
+    error = atf_dynstr_init(&temp);
+    ATF_REQUIRE(!atf_is_error(error));
+
+    while ((cnt = read(fd, &ch, sizeof(ch))) == sizeof(ch) &&
+           ch != '\n') {
+        error = atf_dynstr_append_fmt(&temp, "%c", ch);
+        ATF_REQUIRE(!atf_is_error(error));
+    }
+    ATF_REQUIRE(cnt != -1);
+
+    if (cnt == 0 && atf_dynstr_length(&temp) == 0) {
+        atf_dynstr_fini(&temp);
+        return NULL;
+    } else
+        return atf_dynstr_fini_disown(&temp);
+}
+
+/** Redirects a file descriptor to a file.
+ *
+ * \param target_fd The file descriptor to be replaced.
+ * \param name The name of the file to direct the descriptor to.
+ *
+ * \pre Should only be called from the process spawned by fork_for_testing
+ * because this exits uncontrolledly.
+ * \post Terminates execution if the redirection fails. */
+void
+atf_utils_redirect(const int target_fd, const char *name)
+{
+    if (target_fd == STDOUT_FILENO)
+        fflush(stdout);
+    else if (target_fd == STDERR_FILENO)
+        fflush(stderr);
+
+    const int new_fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
+    if (new_fd == -1)
+        err(EXIT_FAILURE, "Cannot create %s", name);
+    if (new_fd != target_fd) {
+        if (dup2(new_fd, target_fd) == -1)
+            err(EXIT_FAILURE, "Cannot redirect to fd %d", target_fd);
+    }
+    close(new_fd);
+}
+
+/** Waits for a subprocess and validates its exit condition.
+ *
+ * \param pid The process to be waited for.  Must have been started by
+ *     testutils_fork().
+ * \param exitstatus Expected exit status.
+ * \param expout Expected contents of stdout.
+ * \param experr Expected contents of stderr. */
+void
+atf_utils_wait(const pid_t pid, const int exitstatus, const char *expout,
+               const char *experr)
+{
+    int status;
+    ATF_REQUIRE(waitpid(pid, &status, 0) != -1);
+
+    atf_utils_cat_file("atf_utils_fork_out.txt", "subprocess stdout: ");
+    atf_utils_cat_file("atf_utils_fork_err.txt", "subprocess stderr: ");
+
+    ATF_REQUIRE(WIFEXITED(status));
+    ATF_REQUIRE_EQ(exitstatus, WEXITSTATUS(status));
+
+    const char *save_prefix = "save:";
+    const size_t save_prefix_length = strlen(save_prefix);
+
+    if (strlen(expout) > save_prefix_length &&
+        strncmp(expout, save_prefix, save_prefix_length) == 0) {
+        atf_utils_copy_file("atf_utils_fork_out.txt",
+                            expout + save_prefix_length);
+    } else {
+        ATF_REQUIRE(atf_utils_compare_file("atf_utils_fork_out.txt", expout));
+    }
+
+    if (strlen(experr) > save_prefix_length &&
+        strncmp(experr, save_prefix, save_prefix_length) == 0) {
+        atf_utils_copy_file("atf_utils_fork_err.txt",
+                            experr + save_prefix_length);
+    } else {
+        ATF_REQUIRE(atf_utils_compare_file("atf_utils_fork_err.txt", experr));
+    }
+
+    ATF_REQUIRE(unlink("atf_utils_fork_out.txt") != -1);
+    ATF_REQUIRE(unlink("atf_utils_fork_err.txt") != -1);
+}
index dc4c5ae6f00b7b9285a4324c903a92b8ed8438d6..666804d3a2c1fd26fec3591b3ddc1728de9c73cb 100644 (file)
 #if !defined(ATF_C_UTILS_H)
 #define ATF_C_UTILS_H
 
+#include <stdbool.h>
+#include <unistd.h>
+
+#include <atf-c/defs.h>
+
+void atf_utils_cat_file(const char *, const char *);
+bool atf_utils_compare_file(const char *, const char *);
+void atf_utils_copy_file(const char *, const char *);
+void atf_utils_create_file(const char *, const char *, ...)
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(2, 3);
+bool atf_utils_file_exists(const char *);
+pid_t atf_utils_fork(void);
 void atf_utils_free_charpp(char **);
+bool atf_utils_grep_file(const char *, const char *, ...)
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 3);
+bool atf_utils_grep_string(const char *, const char *, ...)
+    ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(1, 3);
+char *atf_utils_readline(int);
+void atf_utils_redirect(const int, const char *);
+void atf_utils_wait(const pid_t, const int, const char *, const char *);
 
 #endif /* ATF_C_UTILS_H */
index 146272a713e6f65f919b9669a9709120580cd924..57d6af8d2a251747d5f8ccfb7402f6b4b5939246 100644 (file)
  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <sys/stat.h>
+#include <sys/wait.h>
+
+#include <fcntl.h>
+#include <stddef.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <atf-c.h>
 
 
 #include "detail/test_helpers.h"
 
-ATF_TC_WITHOUT_HEAD(free_charpp_empty);
-ATF_TC_BODY(free_charpp_empty, tc)
+/** Reads the contents of a file into a buffer.
+ *
+ * Up to buflen-1 characters are read into buffer.  If this function returns,
+ * the contents read into the buffer are guaranteed to be nul-terminated.
+ * Note, however, that if the file contains any nul characters itself,
+ * comparing it "as a string" will not work.
+ *
+ * \param path The file to be read, which must exist.
+ * \param buffer Buffer into which to store the file contents.
+ * \param buflen Size of the target buffer.
+ *
+ * \return The count of bytes read. */
+static ssize_t
+read_file(const char *path, void *const buffer, const size_t buflen)
+{
+    const int fd = open(path, O_RDONLY);
+    ATF_REQUIRE_MSG(fd != -1, "Cannot open %s", path);
+    const ssize_t length = read(fd, buffer, buflen - 1);
+    close(fd);
+    ATF_REQUIRE(length != -1);
+    ((char *)buffer)[length] = '\0';
+    return length;
+}
+
+ATF_TC_WITHOUT_HEAD(cat_file__empty);
+ATF_TC_BODY(cat_file__empty, tc)
+{
+    atf_utils_create_file("file.txt", "%s", "");
+    atf_utils_redirect(STDOUT_FILENO, "captured.txt");
+    atf_utils_cat_file("file.txt", "PREFIX");
+    fflush(stdout);
+    close(STDOUT_FILENO);
+
+    char buffer[1024];
+    read_file("captured.txt", buffer, sizeof(buffer));
+    ATF_REQUIRE_STREQ("", buffer);
+}
+
+ATF_TC_WITHOUT_HEAD(cat_file__one_line);
+ATF_TC_BODY(cat_file__one_line, tc)
+{
+    atf_utils_create_file("file.txt", "This is a single line\n");
+    atf_utils_redirect(STDOUT_FILENO, "captured.txt");
+    atf_utils_cat_file("file.txt", "PREFIX");
+    fflush(stdout);
+    close(STDOUT_FILENO);
+
+    char buffer[1024];
+    read_file("captured.txt", buffer, sizeof(buffer));
+    ATF_REQUIRE_STREQ("PREFIXThis is a single line\n", buffer);
+}
+
+ATF_TC_WITHOUT_HEAD(cat_file__several_lines);
+ATF_TC_BODY(cat_file__several_lines, tc)
+{
+    atf_utils_create_file("file.txt", "First\nSecond line\nAnd third\n");
+    atf_utils_redirect(STDOUT_FILENO, "captured.txt");
+    atf_utils_cat_file("file.txt", ">");
+    fflush(stdout);
+    close(STDOUT_FILENO);
+
+    char buffer[1024];
+    read_file("captured.txt", buffer, sizeof(buffer));
+    ATF_REQUIRE_STREQ(">First\n>Second line\n>And third\n", buffer);
+}
+
+ATF_TC_WITHOUT_HEAD(cat_file__no_newline_eof);
+ATF_TC_BODY(cat_file__no_newline_eof, tc)
+{
+    atf_utils_create_file("file.txt", "Foo\n bar baz");
+    atf_utils_redirect(STDOUT_FILENO, "captured.txt");
+    atf_utils_cat_file("file.txt", "PREFIX");
+    fflush(stdout);
+    close(STDOUT_FILENO);
+
+    char buffer[1024];
+    read_file("captured.txt", buffer, sizeof(buffer));
+    ATF_REQUIRE_STREQ("PREFIXFoo\nPREFIX bar baz", buffer);
+}
+
+ATF_TC_WITHOUT_HEAD(compare_file__empty__match);
+ATF_TC_BODY(compare_file__empty__match, tc)
+{
+    atf_utils_create_file("test.txt", "%s", "");
+    ATF_REQUIRE(atf_utils_compare_file("test.txt", ""));
+}
+
+ATF_TC_WITHOUT_HEAD(compare_file__empty__not_match);
+ATF_TC_BODY(compare_file__empty__not_match, tc)
+{
+    atf_utils_create_file("test.txt", "%s", "");
+    ATF_REQUIRE(!atf_utils_compare_file("test.txt", "\n"));
+    ATF_REQUIRE(!atf_utils_compare_file("test.txt", "foo"));
+    ATF_REQUIRE(!atf_utils_compare_file("test.txt", " "));
+}
+
+ATF_TC_WITHOUT_HEAD(compare_file__short__match);
+ATF_TC_BODY(compare_file__short__match, tc)
+{
+    atf_utils_create_file("test.txt", "this is a short file");
+    ATF_REQUIRE(atf_utils_compare_file("test.txt", "this is a short file"));
+}
+
+ATF_TC_WITHOUT_HEAD(compare_file__short__not_match);
+ATF_TC_BODY(compare_file__short__not_match, tc)
+{
+    atf_utils_create_file("test.txt", "this is a short file");
+    ATF_REQUIRE(!atf_utils_compare_file("test.txt", ""));
+    ATF_REQUIRE(!atf_utils_compare_file("test.txt", "\n"));
+    ATF_REQUIRE(!atf_utils_compare_file("test.txt", "this is a Short file"));
+    ATF_REQUIRE(!atf_utils_compare_file("test.txt", "this is a short fil"));
+    ATF_REQUIRE(!atf_utils_compare_file("test.txt", "this is a short file "));
+}
+
+ATF_TC_WITHOUT_HEAD(compare_file__long__match);
+ATF_TC_BODY(compare_file__long__match, tc)
+{
+    char long_contents[3456];
+    size_t i = 0;
+    for (; i < sizeof(long_contents) - 1; i++)
+        long_contents[i] = '0' + (i % 10);
+    long_contents[i] = '\0';
+    atf_utils_create_file("test.txt", "%s", long_contents);
+
+    ATF_REQUIRE(atf_utils_compare_file("test.txt", long_contents));
+}
+
+ATF_TC_WITHOUT_HEAD(compare_file__long__not_match);
+ATF_TC_BODY(compare_file__long__not_match, tc)
+{
+    char long_contents[3456];
+    size_t i = 0;
+    for (; i < sizeof(long_contents) - 1; i++)
+        long_contents[i] = '0' + (i % 10);
+    long_contents[i] = '\0';
+    atf_utils_create_file("test.txt", "%s", long_contents);
+
+    ATF_REQUIRE(!atf_utils_compare_file("test.txt", ""));
+    ATF_REQUIRE(!atf_utils_compare_file("test.txt", "\n"));
+    ATF_REQUIRE(!atf_utils_compare_file("test.txt", "0123456789"));
+    long_contents[i - 1] = 'Z';
+    ATF_REQUIRE(!atf_utils_compare_file("test.txt", long_contents));
+}
+
+ATF_TC_WITHOUT_HEAD(copy_file__empty);
+ATF_TC_BODY(copy_file__empty, tc)
+{
+    atf_utils_create_file("src.txt", "%s", "");
+    ATF_REQUIRE(chmod("src.txt", 0520) != -1);
+
+    atf_utils_copy_file("src.txt", "dest.txt");
+    ATF_REQUIRE(atf_utils_compare_file("dest.txt", ""));
+    struct stat sb;
+    ATF_REQUIRE(stat("dest.txt", &sb) != -1);
+    ATF_REQUIRE_EQ(0520, sb.st_mode & 0xfff);
+}
+
+ATF_TC_WITHOUT_HEAD(copy_file__some_contents);
+ATF_TC_BODY(copy_file__some_contents, tc)
+{
+    atf_utils_create_file("src.txt", "This is a\ntest file\n");
+    atf_utils_copy_file("src.txt", "dest.txt");
+    ATF_REQUIRE(atf_utils_compare_file("dest.txt", "This is a\ntest file\n"));
+}
+
+ATF_TC_WITHOUT_HEAD(create_file);
+ATF_TC_BODY(create_file, tc)
+{
+    atf_utils_create_file("test.txt", "This is a test with %d", 12345);
+
+    char buffer[128];
+    read_file("test.txt", buffer, sizeof(buffer));
+    ATF_REQUIRE_STREQ("This is a test with 12345", buffer);
+}
+
+ATF_TC_WITHOUT_HEAD(file_exists);
+ATF_TC_BODY(file_exists, tc)
+{
+    atf_utils_create_file("test.txt", "foo");
+
+    ATF_REQUIRE( atf_utils_file_exists("test.txt"));
+    ATF_REQUIRE( atf_utils_file_exists("./test.txt"));
+    ATF_REQUIRE(!atf_utils_file_exists("./test.tx"));
+    ATF_REQUIRE(!atf_utils_file_exists("test.txt2"));
+}
+
+ATF_TC_WITHOUT_HEAD(fork);
+ATF_TC_BODY(fork, tc)
+{
+    fprintf(stdout, "Should not get into child\n");
+    fprintf(stderr, "Should not get into child\n");
+    pid_t pid = atf_utils_fork();
+    if (pid == 0) {
+        fprintf(stdout, "Child stdout\n");
+        fprintf(stderr, "Child stderr\n");
+        exit(EXIT_SUCCESS);
+    }
+
+    int status;
+    ATF_REQUIRE(waitpid(pid, &status, 0) != -1);
+    ATF_REQUIRE(WIFEXITED(status));
+    ATF_REQUIRE_EQ(EXIT_SUCCESS, WEXITSTATUS(status));
+
+    char buffer[1024];
+    read_file("atf_utils_fork_out.txt", buffer, sizeof(buffer));
+    ATF_REQUIRE_STREQ("Child stdout\n", buffer);
+    read_file("atf_utils_fork_err.txt", buffer, sizeof(buffer));
+    ATF_REQUIRE_STREQ("Child stderr\n", buffer);
+}
+
+ATF_TC_WITHOUT_HEAD(free_charpp__empty);
+ATF_TC_BODY(free_charpp__empty, tc)
 {
     char **array = malloc(sizeof(char *) * 1);
     array[0] = NULL;
@@ -45,8 +262,8 @@ ATF_TC_BODY(free_charpp_empty, tc)
     atf_utils_free_charpp(array);
 }
 
-ATF_TC_WITHOUT_HEAD(free_charpp_some);
-ATF_TC_BODY(free_charpp_some, tc)
+ATF_TC_WITHOUT_HEAD(free_charpp__some);
+ATF_TC_BODY(free_charpp__some, tc)
 {
     char **array = malloc(sizeof(char *) * 4);
     array[0] = strdup("first");
@@ -57,12 +274,263 @@ ATF_TC_BODY(free_charpp_some, tc)
     atf_utils_free_charpp(array);
 }
 
+ATF_TC_WITHOUT_HEAD(grep_file);
+ATF_TC_BODY(grep_file, tc)
+{
+    atf_utils_create_file("test.txt", "line1\nthe second line\naaaabbbb\n");
+
+    ATF_CHECK(atf_utils_grep_file("line1", "test.txt"));
+    ATF_CHECK(atf_utils_grep_file("line%d", "test.txt", 1));
+    ATF_CHECK(atf_utils_grep_file("second line", "test.txt"));
+    ATF_CHECK(atf_utils_grep_file("aa.*bb", "test.txt"));
+    ATF_CHECK(!atf_utils_grep_file("foo", "test.txt"));
+    ATF_CHECK(!atf_utils_grep_file("bar", "test.txt"));
+    ATF_CHECK(!atf_utils_grep_file("aaaaa", "test.txt"));
+}
+
+ATF_TC_WITHOUT_HEAD(grep_string);
+ATF_TC_BODY(grep_string, tc)
+{
+    const char *str = "a string - aaaabbbb";
+    ATF_CHECK(atf_utils_grep_string("a string", str));
+    ATF_CHECK(atf_utils_grep_string("^a string", str));
+    ATF_CHECK(atf_utils_grep_string("aaaabbbb$", str));
+    ATF_CHECK(atf_utils_grep_string("a%s*bb", str, "a."));
+    ATF_CHECK(!atf_utils_grep_string("foo", str));
+    ATF_CHECK(!atf_utils_grep_string("bar", str));
+    ATF_CHECK(!atf_utils_grep_string("aaaaa", str));
+}
+
+ATF_TC_WITHOUT_HEAD(readline__none);
+ATF_TC_BODY(readline__none, tc)
+{
+    atf_utils_create_file("empty.txt", "%s", "");
+
+    const int fd = open("empty.txt", O_RDONLY);
+    ATF_REQUIRE(fd != -1);
+    ATF_REQUIRE(atf_utils_readline(fd) == NULL);
+    close(fd);
+}
+
+ATF_TC_WITHOUT_HEAD(readline__some);
+ATF_TC_BODY(readline__some, tc)
+{
+    const char *l1 = "First line with % formatting % characters %";
+    const char *l2 = "Second line; much longer than the first one";
+    const char *l3 = "Last line, without terminator";
+
+    atf_utils_create_file("test.txt", "%s\n%s\n%s", l1, l2, l3);
+
+    const int fd = open("test.txt", O_RDONLY);
+    ATF_REQUIRE(fd != -1);
+
+    char *line;
+
+    line = atf_utils_readline(fd);
+    ATF_REQUIRE_STREQ(l1, line);
+    free(line);
+
+    line = atf_utils_readline(fd);
+    ATF_REQUIRE_STREQ(l2, line);
+    free(line);
+
+    line = atf_utils_readline(fd);
+    ATF_REQUIRE_STREQ(l3, line);
+    free(line);
+
+    close(fd);
+}
+
+ATF_TC_WITHOUT_HEAD(redirect__stdout);
+ATF_TC_BODY(redirect__stdout, tc)
+{
+    printf("Buffer this");
+    atf_utils_redirect(STDOUT_FILENO, "captured.txt");
+    printf("The printed message");
+    fflush(stdout);
+
+    char buffer[1024];
+    read_file("captured.txt", buffer, sizeof(buffer));
+    ATF_REQUIRE_STREQ("The printed message", buffer);
+}
+
+ATF_TC_WITHOUT_HEAD(redirect__stderr);
+ATF_TC_BODY(redirect__stderr, tc)
+{
+    fprintf(stderr, "Buffer this");
+    atf_utils_redirect(STDERR_FILENO, "captured.txt");
+    fprintf(stderr, "The printed message");
+    fflush(stderr);
+
+    char buffer[1024];
+    read_file("captured.txt", buffer, sizeof(buffer));
+    ATF_REQUIRE_STREQ("The printed message", buffer);
+}
+
+ATF_TC_WITHOUT_HEAD(redirect__other);
+ATF_TC_BODY(redirect__other, tc)
+{
+    const char *message = "Foo bar\nbaz\n";
+    atf_utils_redirect(15, "captured.txt");
+    ATF_REQUIRE(write(15, message, strlen(message)) != -1);
+    close(15);
+
+    char buffer[1024];
+    read_file("captured.txt", buffer, sizeof(buffer));
+    ATF_REQUIRE_STREQ(message, buffer);
+}
+
+static void
+fork_and_wait(const int exitstatus, const char* expout, const char* experr)
+{
+    const pid_t pid = atf_utils_fork();
+    if (pid == 0) {
+        fprintf(stdout, "Some output\n");
+        fprintf(stderr, "Some error\n");
+        exit(123);
+    }
+    atf_utils_wait(pid, exitstatus, expout, experr);
+    exit(EXIT_SUCCESS);
+}
+
+ATF_TC_WITHOUT_HEAD(wait__ok);
+ATF_TC_BODY(wait__ok, tc)
+{
+    const pid_t control = fork();
+    ATF_REQUIRE(control != -1);
+    if (control == 0)
+        fork_and_wait(123, "Some output\n", "Some error\n");
+    else {
+        int status;
+        ATF_REQUIRE(waitpid(control, &status, 0) != -1);
+        ATF_REQUIRE(WIFEXITED(status));
+        ATF_REQUIRE_EQ(EXIT_SUCCESS, WEXITSTATUS(status));
+    }
+}
+
+ATF_TC_WITHOUT_HEAD(wait__invalid_exitstatus);
+ATF_TC_BODY(wait__invalid_exitstatus, tc)
+{
+    const pid_t control = fork();
+    ATF_REQUIRE(control != -1);
+    if (control == 0)
+        fork_and_wait(120, "Some output\n", "Some error\n");
+    else {
+        int status;
+        ATF_REQUIRE(waitpid(control, &status, 0) != -1);
+        ATF_REQUIRE(WIFEXITED(status));
+        ATF_REQUIRE_EQ(EXIT_FAILURE, WEXITSTATUS(status));
+    }
+}
+
+ATF_TC_WITHOUT_HEAD(wait__invalid_stdout);
+ATF_TC_BODY(wait__invalid_stdout, tc)
+{
+    const pid_t control = fork();
+    ATF_REQUIRE(control != -1);
+    if (control == 0)
+        fork_and_wait(123, "Some output foo\n", "Some error\n");
+    else {
+        int status;
+        ATF_REQUIRE(waitpid(control, &status, 0) != -1);
+        ATF_REQUIRE(WIFEXITED(status));
+        ATF_REQUIRE_EQ(EXIT_FAILURE, WEXITSTATUS(status));
+    }
+}
+
+ATF_TC_WITHOUT_HEAD(wait__invalid_stderr);
+ATF_TC_BODY(wait__invalid_stderr, tc)
+{
+    const pid_t control = fork();
+    ATF_REQUIRE(control != -1);
+    if (control == 0)
+        fork_and_wait(123, "Some output\n", "Some error foo\n");
+    else {
+        int status;
+        ATF_REQUIRE(waitpid(control, &status, 0) != -1);
+        ATF_REQUIRE(WIFEXITED(status));
+        ATF_REQUIRE_EQ(EXIT_FAILURE, WEXITSTATUS(status));
+    }
+}
+
+ATF_TC_WITHOUT_HEAD(wait__save_stdout);
+ATF_TC_BODY(wait__save_stdout, tc)
+{
+    const pid_t control = fork();
+    ATF_REQUIRE(control != -1);
+    if (control == 0)
+        fork_and_wait(123, "save:my-output.txt", "Some error\n");
+    else {
+        int status;
+        ATF_REQUIRE(waitpid(control, &status, 0) != -1);
+        ATF_REQUIRE(WIFEXITED(status));
+        ATF_REQUIRE_EQ(EXIT_SUCCESS, WEXITSTATUS(status));
+
+        ATF_REQUIRE(atf_utils_compare_file("my-output.txt", "Some output\n"));
+    }
+}
+
+ATF_TC_WITHOUT_HEAD(wait__save_stderr);
+ATF_TC_BODY(wait__save_stderr, tc)
+{
+    const pid_t control = fork();
+    ATF_REQUIRE(control != -1);
+    if (control == 0)
+        fork_and_wait(123, "Some output\n", "save:my-output.txt");
+    else {
+        int status;
+        ATF_REQUIRE(waitpid(control, &status, 0) != -1);
+        ATF_REQUIRE(WIFEXITED(status));
+        ATF_REQUIRE_EQ(EXIT_SUCCESS, WEXITSTATUS(status));
+
+        ATF_REQUIRE(atf_utils_compare_file("my-output.txt", "Some error\n"));
+    }
+}
+
 HEADER_TC(include, "atf-c/utils.h");
 
 ATF_TP_ADD_TCS(tp)
 {
-    ATF_TP_ADD_TC(tp, free_charpp_empty);
-    ATF_TP_ADD_TC(tp, free_charpp_some);
+    ATF_TP_ADD_TC(tp, cat_file__empty);
+    ATF_TP_ADD_TC(tp, cat_file__one_line);
+    ATF_TP_ADD_TC(tp, cat_file__several_lines);
+    ATF_TP_ADD_TC(tp, cat_file__no_newline_eof);
+
+    ATF_TP_ADD_TC(tp, compare_file__empty__match);
+    ATF_TP_ADD_TC(tp, compare_file__empty__not_match);
+    ATF_TP_ADD_TC(tp, compare_file__short__match);
+    ATF_TP_ADD_TC(tp, compare_file__short__not_match);
+    ATF_TP_ADD_TC(tp, compare_file__long__match);
+    ATF_TP_ADD_TC(tp, compare_file__long__not_match);
+
+    ATF_TP_ADD_TC(tp, copy_file__empty);
+    ATF_TP_ADD_TC(tp, copy_file__some_contents);
+
+    ATF_TP_ADD_TC(tp, create_file);
+
+    ATF_TP_ADD_TC(tp, file_exists);
+
+    ATF_TP_ADD_TC(tp, fork);
+
+    ATF_TP_ADD_TC(tp, free_charpp__empty);
+    ATF_TP_ADD_TC(tp, free_charpp__some);
+
+    ATF_TP_ADD_TC(tp, grep_file);
+    ATF_TP_ADD_TC(tp, grep_string);
+
+    ATF_TP_ADD_TC(tp, readline__none);
+    ATF_TP_ADD_TC(tp, readline__some);
+
+    ATF_TP_ADD_TC(tp, redirect__stdout);
+    ATF_TP_ADD_TC(tp, redirect__stderr);
+    ATF_TP_ADD_TC(tp, redirect__other);
+
+    ATF_TP_ADD_TC(tp, wait__ok);
+    ATF_TP_ADD_TC(tp, wait__save_stdout);
+    ATF_TP_ADD_TC(tp, wait__save_stderr);
+    ATF_TP_ADD_TC(tp, wait__invalid_exitstatus);
+    ATF_TP_ADD_TC(tp, wait__invalid_stdout);
+    ATF_TP_ADD_TC(tp, wait__invalid_stderr);
 
     ATF_TP_ADD_TC(tp, include);
 
diff --git a/unit/atf-src/atf-config/Kyuafile b/unit/atf-src/atf-config/Kyuafile
new file mode 100644 (file)
index 0000000..8ba4da8
--- /dev/null
@@ -0,0 +1,5 @@
+syntax("kyuafile", 1)
+
+test_suite("atf")
+
+atf_test_program{name="integration_test"}
index 828ac34f388d6b133168e674e58bc8f4310eb5c4..0f32778aad61d59999d995076c9a53c36a0d3580 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 
 bin_PROGRAMS += atf-config/atf-config
 atf_config_atf_config_SOURCES = atf-config/atf-config.cpp
-atf_config_atf_config_LDADD = libatf-c++.la
+atf_config_atf_config_LDADD = $(ATF_CXX_LIBS)
 dist_man_MANS += atf-config/atf-config.1
 
-tests_atf_config_DATA = atf-config/Atffile
+tests_atf_config_DATA = atf-config/Atffile \
+                        atf-config/Kyuafile
 tests_atf_configdir = $(pkgtestsdir)/atf-config
 EXTRA_DIST += $(tests_atf_config_DATA)
 
index abdbe68d846f533fc5169eff19899807789bf8f6..deae6f6406cbe28fbd83e9a83211d25bd4757bf2 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" Automated Testing Framework (atf)
 .\"
-.\" Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
index 2064bc8518ffb8d36a53beb4f41ee020cbde248f..e5fdca1950e42cd636c066cd10e6bc48ab55ef7f 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 #include <map>
 #include <string>
 
+extern "C" {
+#include "atf-c/defs.h"
+}
+
 #include "atf-c++/config.hpp"
 
 #include "atf-c++/detail/application.hpp"
@@ -67,7 +71,7 @@ atf_config::atf_config(void) :
 }
 
 void
-atf_config::process_option(int ch, const char* arg)
+atf_config::process_option(int ch, const char* arg ATF_DEFS_ATTRIBUTE_UNUSED)
 {
     switch (ch) {
     case 't':
index 12f1371db2780bc6ebe87a850247d3a8e9937552..5d6505a4176ec3436e3dbde88e03cffd8274eac2 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -164,36 +164,6 @@ override_env_body()
     done
 }
 
-# XXX: This does not seem to belong here...
-atf_test_case arch
-arch_head()
-{
-    atf_set "descr" "Tests that the current value of atf_arch is correct" \
-                    "for the corresponding atf_machine"
-}
-arch_body()
-{
-    atf_check -s eq:0 -o save:stdout -e empty atf-config -t atf_arch
-    arch=$(cat stdout)
-    atf_check -s eq:0 -o save:stdout -e empty atf-config -t atf_machine
-    machine=$(cat stdout)
-    echo "Machine type ${machine}, architecture ${arch}"
-
-    case ${machine} in
-        i386|i486|i586|i686)
-            exp_arch=i386
-            ;;
-        x86_64)
-            exp_arch=amd64
-            ;;
-        *)
-            exp_arch=${machine}
-    esac
-    echo "Expected architecture ${exp_arch}"
-
-    atf_check_equal ${arch} ${exp_arch}
-}
-
 atf_init_test_cases()
 {
     atf_add_test_case list_all
@@ -205,8 +175,6 @@ atf_init_test_cases()
     atf_add_test_case query_mixture
 
     atf_add_test_case override_env
-
-    atf_add_test_case arch
 }
 
 # vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4
diff --git a/unit/atf-src/atf-report/Kyuafile b/unit/atf-src/atf-report/Kyuafile
new file mode 100644 (file)
index 0000000..d69e3fa
--- /dev/null
@@ -0,0 +1,6 @@
+syntax("kyuafile", 1)
+
+test_suite("atf")
+
+atf_test_program{name="integration_test"}
+atf_test_program{name="reader_test"}
index b1bedb2cfa6048ddb6d137b4a22e7596f63a863e..e62275e64ee3743f53a69d7ebdc1efba2a5ba3eb 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ bin_PROGRAMS += atf-report/atf-report
 atf_report_atf_report_SOURCES = atf-report/atf-report.cpp \
                                 atf-report/reader.cpp \
                                 atf-report/reader.hpp
-atf_report_atf_report_LDADD = libatf-c++.la
+atf_report_atf_report_LDADD = $(ATF_CXX_LIBS)
 dist_man_MANS += atf-report/atf-report.1
 
 cssdir = $(atf_cssdir)
@@ -46,21 +46,22 @@ xsldir = $(atf_xsldir)
 xsl_DATA = atf-report/tests-results.xsl
 EXTRA_DIST += $(xsl_DATA)
 
-tests_atf_report_DATA = atf-report/Atffile
+tests_atf_report_DATA = atf-report/Atffile \
+                        atf-report/Kyuafile
 tests_atf_reportdir = $(pkgtestsdir)/atf-report
 EXTRA_DIST += $(tests_atf_report_DATA)
 
 tests_atf_report_PROGRAMS = atf-report/fail_helper
 atf_report_fail_helper_SOURCES = atf-report/fail_helper.cpp
-atf_report_fail_helper_LDADD = libatf-c++.la
+atf_report_fail_helper_LDADD = $(ATF_CXX_LIBS)
 
 tests_atf_report_PROGRAMS += atf-report/misc_helpers
 atf_report_misc_helpers_SOURCES = atf-report/misc_helpers.cpp
-atf_report_misc_helpers_LDADD = libatf-c++.la
+atf_report_misc_helpers_LDADD = $(ATF_CXX_LIBS)
 
 tests_atf_report_PROGRAMS += atf-report/pass_helper
 atf_report_pass_helper_SOURCES = atf-report/pass_helper.cpp
-atf_report_pass_helper_LDADD = libatf-c++.la
+atf_report_pass_helper_LDADD = $(ATF_CXX_LIBS)
 
 tests_atf_report_SCRIPTS = atf-report/integration_test
 CLEANFILES += atf-report/integration_test
@@ -74,6 +75,6 @@ tests_atf_report_PROGRAMS += atf-report/reader_test
 atf_report_reader_test_SOURCES = atf-report/reader_test.cpp \
                                  atf-report/reader.cpp
 atf_report_reader_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail
-atf_report_reader_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_report_reader_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
index 410f98d9bd0115bbbfb224d297e6a63805913d4f..df03af0e072eafc7f6e405d6293970bc80e20166 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" Automated Testing Framework (atf)
 .\"
-.\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 29, 2007
+.Dd December 16, 2011
 .Dt ATF-REPORT 1
 .Os
 .Sh NAME
@@ -98,7 +98,7 @@ A machine-parseable Comma-Separated Values (CSV) file.
 This file contains the results for all test cases and test programs.
 Test cases are logged using the following syntax:
 .Bd -literal -offset indent
-tc, test-program, test-case, result[, reason]
+tc, duration, test-program, test-case, result[, reason]
 .Ed
 .Pp
 The
@@ -112,7 +112,7 @@ The last two are always followed by a reason.
 .Pp
 Test programs are logged with the following syntax:
 .Bd -literal -offset indent
-tp, test-program, result[, reason]
+tp, duration, test-program, result[, reason]
 .Ed
 .Pp
 In this case, the
@@ -125,8 +125,10 @@ which refers to test programs in which one or more test cases failed;
 or
 .Sq bogus ,
 which mentions those test programs that failed to execute by some reason.
-The reason file is only available in the last case.
+The reason field is only available in the last case.
 .Pp
+The time required to execute each test case and test program is
+also provided.
 You should not rely on the order of the entries in the resulting output.
 .It ticker
 A user-friendly report that shows the progress of the test suite's
index 525433cb59c0a276923a1ded17009ac37a8e4c8a..359b58b2307a6a7b485f4cbcbb4fb9464d65a190 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 
+extern "C" {
+#include <sys/time.h>
+}
+
+#include <cctype>
 #include <cstdlib>
 #include <fstream>
+#include <iomanip>
 #include <iostream>
 #include <memory>
+#include <sstream>
 #include <utility>
 #include <vector>
 
+#include "atf-c/defs.h"
+
 #include "atf-c++/detail/application.hpp"
 #include "atf-c++/detail/fs.hpp"
 #include "atf-c++/detail/sanity.hpp"
@@ -44,7 +53,7 @@
 
 typedef std::auto_ptr< std::ostream > ostream_ptr;
 
-ostream_ptr
+static ostream_ptr
 open_outfile(const atf::fs::path& path)
 {
     ostream_ptr osp;
@@ -57,6 +66,16 @@ open_outfile(const atf::fs::path& path)
     return osp;
 }
 
+static std::string
+format_tv(struct timeval* tv)
+{
+    std::ostringstream output;
+    output << static_cast< long >(tv->tv_sec) << '.'
+           << std::setfill('0') << std::setw(6)
+           << static_cast< long >(tv->tv_usec);
+    return output.str();
+}
+
 // ------------------------------------------------------------------------
 // The "writer" interface.
 // ------------------------------------------------------------------------
@@ -80,11 +99,12 @@ public:
     virtual void write_info(const std::string&, const std::string&) {}
     virtual void write_ntps(size_t) {}
     virtual void write_tp_start(const std::string&, size_t) {}
-    virtual void write_tp_end(const std::string&) {}
+    virtual void write_tp_end(struct timeval*, const std::string&) {}
     virtual void write_tc_start(const std::string&) {}
     virtual void write_tc_stdout_line(const std::string&) {}
     virtual void write_tc_stderr_line(const std::string&) {}
-    virtual void write_tc_end(const std::string&, const std::string&) {}
+    virtual void write_tc_end(const std::string&, struct timeval*,
+                              const std::string&) {}
     virtual void write_eof(void) {}
 };
 
@@ -115,7 +135,8 @@ public:
 
     virtual
     void
-    write_tp_start(const std::string& name, size_t ntcs)
+    write_tp_start(const std::string& name,
+                   size_t ntcs ATF_DEFS_ATTRIBUTE_UNUSED)
     {
         m_tpname = name;
         m_failed = false;
@@ -123,14 +144,17 @@ public:
 
     virtual
     void
-    write_tp_end(const std::string& reason)
+    write_tp_end(struct timeval* tv, const std::string& reason)
     {
+        const std::string timestamp = format_tv(tv);
+
         if (!reason.empty())
-            (*m_os) << "tp, " << m_tpname << ", bogus, " << reason << "\n";
+            (*m_os) << "tp, " << timestamp << ", " << m_tpname << ", bogus, "
+                    << reason << "\n";
         else if (m_failed)
-            (*m_os) << "tp, " << m_tpname << ", failed\n";
+            (*m_os) << "tp, " << timestamp << ", "<< m_tpname << ", failed\n";
         else
-            (*m_os) << "tp, " << m_tpname << ", passed\n";
+            (*m_os) << "tp, " << timestamp << ", "<< m_tpname << ", passed\n";
     }
 
     virtual
@@ -142,12 +166,13 @@ public:
 
     virtual
     void
-    write_tc_end(const std::string& state, const std::string& reason)
+    write_tc_end(const std::string& state, struct timeval* tv,
+                 const std::string& reason)
     {
-        std::string str = "tc, " + m_tpname + ", " + m_tcname + ", " + state;
+        std::string str = m_tpname + ", " + m_tcname + ", " + state;
         if (!reason.empty())
             str += ", " + reason;
-        (*m_os) << str << "\n";
+        (*m_os) << "tc, " << format_tv(tv) << ", " << str << "\n";
 
         if (state == "failed")
             m_failed = true;
@@ -211,7 +236,7 @@ class ticker_writer : public writer {
     }
 
     void
-    write_tp_end(const std::string& reason)
+    write_tp_end(struct timeval* tv, const std::string& reason)
     {
         using atf::ui::format_text_with_tag;
 
@@ -225,7 +250,7 @@ class ticker_writer : public writer {
                     << "\n";
             m_failed_tps.push_back(m_tpname);
         }
-        (*m_os) << "\n";
+        (*m_os) << "[" << format_tv(tv) << "s]\n\n";
         (*m_os).flush();
 
         m_tpname.clear();
@@ -241,10 +266,13 @@ class ticker_writer : public writer {
     }
 
     void
-    write_tc_end(const std::string& state, const std::string& reason)
+    write_tc_end(const std::string& state, struct timeval* tv,
+                 const std::string& reason)
     {
         std::string str;
 
+        (*m_os) << "[" << format_tv(tv) << "s] ";
+
         if (state == "expected_death" || state == "expected_exit" ||
             state == "expected_failure" || state == "expected_signal" ||
             state == "expected_timeout") {
@@ -267,7 +295,7 @@ class ticker_writer : public writer {
         // XXX Wrap text.  format_text_with_tag does not currently allow
         // to specify the current column, which is needed because we have
         // already printed the tc's name.
-        (*m_os) << str << "\n";
+        (*m_os) << str << '\n';
 
         m_tcname = "";
     }
@@ -354,7 +382,6 @@ public:
 class xml_writer : public writer {
     ostream_ptr m_os;
 
-    size_t m_curtp, m_ntps;
     std::string m_tcname, m_tpname;
 
     static
@@ -368,17 +395,24 @@ class xml_writer : public writer {
     std::string
     elemval(const std::string& str)
     {
-        std::string ostr;
+        std::ostringstream buf;
         for (std::string::const_iterator iter = str.begin();
              iter != str.end(); iter++) {
-            switch (*iter) {
-            case '&': ostr += "&amp;"; break;
-            case '<': ostr += "&lt;"; break;
-            case '>': ostr += "&gt;"; break;
-            default:  ostr += *iter;
+            const int character = static_cast< unsigned char >(*iter);
+            if (character == '&') {
+                buf << "&amp;";
+            } else if (character == '<') {
+                buf << "&lt;";
+            } else if (character == '>') {
+                buf << "&gt;";
+            } else if (std::isalnum(character) || std::ispunct(character) ||
+                       std::isspace(character)) {
+                buf << static_cast< char >(character);
+            } else {
+                buf << "&amp;#" << character << ";";
             }
         }
-        return ostr;
+        return buf.str();
     }
 
     void
@@ -388,16 +422,18 @@ class xml_writer : public writer {
     }
 
     void
-    write_tp_start(const std::string& tp, size_t ntcs)
+    write_tp_start(const std::string& tp,
+                   size_t ntcs ATF_DEFS_ATTRIBUTE_UNUSED)
     {
         (*m_os) << "<tp id=\"" << attrval(tp) << "\">\n";
     }
 
     void
-    write_tp_end(const std::string& reason)
+    write_tp_end(struct timeval* tv, const std::string& reason)
     {
         if (!reason.empty())
             (*m_os) << "<failed>" << elemval(reason) << "</failed>\n";
+        (*m_os) << "<tp-time>" << format_tv(tv) << "</tp-time>";
         (*m_os) << "</tp>\n";
     }
 
@@ -420,7 +456,8 @@ class xml_writer : public writer {
     }
 
     void
-    write_tc_end(const std::string& state, const std::string& reason)
+    write_tc_end(const std::string& state, struct timeval* tv,
+                 const std::string& reason)
     {
         std::string str;
 
@@ -437,6 +474,7 @@ class xml_writer : public writer {
             (*m_os) << "<skipped>" << elemval(reason) << "</skipped>\n";
         } else
             UNREACHABLE;
+        (*m_os) << "<tc-time>" << format_tv(tv) << "</tc-time>";
         (*m_os) << "</tc>\n";
     }
 
@@ -450,7 +488,7 @@ public:
     xml_writer(const atf::fs::path& p) :
         m_os(open_outfile(p))
     {
-        (*m_os) << "<?xml version=\"1.0\"?>\n"
+        (*m_os) << "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
                 << "<!DOCTYPE tests-results PUBLIC "
                    "\"-//NetBSD//DTD ATF Tests Results 0.1//EN\" "
                    "\"http://www.NetBSD.org/XML/atf/tests-results.dtd\">\n\n"
@@ -498,11 +536,11 @@ class converter : public atf::atf_report::atf_tps_reader {
     }
 
     void
-    got_tp_end(const std::string& reason)
+    got_tp_end(struct timeval* tv, const std::string& reason)
     {
         for (outs_vector::iterator iter = m_outs.begin();
              iter != m_outs.end(); iter++)
-            (*iter)->write_tp_end(reason);
+            (*iter)->write_tp_end(tv, reason);
     }
 
     void
@@ -530,11 +568,12 @@ class converter : public atf::atf_report::atf_tps_reader {
     }
 
     void
-    got_tc_end(const std::string& state, const std::string& reason)
+    got_tc_end(const std::string& state, struct timeval* tv,
+               const std::string& reason)
     {
         for (outs_vector::iterator iter = m_outs.begin();
              iter != m_outs.end(); iter++)
-            (*iter)->write_tc_end(state, reason);
+            (*iter)->write_tc_end(state, tv, reason);
     }
 
     void
@@ -638,6 +677,9 @@ atf_report::specific_options(void)
 int
 atf_report::main(void)
 {
+    if (m_argc > 0)
+        throw std::runtime_error("No arguments allowed");
+
     if (m_oflags.empty())
         m_oflags.push_back(fmt_path_pair("ticker", atf::fs::path("-")));
 
index a73fbfe54ba894579ad6614c998357cf97277996..1009f0e479614bbd2f53158c1c2950817d258454 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 3768da47abd1fe70d2304fb12a61f94ed9a38426..b19346a86c3f349301fbdb83280480fb20e5783e 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -117,48 +117,51 @@ EOF
 
 # NO_CHECK_STYLE_BEGIN
     cat >expout <<EOF
-tc, expect_helpers, death_and_exit, expected_death, Exit case
-tc, expect_helpers, death_and_signal, expected_death, Signal case
-tc, expect_helpers, death_but_pass, failed, Test case was expected to terminate abruptly but it continued execution
-tc, expect_helpers, exit_any_and_exit, expected_exit, Call will exit
-tc, expect_helpers, exit_but_pass, failed, Test case was expected to exit cleanly but it continued execution
-tc, expect_helpers, exit_code_and_exit, expected_exit, Call will exit
-tc, expect_helpers, fail_and_fail_check, expected_failure, And fail again: 2 checks failed as expected; see output for more details
-tc, expect_helpers, fail_and_fail_requirement, expected_failure, Fail reason: The failure
-tc, expect_helpers, fail_but_pass, failed, Test case was expecting a failure but none were raised
-tc, expect_helpers, pass_and_pass, passed
-tc, expect_helpers, pass_but_fail_check, failed, 1 checks failed; see output for more details
-tc, expect_helpers, pass_but_fail_requirement, failed, Some reason
-tc, expect_helpers, signal_any_and_signal, expected_signal, Call will signal
-tc, expect_helpers, signal_but_pass, failed, Test case was expected to receive a termination signal but it continued execution
-tc, expect_helpers, signal_no_and_signal, expected_signal, Call will signal
-tc, expect_helpers, timeout_and_hang, expected_timeout, Will overrun
-tc, expect_helpers, timeout_but_pass, failed, Test case was expected to hang but it continued execution
-tp, expect_helpers, failed
+tc, #.#, expect_helpers, death_and_exit, expected_death, Exit case
+tc, #.#, expect_helpers, death_and_signal, expected_death, Signal case
+tc, #.#, expect_helpers, death_but_pass, failed, Test case was expected to terminate abruptly but it continued execution
+tc, #.#, expect_helpers, exit_any_and_exit, expected_exit, Call will exit
+tc, #.#, expect_helpers, exit_but_pass, failed, Test case was expected to exit cleanly but it continued execution
+tc, #.#, expect_helpers, exit_code_and_exit, expected_exit, Call will exit
+tc, #.#, expect_helpers, fail_and_fail_check, expected_failure, And fail again: 2 checks failed as expected; see output for more details
+tc, #.#, expect_helpers, fail_and_fail_requirement, expected_failure, Fail reason: The failure
+tc, #.#, expect_helpers, fail_but_pass, failed, Test case was expecting a failure but none were raised
+tc, #.#, expect_helpers, pass_and_pass, passed
+tc, #.#, expect_helpers, pass_but_fail_check, failed, 1 checks failed; see output for more details
+tc, #.#, expect_helpers, pass_but_fail_requirement, failed, Some reason
+tc, #.#, expect_helpers, signal_any_and_signal, expected_signal, Call will signal
+tc, #.#, expect_helpers, signal_but_pass, failed, Test case was expected to receive a termination signal but it continued execution
+tc, #.#, expect_helpers, signal_no_and_signal, expected_signal, Call will signal
+tc, #.#, expect_helpers, timeout_and_hang, expected_timeout, Will overrun
+tc, #.#, expect_helpers, timeout_but_pass, failed, Test case was expected to hang but it continued execution
+tp, #.#, expect_helpers, failed
 EOF
 # NO_CHECK_STYLE_END
-    atf_check -s eq:0 -o file:expout -e empty -x "atf-report -o csv:- <tps.out"
+    atf_check -s eq:0 -o file:expout -e empty -x \
+        "atf-report -o csv:- <tps.out | " \
+        "sed -E -e 's/[0-9]+.[0-9]{6}, /#.#, /'"
 
 # NO_CHECK_STYLE_BEGIN
     cat >expout <<EOF
 expect_helpers (1/1): 17 test cases
-    death_and_exit: Expected failure: Exit case
-    death_and_signal: Expected failure: Signal case
-    death_but_pass: Failed: Test case was expected to terminate abruptly but it continued execution
-    exit_any_and_exit: Expected failure: Call will exit
-    exit_but_pass: Failed: Test case was expected to exit cleanly but it continued execution
-    exit_code_and_exit: Expected failure: Call will exit
-    fail_and_fail_check: Expected failure: And fail again: 2 checks failed as expected; see output for more details
-    fail_and_fail_requirement: Expected failure: Fail reason: The failure
-    fail_but_pass: Failed: Test case was expecting a failure but none were raised
-    pass_and_pass: Passed.
-    pass_but_fail_check: Failed: 1 checks failed; see output for more details
-    pass_but_fail_requirement: Failed: Some reason
-    signal_any_and_signal: Expected failure: Call will signal
-    signal_but_pass: Failed: Test case was expected to receive a termination signal but it continued execution
-    signal_no_and_signal: Expected failure: Call will signal
-    timeout_and_hang: Expected failure: Will overrun
-    timeout_but_pass: Failed: Test case was expected to hang but it continued execution
+    death_and_exit: [#.#s] Expected failure: Exit case
+    death_and_signal: [#.#s] Expected failure: Signal case
+    death_but_pass: [#.#s] Failed: Test case was expected to terminate abruptly but it continued execution
+    exit_any_and_exit: [#.#s] Expected failure: Call will exit
+    exit_but_pass: [#.#s] Failed: Test case was expected to exit cleanly but it continued execution
+    exit_code_and_exit: [#.#s] Expected failure: Call will exit
+    fail_and_fail_check: [#.#s] Expected failure: And fail again: 2 checks failed as expected; see output for more details
+    fail_and_fail_requirement: [#.#s] Expected failure: Fail reason: The failure
+    fail_but_pass: [#.#s] Failed: Test case was expecting a failure but none were raised
+    pass_and_pass: [#.#s] Passed.
+    pass_but_fail_check: [#.#s] Failed: 1 checks failed; see output for more details
+    pass_but_fail_requirement: [#.#s] Failed: Some reason
+    signal_any_and_signal: [#.#s] Expected failure: Call will signal
+    signal_but_pass: [#.#s] Failed: Test case was expected to receive a termination signal but it continued execution
+    signal_no_and_signal: [#.#s] Expected failure: Call will signal
+    timeout_and_hang: [#.#s] Expected failure: Will overrun
+    timeout_but_pass: [#.#s] Failed: Test case was expected to hang but it continued execution
+[#.#s]
 
 Test cases for known bugs:
     expect_helpers:death_and_exit: Exit case
@@ -182,7 +185,8 @@ Summary for 1 test programs:
 EOF
 # NO_CHECK_STYLE_END
     atf_check -s eq:0 -o file:expout -e empty -x \
-        "atf-report -o ticker:- <tps.out"
+        "atf-report -o ticker:- <tps.out | " \
+        "sed -E -e 's/[0-9]+.[0-9]{6}/#.#/'"
 
     # Just ensure that this does not crash for now...
     atf_check -s eq:0 -o ignore -e empty -x "atf-report -o xml:- <tps.out"
@@ -253,19 +257,20 @@ output_csv_body()
 
 # NO_CHECK_STYLE_BEGIN
     cat >expout <<EOF
-tc, dir1/tp1, main, passed
-tp, dir1/tp1, passed
-tc, dir1/tp2, main, failed, This always fails
-tp, dir1/tp2, failed
-tc, tp3, main, passed
-tp, tp3, passed
-tc, tp4, main, failed, This always fails
-tp, tp4, failed
-tp, tp5, bogus, Invalid format for test case list: 1: Unexpected token \`<<NEWLINE>>'; expected \`:'
+tc, #.#, dir1/tp1, main, passed
+tp, #.#, dir1/tp1, passed
+tc, #.#, dir1/tp2, main, failed, This always fails
+tp, #.#, dir1/tp2, failed
+tc, #.#, tp3, main, passed
+tp, #.#, tp3, passed
+tc, #.#, tp4, main, failed, This always fails
+tp, #.#, tp4, failed
+tp, #.#, tp5, bogus, Invalid format for test case list: 1: Unexpected token \`<<NEWLINE>>'; expected \`:'
 EOF
 # NO_CHECK_STYLE_END
 
-    atf_check -s eq:0 -o file:expout -e empty -x 'atf-report -o csv:- <tps.out'
+    atf_check -s eq:0 -o file:expout -e empty -x \
+        "atf-report -o csv:- <tps.out | sed -E -e 's/[0-9]+.[0-9]{6}, /#.#, /'"
 }
 
 atf_test_case output_ticker
@@ -281,19 +286,24 @@ output_ticker_body()
 # NO_CHECK_STYLE_BEGIN
     cat >expout <<EOF
 dir1/tp1 (1/5): 1 test cases
-    main: Passed.
+    main: [#.#s] Passed.
+[#.#s]
 
 dir1/tp2 (2/5): 1 test cases
-    main: Failed: This always fails
+    main: [#.#s] Failed: This always fails
+[#.#s]
 
 tp3 (3/5): 1 test cases
-    main: Passed.
+    main: [#.#s] Passed.
+[#.#s]
 
 tp4 (4/5): 1 test cases
-    main: Failed: This always fails
+    main: [#.#s] Failed: This always fails
+[#.#s]
 
 tp5 (5/5): 0 test cases
 tp5: BOGUS TEST PROGRAM: Cannot trust its results because of \`Invalid format for test case list: 1: Unexpected token \`<<NEWLINE>>'; expected \`:''
+[#.#s]
 
 Failed (bogus) test programs:
     tp5
@@ -308,7 +318,8 @@ Summary for 5 test programs:
     0 skipped test cases.
 EOF
 
-    atf_check -s eq:0 -o file:expout -e empty -x 'atf-report -o ticker:- <tps.out'
+    atf_check -s eq:0 -o file:expout -e empty -x \
+        "atf-report -o ticker:- <tps.out | sed -E -e 's/[0-9]+.[0-9]{6}/#.#/'"
 }
 # NO_CHECK_STYLE_END
 
@@ -324,7 +335,7 @@ output_xml_body()
 
 # NO_CHECK_STYLE_BEGIN
     cat >expout <<EOF
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="ISO-8859-1"?>
 <!DOCTYPE tests-results PUBLIC "-//NetBSD//DTD ATF Tests Results 0.1//EN" "http://www.NetBSD.org/XML/atf/tests-results.dtd">
 
 <tests-results>
@@ -332,32 +343,33 @@ output_xml_body()
 <tp id="dir1/tp1">
 <tc id="main">
 <passed />
-</tc>
-</tp>
+<tc-time>#.#</tc-time></tc>
+<tp-time>#.#</tp-time></tp>
 <tp id="dir1/tp2">
 <tc id="main">
 <failed>This always fails</failed>
-</tc>
-</tp>
+<tc-time>#.#</tc-time></tc>
+<tp-time>#.#</tp-time></tp>
 <tp id="tp3">
 <tc id="main">
 <passed />
-</tc>
-</tp>
+<tc-time>#.#</tc-time></tc>
+<tp-time>#.#</tp-time></tp>
 <tp id="tp4">
 <tc id="main">
 <failed>This always fails</failed>
-</tc>
-</tp>
+<tc-time>#.#</tc-time></tc>
+<tp-time>#.#</tp-time></tp>
 <tp id="tp5">
 <failed>Invalid format for test case list: 1: Unexpected token \`&lt;&lt;NEWLINE&gt;&gt;'; expected \`:'</failed>
-</tp>
+<tp-time>#.#</tp-time></tp>
 <info class="endinfo">Another value</info>
 </tests-results>
 EOF
 # NO_CHECK_STYLE_END
 
-    atf_check -s eq:0 -o file:expout -e empty -x 'atf-report -o xml:- <tps.out'
+    atf_check -s eq:0 -o file:expout -e empty -x \
+        "atf-report -o xml:- < tps.out | sed -E -e 's/>[0-9]+.[0-9]{6}</>#.#</'"
 }
 
 atf_test_case output_xml_space
@@ -380,7 +392,7 @@ EOF
 
 # NO_CHECK_STYLE_BEGIN
     cat >expout <<EOF
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="ISO-8859-1"?>
 <!DOCTYPE tests-results PUBLIC "-//NetBSD//DTD ATF Tests Results 0.1//EN" "http://www.NetBSD.org/XML/atf/tests-results.dtd">
 
 <tests-results>
@@ -400,15 +412,25 @@ EOF
 <so> </so>
 <so> EOF</so>
 <passed />
-</tc>
-</tp>
+<tc-time>#.#</tc-time></tc>
+<tp-time>#.#</tp-time></tp>
 <info class="endinfo">Another value</info>
 </tests-results>
 EOF
 # NO_CHECK_STYLE_END
 
     run_helpers
-    atf_check -s eq:0 -o file:expout -e empty -x 'atf-report -o xml:- <tps.out'
+    atf_check -s eq:0 -o file:expout -e empty -x \
+        "atf-report -o xml:- <tps.out | sed -E -e 's/>[0-9]+.[0-9]{6}</>#.#</'"
+}
+
+atf_test_case too_many_args
+too_many_args_body()
+{
+    cat >experr <<EOF
+atf-report: ERROR: No arguments allowed
+EOF
+    atf_check -s eq:1 -o empty -e file:experr atf-report foo
 }
 
 atf_init_test_cases()
@@ -420,6 +442,7 @@ atf_init_test_cases()
     atf_add_test_case output_ticker
     atf_add_test_case output_xml
     atf_add_test_case output_xml_space
+    atf_add_test_case too_many_args
 }
 
 # vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4
index e13303f74fcad0cd5d7e4cc161f55e1b736bce96..6f14ce4cf1ce7a5c6c9610377f7e4256a0216c3e 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 49f1e3217ac0cc81ea9dc1444852862b11aa00fe..b752b131b387230cc5732ed6e7d34e55b9d19523 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 583f927f7d10ad3a359a73a69d4318b81044b038..8f5fde791c8ab9a91b9e39835c5a7353a2f1e850 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 
+extern "C" {
+#include <sys/time.h>
+}
+
 #include <map>
 #include <sstream>
 #include <utility>
 
+#include "atf-c/defs.h"
+
 #include "atf-c++/detail/parser.hpp"
 #include "atf-c++/detail/sanity.hpp"
 #include "atf-c++/detail/text.hpp"
@@ -44,12 +50,12 @@ namespace impl = atf::atf_report;
 // Auxiliary functions.
 // ------------------------------------------------------------------------
 
-static
-size_t
-string_to_size_t(const std::string& str)
+template< typename Type >
+Type
+string_to_int(const std::string& str)
 {
     std::istringstream ss(str);
-    size_t s;
+    Type s;
     ss >> s;
 
     return s;
@@ -112,6 +118,24 @@ public:
 
 } // namespace atf_tps
 
+struct timeval
+read_timeval(atf::parser::parser< atf_tps::tokenizer >& parser)
+{
+    using namespace atf_tps;
+
+    atf::parser::token t = parser.expect(text_type, "timestamp");
+    const std::string::size_type divider = t.text().find('.');
+    if (divider == std::string::npos || divider == 0 ||
+        divider == t.text().length() - 1)
+        throw atf::parser::parse_error(t.lineno(),
+                                       "Malformed timestamp value " + t.text());
+
+    struct timeval tv;
+    tv.tv_sec = string_to_int< long >(t.text().substr(0, divider));
+    tv.tv_usec = string_to_int< long >(t.text().substr(divider + 1));
+    return tv;
+}
+
 // ------------------------------------------------------------------------
 // The "atf_tps_reader" class.
 // ------------------------------------------------------------------------
@@ -126,44 +150,54 @@ impl::atf_tps_reader::~atf_tps_reader(void)
 }
 
 void
-impl::atf_tps_reader::got_info(const std::string& what,
-                               const std::string& val)
+impl::atf_tps_reader::got_info(
+    const std::string& what ATF_DEFS_ATTRIBUTE_UNUSED,
+    const std::string& val ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
 void
-impl::atf_tps_reader::got_ntps(size_t ntps)
+impl::atf_tps_reader::got_ntps(size_t ntps ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
 void
-impl::atf_tps_reader::got_tp_start(const std::string& tp, size_t ntcs)
+impl::atf_tps_reader::got_tp_start(
+    const std::string& tp ATF_DEFS_ATTRIBUTE_UNUSED,
+    size_t ntcs ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
 void
-impl::atf_tps_reader::got_tp_end(const std::string& reason)
+impl::atf_tps_reader::got_tp_end(
+    struct timeval* tv ATF_DEFS_ATTRIBUTE_UNUSED,
+    const std::string& reason ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
 void
-impl::atf_tps_reader::got_tc_start(const std::string& tcname)
+impl::atf_tps_reader::got_tc_start(
+    const std::string& tcname ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
 void
-impl::atf_tps_reader::got_tc_stdout_line(const std::string& line)
+impl::atf_tps_reader::got_tc_stdout_line(
+    const std::string& line ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
 void
-impl::atf_tps_reader::got_tc_stderr_line(const std::string& line)
+impl::atf_tps_reader::got_tc_stderr_line(
+    const std::string& line ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
 void
-impl::atf_tps_reader::got_tc_end(const std::string& state,
-                                 const std::string& reason)
+impl::atf_tps_reader::got_tc_end(
+    const std::string& state ATF_DEFS_ATTRIBUTE_UNUSED,
+    struct timeval* tv ATF_DEFS_ATTRIBUTE_UNUSED,
+    const std::string& reason ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
@@ -206,13 +240,17 @@ impl::atf_tps_reader::read_tp(void* pptr)
 
     t = p.expect(colon_type, "`:'");
 
+    struct timeval s1 = read_timeval(p);
+
+    t = p.expect(comma_type, "`,'");
+
     t = p.expect(text_type, "test program name");
     std::string tpname = t.text();
 
     t = p.expect(comma_type, "`,'");
 
     t = p.expect(text_type, "number of test programs");
-    size_t ntcs = string_to_size_t(t.text());
+    size_t ntcs = string_to_int< std::size_t >(t.text());
 
     t = p.expect(nl_type, "new line");
 
@@ -232,6 +270,13 @@ impl::atf_tps_reader::read_tp(void* pptr)
 
     t = p.expect(colon_type, "`:'");
 
+    struct timeval s2 = read_timeval(p);
+
+    struct timeval s3;
+    timersub(&s2, &s1, &s3);
+
+    t = p.expect(comma_type, "`,'");
+
     t = p.expect(text_type, "test program name");
     if (t.text() != tpname)
         throw parse_error(t.lineno(), "Test program name used in "
@@ -249,7 +294,7 @@ impl::atf_tps_reader::read_tp(void* pptr)
         t = p.next();
     }
 
-    ATF_PARSER_CALLBACK(p, got_tp_end(reason));
+    ATF_PARSER_CALLBACK(p, got_tp_end(&s3, reason));
 }
 
 void
@@ -266,8 +311,13 @@ impl::atf_tps_reader::read_tc(void* pptr)
 
     t = p.expect(colon_type, "`:'");
 
+    struct timeval s1 = read_timeval(p);
+
+    t = p.expect(comma_type, "`,'");
+
     t = p.expect(text_type, "test case name");
     std::string tcname = t.text();
+
     ATF_PARSER_CALLBACK(p, got_tc_start(tcname));
 
     t = p.expect(nl_type, "new line");
@@ -297,6 +347,13 @@ impl::atf_tps_reader::read_tc(void* pptr)
 
     t = p.expect(colon_type, "`:'");
 
+    struct timeval s2 = read_timeval(p);
+
+    struct timeval s3;
+    timersub(&s2, &s1, &s3);
+
+    t = p.expect(comma_type, "`,'");
+
     t = p.expect(text_type, "test case name");
     if (t.text() != tcname)
         throw parse_error(t.lineno(),
@@ -310,7 +367,7 @@ impl::atf_tps_reader::read_tc(void* pptr)
         skipped_type, "expected_{death,exit,failure,signal,timeout}, failed, "
         "passed or skipped");
     if (t.type() == passed_type) {
-        ATF_PARSER_CALLBACK(p, got_tc_end("passed", ""));
+        ATF_PARSER_CALLBACK(p, got_tc_end("passed", &s3, ""));
     } else {
         std::string state;
         if (t.type() == expected_death_type) state = "expected_death";
@@ -327,7 +384,7 @@ impl::atf_tps_reader::read_tc(void* pptr)
         if (reason.empty())
             throw parse_error(t.lineno(), "Empty reason for " + state +
                 " test case result");
-        ATF_PARSER_CALLBACK(p, got_tc_end(state, reason));
+        ATF_PARSER_CALLBACK(p, got_tc_end(state, &s3, reason));
     }
 
     t = p.expect(nl_type, "new line");
@@ -341,7 +398,7 @@ impl::atf_tps_reader::read(void)
 
     std::pair< size_t, atf::parser::headers_map > hml =
         atf::parser::read_headers(m_is, 1);
-    atf::parser::validate_content_type(hml.second, "application/X-atf-tps", 2);
+    atf::parser::validate_content_type(hml.second, "application/X-atf-tps", 3);
 
     tokenizer tkz(m_is, hml.first);
     atf::parser::parser< tokenizer > p(tkz);
@@ -356,7 +413,7 @@ impl::atf_tps_reader::read(void)
         t = p.expect(colon_type, "`:'");
 
         t = p.expect(text_type, "number of test programs");
-        size_t ntps = string_to_size_t(t.text());
+        size_t ntps = string_to_int< std::size_t >(t.text());
         ATF_PARSER_CALLBACK(p, got_ntps(ntps));
 
         t = p.expect(nl_type, "new line");
index fc6ce4735021dbdd599fcc5a32d25e8dc0cb8232..2ef038a0de4f6e3d78dcfb91cbdea3670a45e022 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 #if !defined(_ATF_REPORT_FORMATS_HPP_)
 #define _ATF_REPORT_FORMATS_HPP_
 
+extern "C" {
+#include <sys/time.h>
+}
+
 #include <istream>
 #include <string>
 
@@ -65,12 +69,13 @@ protected:
     virtual void got_info(const std::string&, const std::string&);
     virtual void got_ntps(size_t);
     virtual void got_tp_start(const std::string&, size_t);
-    virtual void got_tp_end(const std::string&);
+    virtual void got_tp_end(struct timeval*, const std::string&);
 
     virtual void got_tc_start(const std::string&);
     virtual void got_tc_stdout_line(const std::string&);
     virtual void got_tc_stderr_line(const std::string&);
-    virtual void got_tc_end(const std::string&, const std::string&);
+    virtual void got_tc_end(const std::string&, struct timeval*,
+                            const std::string&);
     virtual void got_eof(void);
 
 public:
index 482f8acf51514e144529395c7d576290d4615a04..59e4059efccc1f9e1eb1fea0dd58bbeac411910b 100644 (file)
@@ -65,7 +65,8 @@ class tps_reader : protected impl::atf_tps_reader {
     }
 
     void
-    got_tp_end(const std::string& reason)
+    got_tp_end(struct timeval* tv ATF_DEFS_ATTRIBUTE_UNUSED,
+               const std::string& reason)
     {
         m_calls.push_back("got_tp_end(" + reason + ")");
     }
@@ -77,7 +78,9 @@ class tps_reader : protected impl::atf_tps_reader {
     }
 
     void
-    got_tc_end(const std::string& state, const std::string& reason)
+    got_tc_end(const std::string& state,
+               struct timeval* tv ATF_DEFS_ATTRIBUTE_UNUSED,
+               const std::string& reason)
     {
         const std::string r = state + (reason.empty() ? "" : ", " + reason);
         m_calls.push_back("got_tc_end(" + r + ")");
@@ -120,7 +123,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_1);
 ATF_TEST_CASE_BODY(tps_1)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count: 0\n"
     ;
@@ -142,13 +145,13 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_2);
 ATF_TEST_CASE_BODY(tps_2)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count: 2\n"
-        "tp-start: first-prog, 0\n"
-        "tp-end: first-prog\n"
-        "tp-start: second-prog, 0\n"
-        "tp-end: second-prog, This program failed\n"
+        "tp-start: 123.456, first-prog, 0\n"
+        "tp-end: 123.567, first-prog\n"
+        "tp-start: 123.678, second-prog, 0\n"
+        "tp-end: 123.789, second-prog, This program failed\n"
     ;
 
     const char* exp_calls[] = {
@@ -172,37 +175,37 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_3);
 ATF_TEST_CASE_BODY(tps_3)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count: 2\n"
-        "tp-start: first-prog, 3\n"
-        "tc-start: first-test\n"
-        "tc-end: first-test, passed\n"
-        "tc-start: second-test\n"
-        "tc-end: second-test, skipped, Testing skipped reason\n"
-        "tc-start: third-test\n"
-        "tc-end: third-test, failed, Testing failed reason\n"
-        "tp-end: first-prog\n"
-        "tp-start: second-prog, 3\n"
-        "tc-start: first-test\n"
+        "tp-start: 123.123, first-prog, 3\n"
+        "tc-start: 123.234, first-test\n"
+        "tc-end: 123.345, first-test, passed\n"
+        "tc-start: 123.456, second-test\n"
+        "tc-end: 123.567, second-test, skipped, Testing skipped reason\n"
+        "tc-start: 123.678, third.test\n"
+        "tc-end: 123.789, third.test, failed, Testing failed reason\n"
+        "tp-end: 123.890, first-prog\n"
+        "tp-start: 124.901, second-prog, 3\n"
+        "tc-start: 124.1012, first-test\n"
         "tc-so:first stdout line for 1st test\n"
         "tc-se:first stderr line for 1st test\n"
         "tc-so:second stdout line for 1st test\n"
         "tc-se:second stderr line for 1st test\n"
-        "tc-end: first-test, passed\n"
-        "tc-start: second-test\n"
+        "tc-end: 124.1123, first-test, passed\n"
+        "tc-start: 124.1234, second-test\n"
         "tc-so:first stdout line for 2nd test\n"
         "tc-se:first stderr line for 2nd test\n"
         "tc-so:second stdout line for 2nd test\n"
         "tc-se:second stderr line for 2nd test\n"
-        "tc-end: second-test, skipped, Testing skipped reason\n"
-        "tc-start: third-test\n"
+        "tc-end: 124.1345, second-test, skipped, Testing skipped reason\n"
+        "tc-start: 124.1456, third.test\n"
         "tc-so:first stdout line for 3rd test\n"
         "tc-se:first stderr line for 3rd test\n"
         "tc-so:second stdout line for 3rd test\n"
         "tc-se:second stderr line for 3rd test\n"
-        "tc-end: third-test, failed, Testing failed reason\n"
-        "tp-end: second-prog, This program failed\n"
+        "tc-end: 124.1567, third.test, failed, Testing failed reason\n"
+        "tp-end: 124.1678, second-prog, This program failed\n"
     ;
 
     const char* exp_calls[] = {
@@ -212,7 +215,7 @@ ATF_TEST_CASE_BODY(tps_3)
         "got_tc_end(passed)",
         "got_tc_start(second-test)",
         "got_tc_end(skipped, Testing skipped reason)",
-        "got_tc_start(third-test)",
+        "got_tc_start(third.test)",
         "got_tc_end(failed, Testing failed reason)",
         "got_tp_end()",
         "got_tp_start(second-prog, 3)",
@@ -228,7 +231,7 @@ ATF_TEST_CASE_BODY(tps_3)
         "got_tc_stdout_line(second stdout line for 2nd test)",
         "got_tc_stderr_line(second stderr line for 2nd test)",
         "got_tc_end(skipped, Testing skipped reason)",
-        "got_tc_start(third-test)",
+        "got_tc_start(third.test)",
         "got_tc_stdout_line(first stdout line for 3rd test)",
         "got_tc_stderr_line(first stderr line for 3rd test)",
         "got_tc_stdout_line(second stdout line for 3rd test)",
@@ -250,40 +253,40 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_4);
 ATF_TEST_CASE_BODY(tps_4)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "info: a, foo\n"
         "info: b, bar\n"
         "info: c, baz\n"
         "tps-count: 2\n"
-        "tp-start: first-prog, 3\n"
-        "tc-start: first-test\n"
-        "tc-end: first-test, passed\n"
-        "tc-start: second-test\n"
-        "tc-end: second-test, skipped, Testing skipped reason\n"
-        "tc-start: third-test\n"
-        "tc-end: third-test, failed, Testing failed reason\n"
-        "tp-end: first-prog\n"
-        "tp-start: second-prog, 3\n"
-        "tc-start: first-test\n"
+        "tp-start: 234.1, first-prog, 3\n"
+        "tc-start: 234.12, first-test\n"
+        "tc-end: 234.23, first-test, passed\n"
+        "tc-start: 234.34, second-test\n"
+        "tc-end: 234.45, second-test, skipped, Testing skipped reason\n"
+        "tc-start: 234.56, third-test\n"
+        "tc-end: 234.67, third-test, failed, Testing failed reason\n"
+        "tp-end: 234.78, first-prog\n"
+        "tp-start: 234.89, second-prog, 3\n"
+        "tc-start: 234.90, first-test\n"
         "tc-so:first stdout line for 1st test\n"
         "tc-se:first stderr line for 1st test\n"
         "tc-so:second stdout line for 1st test\n"
         "tc-se:second stderr line for 1st test\n"
-        "tc-end: first-test, passed\n"
-        "tc-start: second-test\n"
+        "tc-end: 234.101, first-test, passed\n"
+        "tc-start: 234.112, second-test\n"
         "tc-so:first stdout line for 2nd test\n"
         "tc-se:first stderr line for 2nd test\n"
         "tc-so:second stdout line for 2nd test\n"
         "tc-se:second stderr line for 2nd test\n"
-        "tc-end: second-test, skipped, Testing skipped reason\n"
-        "tc-start: third-test\n"
+        "tc-end: 234.123, second-test, skipped, Testing skipped reason\n"
+        "tc-start: 234.134, third-test\n"
         "tc-so:first stdout line for 3rd test\n"
         "tc-se:first stderr line for 3rd test\n"
         "tc-so:second stdout line for 3rd test\n"
         "tc-se:second stderr line for 3rd test\n"
-        "tc-end: third-test, failed, Testing failed reason\n"
-        "tp-end: second-prog, This program failed\n"
+        "tc-end: 234.145, third-test, failed, Testing failed reason\n"
+        "tp-end: 234.156, second-prog, This program failed\n"
         "info: d, foo\n"
         "info: e, bar\n"
         "info: f, baz\n"
@@ -340,11 +343,11 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_5);
 ATF_TEST_CASE_BODY(tps_5)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count: 1\n"
-        "tp-start: the-prog, 1\n"
-        "tc-start: the-test\n"
+        "tp-start: 345.123, the-prog, 1\n"
+        "tc-start: 345.134, the-test\n"
         "tc-so:--- a   2007-11-04 14:00:41.000000000 +0100\n"
         "tc-so:+++ b   2007-11-04 14:00:48.000000000 +0100\n"
         "tc-so:@@ -1,7 +1,7 @@\n"
@@ -357,8 +360,8 @@ ATF_TEST_CASE_BODY(tps_5)
         "tc-so:+Second modified line.\n"
         "tc-so: \n"
         "tc-so: EOF\n"
-        "tc-end: the-test, passed\n"
-        "tp-end: the-prog\n"
+        "tc-end: 345.145, the-test, passed\n"
+        "tp-end: 345.156, the-prog\n"
     ;
 
     // NO_CHECK_STYLE_BEGIN
@@ -396,27 +399,27 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_6);
 ATF_TEST_CASE_BODY(tps_6)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count: 1\n"
-        "tp-start: the-prog, 8\n"
-        "tc-start: one\n"
-        "tc-end: one, expected_death, The reason\n"
-        "tc-start: two\n"
-        "tc-end: two, expected_exit, This would be an exit\n"
-        "tc-start: three\n"
-        "tc-end: three, expected_failure, And this a failure\n"
-        "tc-start: four\n"
-        "tc-end: four, expected_signal, And this a signal\n"
-        "tc-start: five\n"
-        "tc-end: five, failed, Another reason\n"
-        "tc-start: six\n"
-        "tc-end: six, passed\n"
-        "tc-start: seven\n"
-        "tc-end: seven, skipped, Skipping it\n"
-        "tc-start: eight\n"
-        "tc-end: eight, expected_timeout, Some hang reason\n"
-        "tp-end: the-prog\n"
+        "tp-start: 321.1, the-prog, 8\n"
+        "tc-start: 321.12, one\n"
+        "tc-end: 321.23, one, expected_death, The reason\n"
+        "tc-start: 321.34, two\n"
+        "tc-end: 321.45, two, expected_exit, This would be an exit\n"
+        "tc-start: 321.56, three\n"
+        "tc-end: 321.67, three, expected_failure, And this a failure\n"
+        "tc-start: 321.78, four\n"
+        "tc-end: 321.89, four, expected_signal, And this a signal\n"
+        "tc-start: 321.90, five\n"
+        "tc-end: 321.101, five, failed, Another reason\n"
+        "tc-start: 321.112, six\n"
+        "tc-end: 321.123, six, passed\n"
+        "tc-start: 321.134, seven\n"
+        "tc-end: 321.145, seven, skipped, Skipping it\n"
+        "tc-start: 321.156, eight\n"
+        "tc-end: 321.167, eight, expected_timeout, Some hang reason\n"
+        "tp-end: 321.178, the-prog\n"
     ;
 
     // NO_CHECK_STYLE_BEGIN
@@ -457,7 +460,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_50);
 ATF_TEST_CASE_BODY(tps_50)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "foo\n"
     ;
@@ -478,7 +481,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_51);
 ATF_TEST_CASE_BODY(tps_51)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count\n"
     ;
@@ -499,7 +502,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_52);
 ATF_TEST_CASE_BODY(tps_52)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count:\n"
     ;
@@ -520,7 +523,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_53);
 ATF_TEST_CASE_BODY(tps_53)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count: 1\n"
         "foo\n"
@@ -543,24 +546,36 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_54);
 ATF_TEST_CASE_BODY(tps_54)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count: 1\n"
         "foo\n"
         "tp-start\n"
         "tp-start:\n"
-        "tp-start: foo\n"
-        "tp-start: foo,\n"
-        "tp-start: foo, 0\n"
+        "tp-start: 123\n"
+        "tp-start: 123.\n"
+        "tp-start: 123.456\n"
+        "tp-start: 123.456,\n"
+        "tp-start: 123.456, foo\n"
+        "tp-start: 123.456, foo,\n"
+        "tp-start: 123.456, foo, 0\n"
         "bar\n"
-        "tp-start: foo, 0\n"
+        "tp-start: 456.789, foo, 0\n"
         "tp-end\n"
-        "tp-start: foo, 0\n"
+        "tp-start: 777.777, foo, 0\n"
         "tp-end:\n"
-        "tp-start: foo, 0\n"
-        "tp-end: bar\n"
-        "tp-start: foo, 0\n"
-        "tp-end: foo,\n"
+        "tp-start: 777.777, foo, 0\n"
+        "tp-end: 777\n"
+        "tp-start: 777.777, foo, 0\n"
+        "tp-end: 777.\n"
+        "tp-start: 777.777, foo, 0\n"
+        "tp-end: 777.888\n"
+        "tp-start: 777.777, foo, 0\n"
+        "tp-end: 777.888, \n"
+        "tp-start: 777.777, foo, 0\n"
+        "tp-end: 777.888, bar\n"
+        "tp-start: 777.777, foo, 0\n"
+        "tp-end: 777.888, foo,\n"
     ;
 
     const char* exp_calls[] = {
@@ -571,14 +586,23 @@ ATF_TEST_CASE_BODY(tps_54)
     const char* exp_errors[] = {
         "4: Unexpected token `foo'; expected start of test program",
         "5: Unexpected token `<<NEWLINE>>'; expected `:'",
-        "6: Unexpected token `<<NEWLINE>>'; expected test program name",
-        "7: Unexpected token `<<NEWLINE>>'; expected `,'",
-        "8: Unexpected token `<<NEWLINE>>'; expected number of test programs",
-        "10: Unexpected token `bar'; expected end of test program",
-        "12: Unexpected token `<<NEWLINE>>'; expected `:'",
-        "14: Unexpected token `<<NEWLINE>>'; expected test program name",
-        "16: Test program name used in terminator does not match opening",
-        "18: Empty reason for failed test program",
+        "6: Unexpected token `<<NEWLINE>>'; expected timestamp",
+        "7: Malformed timestamp value 123",
+        "8: Malformed timestamp value 123.",
+        "9: Unexpected token `<<NEWLINE>>'; expected `,'",
+        "10: Unexpected token `<<NEWLINE>>'; expected test program name",
+        "11: Unexpected token `<<NEWLINE>>'; expected `,'",
+        "12: Unexpected token `<<NEWLINE>>'; expected number of test programs",
+        "14: Unexpected token `bar'; expected end of test program",
+        "16: Unexpected token `<<NEWLINE>>'; expected `:'",
+        "18: Unexpected token `<<NEWLINE>>'; expected timestamp",
+        "20: Malformed timestamp value 777",
+        "22: Malformed timestamp value 777.",
+        "24: Unexpected token `<<NEWLINE>>'; expected `,'",
+
+        "26: Unexpected token `<<NEWLINE>>'; expected test program name",
+        "28: Test program name used in terminator does not match opening",
+        "30: Empty reason for failed test program",
         NULL
     };
 
@@ -589,26 +613,38 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_55);
 ATF_TEST_CASE_BODY(tps_55)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count: 1\n"
-        "tp-start: foo, 1\n"
+        "tp-start: 100.200, foo, 1\n"
         "foo\n"
         "tc-start\n"
         "tc-start:\n"
-        "tc-start: foo\n"
+        "tc-start: 111\n"
+        "tc-start: 111.\n"
+        "tc-start: 111.222\n"
+        "tc-start: 111.222,\n"
+        "tc-start: 111.222, foo\n"
         "bar\n"
-        "tc-start: foo\n"
+        "tc-start: 111.333, foo\n"
         "tc-end\n"
-        "tc-start: foo\n"
+        "tc-start: 111.444, foo\n"
         "tc-end:\n"
-        "tc-start: foo\n"
-        "tc-end: bar\n"
-        "tc-start: foo\n"
-        "tc-end: foo\n"
-        "tc-start: foo\n"
-        "tc-end: foo,\n"
-        "tp-end: foo\n"
+        "tc-start: 111.444, foo\n"
+        "tc-end: 111\n"
+        "tc-start: 111.444, foo\n"
+        "tc-end: 111.\n"
+        "tc-start: 111.444, foo\n"
+        "tc-end: 111.555\n"
+        "tc-start: 111.444, foo\n"
+        "tc-end: 111.555, \n"
+        "tc-start: 111.444, foo\n"
+        "tc-end: 111.555, bar\n"
+        "tc-start: 111.444, foo\n"
+        "tc-end: 111.555, foo\n"
+        "tc-start: 111.444, foo\n"
+        "tc-end: 111.555, foo,\n"
+        "tp-end: 111.666, foo\n"
     ;
 
     const char* exp_calls[] = {
@@ -621,14 +657,22 @@ ATF_TEST_CASE_BODY(tps_55)
     const char* exp_errors[] = {
         "5: Unexpected token `foo'; expected start of test case",
         "6: Unexpected token `<<NEWLINE>>'; expected `:'",
-        "7: Unexpected token `<<NEWLINE>>'; expected test case name",
-        "9: Unexpected token `bar'; expected end of test case or test case's stdout/stderr line",
-        "11: Unexpected token `<<NEWLINE>>'; expected `:'",
-        "13: Unexpected token `<<NEWLINE>>'; expected test case name",
-        "15: Test case name used in terminator does not match opening",
-        "17: Unexpected token `<<NEWLINE>>'; expected `,'",
-        "19: Unexpected token `<<NEWLINE>>'; expected expected_{death,exit,failure,signal,timeout}, failed, passed or skipped",
-        "20: Unexpected token `tp-end'; expected start of test case",
+        "7: Unexpected token `<<NEWLINE>>'; expected timestamp",
+        "8: Malformed timestamp value 111",
+        "9: Malformed timestamp value 111.",
+        "10: Unexpected token `<<NEWLINE>>'; expected `,'",
+        "11: Unexpected token `<<NEWLINE>>'; expected test case name",
+        "13: Unexpected token `bar'; expected end of test case or test case's stdout/stderr line",
+        "15: Unexpected token `<<NEWLINE>>'; expected `:'",
+        "17: Unexpected token `<<NEWLINE>>'; expected timestamp",
+        "19: Malformed timestamp value 111",
+        "21: Malformed timestamp value 111.",
+        "23: Unexpected token `<<NEWLINE>>'; expected `,'",
+        "25: Unexpected token `<<NEWLINE>>'; expected test case name",
+        "27: Test case name used in terminator does not match opening",
+        "29: Unexpected token `<<NEWLINE>>'; expected `,'",
+        "31: Unexpected token `<<NEWLINE>>'; expected expected_{death,exit,failure,signal,timeout}, failed, passed or skipped",
+        "32: Unexpected token `tp-end'; expected start of test case",
         NULL
     };
     // NO_CHECK_STYLE_END
@@ -640,23 +684,23 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_56);
 ATF_TEST_CASE_BODY(tps_56)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count: 1\n"
-        "tp-start: foo, 1\n"
-        "tc-start: foo\n"
-        "tc-end: foo, passe\n"
-        "tc-start: foo\n"
-        "tc-end: foo, passed,\n"
-        "tc-start: bar\n"
-        "tc-end: bar, failed\n"
-        "tc-start: bar\n"
-        "tc-end: bar, failed,\n"
-        "tc-start: baz\n"
-        "tc-end: baz, skipped\n"
-        "tc-start: baz\n"
-        "tc-end: baz, skipped,\n"
-        "tp-end: foo\n"
+        "tp-start: 111.222, foo, 1\n"
+        "tc-start: 111.333, foo\n"
+        "tc-end: 111.444, foo, passe\n"
+        "tc-start: 111.333, foo\n"
+        "tc-end: 111.444, foo, passed,\n"
+        "tc-start: 111.555, bar\n"
+        "tc-end: 111.666, bar, failed\n"
+        "tc-start: 111.555, bar\n"
+        "tc-end: 111.666, bar, failed,\n"
+        "tc-start: 111.555, baz\n"
+        "tc-end: 111.666, baz, skipped\n"
+        "tc-start: 111.555, baz\n"
+        "tc-end: 111.666, baz, skipped,\n"
+        "tp-end: 111.777, foo\n"
     ;
 
     const char* exp_calls[] = {
@@ -686,11 +730,11 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_57);
 ATF_TEST_CASE_BODY(tps_57)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count: 2\n"
-        "tp-start: foo, 0\n"
-        "tp-end: foo\n"
+        "tp-start: 111.222, foo, 0\n"
+        "tp-end: 111.333, foo\n"
     ;
 
     const char* exp_calls[] = {
@@ -712,13 +756,13 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_58);
 ATF_TEST_CASE_BODY(tps_58)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "tps-count: 1\n"
-        "tp-start: foo, 0\n"
-        "tp-end: foo\n"
-        "tp-start: bar, 0\n"
-        "tp-end: bar\n"
+        "tp-start: 111.222, foo, 0\n"
+        "tp-end: 111.333, foo\n"
+        "tp-start: 111.444, bar, 0\n"
+        "tp-end: 111.555, bar\n"
     ;
 
     const char* exp_calls[] = {
@@ -740,7 +784,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_59);
 ATF_TEST_CASE_BODY(tps_59)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "info\n"
     ;
@@ -761,7 +805,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_60);
 ATF_TEST_CASE_BODY(tps_60)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "info:\n"
     ;
@@ -782,7 +826,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_61);
 ATF_TEST_CASE_BODY(tps_61)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "info: a\n"
     ;
@@ -803,7 +847,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_62);
 ATF_TEST_CASE_BODY(tps_62)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "info: a,\n"
     ;
@@ -825,7 +869,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_63);
 ATF_TEST_CASE_BODY(tps_63)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "info: a, b\n"
     ;
@@ -847,19 +891,21 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_64);
 ATF_TEST_CASE_BODY(tps_64)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "info: a, b\n"
+        "info: a.b.c.def, g\n"
         "tps-count\n"
     ;
 
     const char* exp_calls[] = {
         "got_info(a, b)",
+        "got_info(a.b.c.def, g)",
         NULL
     };
 
     const char* exp_errors[] = {
-        "4: Unexpected token `<<NEWLINE>>'; expected `:'",
+        "5: Unexpected token `<<NEWLINE>>'; expected `:'",
         NULL
     };
 
@@ -870,7 +916,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_65);
 ATF_TEST_CASE_BODY(tps_65)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "info: a, b\n"
         "tps-count:\n"
@@ -893,7 +939,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(tps_66);
 ATF_TEST_CASE_BODY(tps_66)
 {
     const char* input =
-        "Content-Type: application/X-atf-tps; version=\"2\"\n"
+        "Content-Type: application/X-atf-tps; version=\"3\"\n"
         "\n"
         "info: a, b\n"
         "tps-count: 0\n"
index 62f17f40c1db3e02e2ae7ba22d0b2bbb6872fca2..24fc12cbf30d60e5ee02b35f0f21756c6281cca5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -31,6 +31,10 @@ body {
     margin: 0 0 0 0;
 }
 
+.nobr {
+    white-space: nowrap;
+}
+
 h1 {
     background: black;
     color: white;
@@ -56,6 +60,11 @@ h3 {
     padding: 3pt;
 }
 
+p.details {
+    margin-left: 20pt;
+    margin-right: 20pt;
+}
+
 p.term {
     margin-left: 40pt;
     margin-right: 40pt;
@@ -138,9 +147,27 @@ table.tcs-summary th {
     padding: 3pt 6pt 3pt 6pt;
 }
 
+table.tcs-summary td.numeric {
+    width: 1pt;
+}
+
+table.tcs-summary td.numeric p {
+    text-align: right;
+}
+
+table.tcs-summary td.tp-numeric {
+    background: #dddddd;
+    width: 1pt;
+}
+
+table.tcs-summary td.tp-numeric p {
+    text-align: right;
+}
+
 table.tcs-summary td.tp-id {
     background: #dddddd;
     font-weight: bold;
+    width: 1pt;
 }
 
 table.tcs-summary td.tc-id p {
@@ -149,16 +176,24 @@ table.tcs-summary td.tc-id p {
 
 table.tcs-summary td.tcr-passed {
     background: #aaffaa;
+    width: 1pt;
 }
 
 table.tcs-summary td.tcr-failed {
     background: #ffaaaa;
+    width: 1pt;
 }
 
 table.tcs-summary td.tcr-skipped {
     background: #ffffaa;
+    width: 1pt;
 }
 
 table.tcs-summary td.tcr-xfail {
     background: #ffaaff;
+    width: 1pt;
+}
+
+table.tcs-summary td.tcr-reason {
+    width: 100%;
 }
index 99c4ec579d364391c45c929adcd546552ed88a0e..c16f7edfb53f6b27d079b7225b190100a6dd6d5b 100644 (file)
@@ -1,7 +1,7 @@
 <!--
   ++ Automated Testing Framework (atf)
   ++
-  ++ Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+  ++ Copyright (c) 2007 The NetBSD Foundation, Inc.
   ++ All rights reserved.
   ++
   ++ Redistribution and use in source and binary forms, with or without
index 46c8f6aa9a83380478c7f34883b5cfe92585f60b..91b77c5435b544ede66be6c73cf4a9d4f5e8f655 100644 (file)
@@ -4,7 +4,7 @@
 <!--
   ++ Automated Testing Framework (atf)
   ++
-  ++ Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+  ++ Copyright (c) 2007 The NetBSD Foundation, Inc.
   ++ All rights reserved.
   ++
   ++ Redistribution and use in source and binary forms, with or without
@@ -86,6 +86,9 @@
         <xsl:if test="$ntcs-skipped > 0">
           <xsl:call-template name="skipped-tcs-summary" />
         </xsl:if>
+        <xsl:if test="$ntps-failed > 0">
+          <xsl:call-template name="failed-tps-summary" />
+        </xsl:if>
         <xsl:call-template name="info-bottom" />
 
         <xsl:apply-templates select="tp" mode="details" />
 
     <table class="summary">
       <tr>
-        <th><p>Item</p></th>
-        <th><p>Value</p></th>
+        <th class="nobr"><p>Item</p></th>
+        <th class="nobr"><p>Value</p></th>
       </tr>
 
       <tr class="group">
         <td class="numeric"><p><xsl:value-of select="$ntps" /></p></td>
       </tr>
       <tr class="entry">
-        <td><p>Bogus test programs</p></td>
         <xsl:choose>
           <xsl:when test="$ntps-failed > 0">
+            <td><p><a href="#failed-tps-summary">Bogus test
+            programs</a></p></td>
             <td class="numeric-error">
               <p><xsl:value-of select="$ntps-failed" /></p>
             </td>
           </xsl:when>
           <xsl:otherwise>
+            <td><p>Bogus test programs</p></td>
             <td class="numeric">
               <p><xsl:value-of select="$ntps-failed" /></p>
             </td>
 
     <table class="tcs-summary">
       <tr>
-        <th><p>Test case</p></th>
-        <th><p>Result</p></th>
-        <th><p>Reason</p></th>
+        <th class="nobr"><p>Test case</p></th>
+        <th class="nobr"><p>Result</p></th>
+        <th class="nobr"><p>Reason</p></th>
+        <th class="nobr"><p>Duration</p></th>
       </tr>
       <xsl:apply-templates select="tp" mode="summary">
         <xsl:with-param name="which">all</xsl:with-param>
 
     <table class="tcs-summary">
       <tr>
-        <th><p>Test case</p></th>
-        <th><p>Result</p></th>
-        <th><p>Reason</p></th>
+        <th class="nobr"><p>Test case</p></th>
+        <th class="nobr"><p>Result</p></th>
+        <th class="nobr"><p>Reason</p></th>
+        <th class="nobr"><p>Duration</p></th>
       </tr>
       <xsl:apply-templates select="tp" mode="summary">
         <xsl:with-param name="which">xfail</xsl:with-param>
 
     <table class="tcs-summary">
       <tr>
-        <th><p>Test case</p></th>
-        <th><p>Result</p></th>
-        <th><p>Reason</p></th>
+        <th class="nobr"><p>Test case</p></th>
+        <th class="nobr"><p>Result</p></th>
+        <th class="nobr"><p>Reason</p></th>
+        <th class="nobr"><p>Duration</p></th>
       </tr>
       <xsl:apply-templates select="tp" mode="summary">
         <xsl:with-param name="which">failed</xsl:with-param>
     </table>
   </xsl:template>
 
+  <xsl:template name="failed-tps-summary">
+    <a name="failed-tps-summary" />
+    <h2 id="failed-tps-summary">Bogus test programs summary</h2>
+
+    <table class="tcs-summary">
+      <tr>
+        <th class="nobr">Test program</th>
+      </tr>
+      <xsl:apply-templates select="tp" mode="summary">
+        <xsl:with-param name="which">bogus</xsl:with-param>
+      </xsl:apply-templates>
+    </table>
+  </xsl:template>
+
   <xsl:template name="skipped-tcs-summary">
     <a name="skipped-tcs-summary" />
     <h2 id="skipped-tcs-summary">Skipped test cases summary</h2>
 
     <table class="tcs-summary">
       <tr>
-        <th><p>Test case</p></th>
-        <th><p>Result</p></th>
-        <th><p>Reason</p></th>
+        <th class="nobr"><p>Test case</p></th>
+        <th class="nobr"><p>Result</p></th>
+        <th class="nobr"><p>Reason</p></th>
+        <th class="nobr"><p>Duration</p></th>
       </tr>
       <xsl:apply-templates select="tp" mode="summary">
         <xsl:with-param name="which">skipped</xsl:with-param>
 
     <xsl:variable name="chosen">
       <xsl:choose>
+        <xsl:when test="$which = 'bogus' and failed">yes</xsl:when>
         <xsl:when test="$which = 'passed' and tc/passed">yes</xsl:when>
         <xsl:when test="$which = 'failed' and tc/failed">yes</xsl:when>
         <xsl:when test="$which = 'xfail' and
         <td class="tp-id" colspan="3">
           <p><xsl:value-of select="@id" /></p>
         </td>
+        <td class="tp-numeric">
+          <p><xsl:value-of select="tp-time" />s</p>
+        </td>
       </tr>
-      <xsl:apply-templates select="tc" mode="summary">
-        <xsl:with-param name="which" select="$which" />
-      </xsl:apply-templates>
+      <xsl:if test="$which != 'bogus'">
+        <xsl:apply-templates select="tc" mode="summary">
+          <xsl:with-param name="which" select="$which" />
+        </xsl:apply-templates>
+      </xsl:if>
     </xsl:if>
   </xsl:template>
 
                                      expected_failure|expected_timeout|
                                      expected_signal|failed|passed|
                                      skipped" mode="tc" />
+        <td class="numeric">
+          <p><xsl:value-of select="tc-time" />s</p>
+        </td>
       </tr>
     </xsl:if>
   </xsl:template>
 
   <xsl:template match="passed" mode="tc">
-    <td class="tcr-passed"><p>Passed</p></td>
-    <td><p>N/A</p></td>
+    <td class="tcr-passed"><p class="nobr">Passed</p></td>
+    <td class="tcr-reason"><p>N/A</p></td>
   </xsl:template>
 
   <xsl:template match="expected_death" mode="tc">
-    <td class="tcr-xfail"><p>Expected death</p></td>
-    <td><p><xsl:apply-templates /></p></td>
+    <td class="tcr-xfail"><p class="nobr">Expected death</p></td>
+    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
   </xsl:template>
 
   <xsl:template match="expected_exit" mode="tc">
-    <td class="tcr-xfail"><p>Expected exit</p></td>
-    <td><p><xsl:apply-templates /></p></td>
+    <td class="tcr-xfail"><p class="nobr">Expected exit</p></td>
+    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
   </xsl:template>
 
   <xsl:template match="expected_failure" mode="tc">
-    <td class="tcr-xfail"><p>Expected failure</p></td>
-    <td><p><xsl:apply-templates /></p></td>
+    <td class="tcr-xfail"><p class="nobr">Expected failure</p></td>
+    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
   </xsl:template>
 
   <xsl:template match="expected_timeout" mode="tc">
-    <td class="tcr-xfail"><p>Expected timeout</p></td>
-    <td><p><xsl:apply-templates /></p></td>
+    <td class="tcr-xfail"><p class="nobr">Expected timeout</p></td>
+    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
   </xsl:template>
 
   <xsl:template match="expected_signal" mode="tc">
-    <td class="tcr-xfail"><p>Expected signal</p></td>
-    <td><p><xsl:apply-templates /></p></td>
+    <td class="tcr-xfail"><p class="nobr">Expected signal</p></td>
+    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
   </xsl:template>
 
   <xsl:template match="failed" mode="tc">
-    <td class="tcr-failed"><p>Failed</p></td>
-    <td><p><xsl:apply-templates /></p></td>
+    <td class="tcr-failed"><p class="nobr">Failed</p></td>
+    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
   </xsl:template>
 
   <xsl:template match="skipped" mode="tc">
-    <td class="tcr-skipped"><p>Skipped</p></td>
-    <td><p><xsl:apply-templates /></p></td>
+    <td class="tcr-skipped"><p class="nobr">Skipped</p></td>
+    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
   </xsl:template>
 
   <xsl:template match="tp" mode="details">
     <xsl:value-of select="../@id" /><xsl:text>/</xsl:text>
     <xsl:value-of select="@id" /></h2>
 
+    <xsl:if test="tc-time">
+      <p class="details">Duration:
+      <xsl:apply-templates select="tc-time" mode="details" /></p>
+    </xsl:if>
+
     <h3>Termination reason</h3>
     <xsl:apply-templates select="expected_death|expected_exit|expected_failure|
                                  expected_signal|expected_timeout|
     </xsl:if>
   </xsl:template>
 
+  <xsl:template match="tc-time" mode="details">
+    <xsl:apply-templates /> seconds
+  </xsl:template>
+
   <xsl:template match="so" mode="details">
     <xsl:apply-templates />
     <xsl:if test="position() != last()">
diff --git a/unit/atf-src/atf-run/Kyuafile b/unit/atf-src/atf-run/Kyuafile
new file mode 100644 (file)
index 0000000..305d699
--- /dev/null
@@ -0,0 +1,13 @@
+syntax("kyuafile", 1)
+
+test_suite("atf")
+
+atf_test_program{name="atffile_test"}
+atf_test_program{name="config_test"}
+atf_test_program{name="fs_test"}
+atf_test_program{name="integration_test"}
+atf_test_program{name="io_test"}
+atf_test_program{name="requirements_test"}
+atf_test_program{name="signals_test"}
+atf_test_program{name="test_program_test"}
+atf_test_program{name="user_test"}
index 15897e54f9cbd5c03543162c590794115e67633c..7eb8333b31c0d84c2b71b9b0d01bee12e69e1365 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -28,6 +28,7 @@
 #
 
 bin_PROGRAMS += atf-run/atf-run
+atf_run_atf_run_CPPFLAGS = "-DGDB=\"$(GDB)\""
 atf_run_atf_run_SOURCES = atf-run/atf-run.cpp \
                           atf-run/atffile.cpp \
                           atf-run/atffile.hpp \
@@ -47,10 +48,11 @@ atf_run_atf_run_SOURCES = atf-run/atf-run.cpp \
                           atf-run/timer.hpp \
                           atf-run/user.cpp \
                           atf-run/user.hpp
-atf_run_atf_run_LDADD = libatf-c++.la
+atf_run_atf_run_LDADD = $(ATF_CXX_LIBS)
 dist_man_MANS += atf-run/atf-run.1
 
-tests_atf_run_DATA = atf-run/Atffile
+tests_atf_run_DATA = atf-run/Atffile \
+                     atf-run/Kyuafile
 tests_atf_rundir = $(pkgtestsdir)/atf-run
 EXTRA_DIST += $(tests_atf_run_DATA)
 
@@ -58,7 +60,7 @@ tests_atf_run_PROGRAMS = atf-run/atffile_test
 atf_run_atffile_test_SOURCES = atf-run/atffile_test.cpp \
                                atf-run/atffile.cpp
 atf_run_atffile_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail
-atf_run_atffile_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_run_atffile_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_run_PROGRAMS += atf-run/bad_metadata_helper
 atf_run_bad_metadata_helper_SOURCES = atf-run/bad_metadata_helper.c
@@ -68,7 +70,7 @@ tests_atf_run_PROGRAMS += atf-run/config_test
 atf_run_config_test_SOURCES = atf-run/config_test.cpp \
                               atf-run/config.cpp
 atf_run_config_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail
-atf_run_config_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_run_config_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_run_PROGRAMS += atf-run/expect_helpers
 atf_run_expect_helpers_SOURCES = atf-run/expect_helpers.c
@@ -78,21 +80,21 @@ tests_atf_run_PROGRAMS += atf-run/fs_test
 atf_run_fs_test_SOURCES = atf-run/fs_test.cpp \
                           atf-run/fs.cpp \
                           atf-run/user.cpp
-atf_run_fs_test_LDADD = libatf-c++.la
+atf_run_fs_test_LDADD = $(ATF_CXX_LIBS)
 
 tests_atf_run_PROGRAMS += atf-run/io_test
 atf_run_io_test_SOURCES = atf-run/io_test.cpp \
                           atf-run/io.cpp \
                           atf-run/signals.cpp
-atf_run_io_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_run_io_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_run_PROGRAMS += atf-run/misc_helpers
 atf_run_misc_helpers_SOURCES = atf-run/misc_helpers.cpp
-atf_run_misc_helpers_LDADD = libatf-c++.la
+atf_run_misc_helpers_LDADD = $(ATF_CXX_LIBS)
 
 tests_atf_run_PROGRAMS += atf-run/pass_helper
 atf_run_pass_helper_SOURCES = atf-run/pass_helper.cpp
-atf_run_pass_helper_LDADD = libatf-c++.la
+atf_run_pass_helper_LDADD = $(ATF_CXX_LIBS)
 
 tests_atf_run_PROGRAMS += atf-run/several_tcs_helper
 atf_run_several_tcs_helper_SOURCES = atf-run/several_tcs_helper.c
@@ -102,11 +104,11 @@ tests_atf_run_PROGRAMS += atf-run/requirements_test
 atf_run_requirements_test_SOURCES = atf-run/requirements_test.cpp \
                                     atf-run/requirements.cpp \
                                     atf-run/user.cpp
-atf_run_requirements_test_LDADD = libatf-c++.la
+atf_run_requirements_test_LDADD = $(ATF_CXX_LIBS)
 
 tests_atf_run_PROGRAMS += atf-run/signals_test
 atf_run_signals_test_SOURCES = atf-run/signals_test.cpp atf-run/signals.cpp
-atf_run_signals_test_LDADD = libatf-c++.la
+atf_run_signals_test_LDADD = $(ATF_CXX_LIBS)
 
 tests_atf_run_PROGRAMS += atf-run/test_program_test
 atf_run_test_program_test_SOURCES = atf-run/test_program_test.cpp \
@@ -118,11 +120,11 @@ atf_run_test_program_test_SOURCES = atf-run/test_program_test.cpp \
                                     atf-run/timer.cpp \
                                     atf-run/user.cpp
 atf_run_test_program_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail
-atf_run_test_program_test_LDADD = atf-c++/detail/libtest_helpers.la libatf-c++.la
+atf_run_test_program_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS)
 
 tests_atf_run_PROGRAMS += atf-run/user_test
 atf_run_user_test_SOURCES = atf-run/user_test.cpp atf-run/user.cpp
-atf_run_user_test_LDADD = libatf-c++.la
+atf_run_user_test_LDADD = $(ATF_CXX_LIBS)
 
 tests_atf_run_PROGRAMS += atf-run/zero_tcs_helper
 atf_run_zero_tcs_helper_SOURCES = atf-run/zero_tcs_helper.c
index 1a406c80e148ecf534cfd2c5765c30172f67df7b..d593f479445133296e7b9e3aa2e982c05bb08e6f 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" Automated Testing Framework (atf)
 .\"
-.\" Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -165,7 +165,7 @@ The purpose of this hook is to write additional
 stanzas to the top of the output report; these are defined by the
 .Sq application/X-atf-tps format
 described in
-.Xr atf-formats 1 .
+.Xr atf-formats 5 .
 Always use the
 .Sq atf_tps_writer_info
 function to print these.
index 8a392aabf37d5b1dfc584d943d823e447ce16908..e28e8fdf0778d87aca1f96c841abd8f9e90e28aa 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -33,6 +33,7 @@
 
 extern "C" {
 #include <sys/types.h>
+#include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <unistd.h>
@@ -67,6 +68,12 @@ extern "C" {
 
 namespace impl = atf::atf_run;
 
+#if defined(MAXCOMLEN)
+static const std::string::size_type max_core_name_length = MAXCOMLEN;
+#else
+static const std::string::size_type max_core_name_length = std::string::npos;
+#endif
+
 class atf_run : public atf::application::app {
     static const char* m_description;
 
@@ -99,6 +106,59 @@ public:
     int main(void);
 };
 
+static void
+sanitize_gdb_env(void)
+{
+    try {
+        atf::env::unset("TERM");
+    } catch (...) {
+        // Just swallow exceptions here; they cannot propagate into C, which
+        // is where this function is called from, and even if these exceptions
+        // appear they are benign.
+    }
+}
+
+static void
+dump_stacktrace(const atf::fs::path& tp, const atf::process::status& s,
+                const atf::fs::path& workdir, impl::atf_tps_writer& w)
+{
+    PRE(s.signaled() && s.coredump());
+
+    w.stderr_tc("Test program crashed; attempting to get stack trace");
+
+    const atf::fs::path corename = workdir /
+        (tp.leaf_name().substr(0, max_core_name_length) + ".core");
+    if (!atf::fs::exists(corename)) {
+        w.stderr_tc("Expected file " + corename.str() + " not found");
+        return;
+    }
+
+    const atf::fs::path gdb(GDB);
+    const atf::fs::path gdbout = workdir / "gdb.out";
+    const atf::process::argv_array args(gdb.leaf_name().c_str(), "-batch",
+                                        "-q", "-ex", "bt", tp.c_str(),
+                                        corename.c_str(), NULL);
+    atf::process::status status = atf::process::exec(
+        gdb, args,
+        atf::process::stream_redirect_path(gdbout),
+        atf::process::stream_redirect_path(atf::fs::path("/dev/null")),
+        sanitize_gdb_env);
+    if (!status.exited() || status.exitstatus() != EXIT_SUCCESS) {
+        w.stderr_tc("Execution of " GDB " failed");
+        return;
+    }
+
+    std::ifstream input(gdbout.c_str());
+    if (input) {
+        std::string line;
+        while (std::getline(input, line).good())
+            w.stderr_tc(line);
+        input.close();
+    }
+
+    w.stderr_tc("Stack trace complete");
+}
+
 const char* atf_run::m_description =
     "atf-run is a tool that runs tests programs and collects their "
     "results.";
@@ -370,8 +430,8 @@ atf_run::run_test_program(const atf::fs::path& tp,
                 if (user.first != -1 && user.second != -1) {
                     if (::chown(workdir.get_path().c_str(), user.first,
                                 user.second) == -1) {
-                        throw atf::system_error("chmod(" +
-                            workdir.get_path().str() + ")", "chmod(2) failed",
+                        throw atf::system_error("chown(" +
+                            workdir.get_path().str() + ")", "chown(2) failed",
                             errno);
                     }
                     resfile = workdir.get_path() / "tcr";
@@ -380,6 +440,8 @@ atf_run::run_test_program(const atf::fs::path& tp,
                 std::pair< std::string, const atf::process::status > s =
                     impl::run_test_case(tp, tcname, "body", tcmd, config,
                                             resfile, workdir.get_path(), w);
+                if (s.second.signaled() && s.second.coredump())
+                    dump_stacktrace(tp, s.second, workdir.get_path(), w);
                 if (has_cleanup)
                     (void)impl::run_test_case(tp, tcname, "cleanup", tcmd,
                             config, resfile, workdir.get_path(), w);
index 983241b43e764cc578c82f1076136c548994a8b7..22ece645d5fbb38b0d64813f78160390e6dcae3a 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,6 +29,8 @@
 
 #include <fstream>
 
+#include "atf-c/defs.h"
+
 #include "atf-c++/detail/exceptions.hpp"
 #include "atf-c++/detail/expand.hpp"
 #include "atf-c++/detail/parser.hpp"
@@ -90,19 +92,23 @@ detail::atf_atffile_reader::~atf_atffile_reader(void)
 }
 
 void
-detail::atf_atffile_reader::got_conf(const std::string& name,
-                                     const std::string& val)
+detail::atf_atffile_reader::got_conf(
+    const std::string& name ATF_DEFS_ATTRIBUTE_UNUSED,
+    const std::string& val ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
 void
-detail::atf_atffile_reader::got_prop(const std::string& name,
-                                     const std::string& val)
+detail::atf_atffile_reader::got_prop(
+    const std::string& name ATF_DEFS_ATTRIBUTE_UNUSED,
+    const std::string& val ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
 void
-detail::atf_atffile_reader::got_tp(const std::string& name, bool isglob)
+detail::atf_atffile_reader::got_tp(
+    const std::string& name ATF_DEFS_ATTRIBUTE_UNUSED,
+    bool isglob ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
index fbf933ab709895f7882f386170299a8a5ee5cb1b..8c915c24cf4024b054b5d85a83f12aa7ed2ff75b 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 1a46d444055effd6e309e470d68764b1167529d7..e5781a3370b99c45b3a1180b47ef2dceee57908c 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2009 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index f820e4da714ae66463a4105d74295e23489e2863..0ea240fe20cd3ffccd2fe8e59529f580694d62ff 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -30,6 +30,8 @@
 #include <fstream>
 #include <vector>
 
+#include "atf-c/defs.h"
+
 #include "atf-c++/config.hpp"
 
 #include "atf-c++/detail/env.hpp"
@@ -136,8 +138,9 @@ detail::atf_config_reader::~atf_config_reader(void)
 }
 
 void
-detail::atf_config_reader::got_var(const std::string& var,
-                                   const std::string& val)
+detail::atf_config_reader::got_var(
+    const std::string& var ATF_DEFS_ATTRIBUTE_UNUSED,
+    const std::string& val ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
index d0dc6b3aec2922547187d87540f68b9fffa31a31..5b103a78acbbc9b00f479174f4a3b6d3f7446bef 100644 (file)
@@ -27,7 +27,9 @@
 // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 
+#include "atf-c++/detail/env.hpp"
 #include "atf-c++/detail/test_helpers.hpp"
+#include "atf-c++/config.hpp"
 #include "atf-c++/macros.hpp"
 
 #include "config.hpp"
@@ -37,6 +39,14 @@ namespace detail = atf::atf_run::detail;
 
 using atf::tests::vars_map;
 
+namespace atf {
+namespace config {
+
+void __reinit(void);
+
+}  // namespace config
+}  // namespace atf
+
 // -------------------------------------------------------------------------
 // Tests for the "config" parser.
 // -------------------------------------------------------------------------
@@ -351,6 +361,8 @@ ATF_TEST_CASE_BODY(merge_configs_mixed) {
 ATF_TEST_CASE(read_config_files_none);
 ATF_TEST_CASE_HEAD(read_config_files_none) {}
 ATF_TEST_CASE_BODY(read_config_files_none) {
+    atf::env::set("ATF_CONFDIR", ".");
+    atf::config::__reinit();
     ATF_REQUIRE(vars_map() == impl::read_config_files("test-suite"));
 }
 
index 69465e015138fceb2b54a943badfa5027e4541d0..e84a90da73a3a3ecc5119b786bf93e8aee799130 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -44,7 +44,9 @@ extern "C" {
 #include <cstdlib>
 #include <cstring>
 
+#include "atf-c++/detail/auto_array.hpp"
 #include "atf-c++/detail/process.hpp"
+#include "atf-c++/detail/sanity.hpp"
 
 #include "fs.hpp"
 #include "user.hpp"
@@ -61,6 +63,19 @@ static void cleanup_aux_dir(const atf::fs::path&, const atf::fs::file_info&,
                             bool);
 static void do_unmount(const atf::fs::path&);
 
+// The cleanup routines below are tricky: they are executed immediately after
+// a test case's death, and after we have forcibly killed any stale processes.
+// However, even if the processes are dead, this does not mean that the file
+// system we are scanning is stable.  In particular, if the test case has
+// mounted file systems through fuse/puffs, the fact that the processes died
+// does not mean that the file system is truly unmounted.
+//
+// The code below attempts to cope with this by catching errors and either
+// ignoring them or retrying the actions on the same file/directory a few times
+// before giving up.
+static const int max_retries = 5;
+static const int retry_delay_in_seconds = 1;
+
 // The erase parameter in this routine is to control nested mount points.
 // We want to descend into a mount point to unmount anything that is
 // mounted under it, but we do not want to delete any files while doing
@@ -70,19 +85,24 @@ static
 void
 cleanup_aux(const atf::fs::path& p, dev_t parent_device, bool erase)
 {
-    atf::fs::file_info fi(p);
+    try {
+        atf::fs::file_info fi(p);
 
-    if (fi.get_type() == atf::fs::file_info::dir_type)
-        cleanup_aux_dir(p, fi, fi.get_device() == parent_device);
-
-    if (fi.get_device() != parent_device)
-        do_unmount(p);
-
-    if (erase) {
         if (fi.get_type() == atf::fs::file_info::dir_type)
-            atf::fs::rmdir(p);
-        else
-            atf::fs::remove(p);
+            cleanup_aux_dir(p, fi, fi.get_device() == parent_device);
+
+        if (fi.get_device() != parent_device)
+            do_unmount(p);
+
+        if (erase) {
+            if (fi.get_type() == atf::fs::file_info::dir_type)
+                atf::fs::rmdir(p);
+            else
+                atf::fs::remove(p);
+        }
+    } catch (const atf::system_error& e) {
+        if (e.code() != ENOENT && e.code() != ENOTDIR)
+            throw e;
     }
 }
 
@@ -92,15 +112,39 @@ cleanup_aux_dir(const atf::fs::path& p, const atf::fs::file_info& fi,
                 bool erase)
 {
     if (erase && ((fi.get_mode() & S_IRWXU) != S_IRWXU)) {
-        if (chmod(p.c_str(), fi.get_mode() | S_IRWXU) == -1)
-            throw atf::system_error(IMPL_NAME "::cleanup(" +
-                                    p.str() + ")", "chmod(2) failed", errno);
+        int retries = max_retries;
+retry_chmod:
+        if (chmod(p.c_str(), fi.get_mode() | S_IRWXU) == -1) {
+            if (retries > 0) {
+                retries--;
+                ::sleep(retry_delay_in_seconds);
+                goto retry_chmod;
+            } else {
+                throw atf::system_error(IMPL_NAME "::cleanup(" +
+                                        p.str() + ")", "chmod(2) failed",
+                                        errno);
+            }
+        }
     }
 
     std::set< std::string > subdirs;
     {
-        const atf::fs::directory d(p);
-        subdirs = d.names();
+        bool ok = false;
+        int retries = max_retries;
+        while (!ok) {
+            INV(retries > 0);
+            try {
+                const atf::fs::directory d(p);
+                subdirs = d.names();
+                ok = true;
+            } catch (const atf::system_error& e) {
+                retries--;
+                if (retries == 0)
+                    throw e;
+                ::sleep(retry_delay_in_seconds);
+            }
+        }
+        INV(ok);
     }
 
     for (std::set< std::string >::const_iterator iter = subdirs.begin();
@@ -122,9 +166,18 @@ do_unmount(const atf::fs::path& in_path)
         in_path : in_path.to_absolute();
 
 #if defined(HAVE_UNMOUNT)
-    if (unmount(abs_path.c_str(), 0) == -1)
-        throw atf::system_error(IMPL_NAME "::cleanup(" + in_path.str() + ")",
-                                "unmount(2) failed", errno);
+    int retries = max_retries;
+retry_unmount:
+    if (unmount(abs_path.c_str(), 0) == -1) {
+        if (errno == EBUSY && retries > 0) {
+            retries--;
+            ::sleep(retry_delay_in_seconds);
+            goto retry_unmount;
+        } else {
+            throw atf::system_error(IMPL_NAME "::cleanup(" + in_path.str() +
+                                    ")", "unmount(2) failed", errno);
+        }
+    }
 #else
     // We could use umount(2) instead if it was available... but
     // trying to do so under, e.g. Linux, is a nightmare because we
@@ -148,7 +201,7 @@ do_unmount(const atf::fs::path& in_path)
 
 impl::temp_dir::temp_dir(const atf::fs::path& p)
 {
-    atf::utils::auto_array< char > buf(new char[p.str().length() + 1]);
+    atf::auto_array< char > buf(new char[p.str().length() + 1]);
     std::strcpy(buf.get(), p.c_str());
     if (::mkdtemp(buf.get()) == NULL)
         throw system_error(IMPL_NAME "::temp_dir::temp_dir(" +
index 0a889879405d5779be7014d89c9b8ca75da6fb64..37382684b57b5f15f712abd5cd2fb5694ceb98bc 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index f07b25dc59c219d8148da40206a9bece31cae845..f03045eb6131ebbe5a2f755bb6c26b4e878d9c95 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 149e3a4e36bc091ee47cb5d0c0550b52598c89c2..afd013efbf06251f3d95782e06dea968aaf27eae 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -29,6 +29,8 @@
 
 create_atffile()
 {
+    ATF_CONFDIR="$(pwd)"; export ATF_CONFDIR
+
     cat >Atffile <<EOF
 Content-Type: application/X-atf-atffile; version="1"
 
@@ -118,6 +120,18 @@ atf_init_test_cases()
 EOF
 }
 
+atf_test_case no_warnings
+no_warnings_head()
+{
+    atf_set "descr" "Tests that atf-run suppresses warnings about not running" \
+                    "within atf-run"
+}
+no_warnings_body()
+{
+    create_helper pass
+    atf_check -s eq:0 -o ignore -e not-match:'WARNING.*atf-run' atf-run helper
+}
+
 atf_test_case config
 config_head()
 {
@@ -367,8 +381,9 @@ EOF
 
     create_atffile helper
 
+    re='^tc-end: [0-9][0-9]*\.[0-9]*, tc1,'
     atf_check -s eq:1 \
-        -o match:'^tc-end: tc1, failed,.*failed to create' \
+        -o match:"${re} failed,.*failed to create" \
         -o not-match:'resfile found' \
         -e empty atf-run
 }
@@ -393,7 +408,8 @@ EOF
 
     create_atffile helper
 
-    atf_check -s eq:1 -o match:'^tc-end: tc1, .*line 1.*line 2' -e empty atf-run
+    re='^tc-end: [0-9][0-9]*\.[0-9]*, tc1,'
+    atf_check -s eq:1 -o match:"${re} .*line 1.*line 2" -e empty atf-run
 }
 
 atf_test_case broken_tp_list
@@ -422,7 +438,7 @@ EOF
 
     create_atffile helper
 
-    re='^tp-end: helper,'
+    re='^tp-end: [0-9][0-9]*\.[0-9]*, helper,'
     re="${re} Invalid format for test case list:.*First property.*ident"
     atf_check -s eq:1 -o match:"${re}" -e empty atf-run
 }
@@ -444,8 +460,9 @@ EOF
 
     create_atffile helper
 
+    re='^tp-end: [0-9][0-9]*\.[0-9]*, helper,'
     atf_check -s eq:1 \
-        -o match:'^tp-end: helper,.*Invalid format for test case list' \
+        -o match:"${re} .*Invalid format for test case list" \
         -e empty atf-run
 }
 
@@ -465,8 +482,9 @@ EOF
 
     create_atffile helper
 
+    re='^tc-end: [0-9][0-9]*\.[0-9]*, tc1,'
     atf_check -s eq:1 \
-        -o match:'^tc-end: tc1,.*exited successfully.*reported failure' \
+        -o match:"${re} .*exited successfully.*reported failure" \
         -e empty atf-run
 }
 
@@ -489,7 +507,8 @@ EOF
 
     create_atffile helper
 
-    atf_check -s eq:1 -o match:'^tc-end: tc2,.*received signal 9' \
+    re='^tc-end: [0-9][0-9]*\.[0-9]*, tc2,'
+    atf_check -s eq:1 -o match:"${re} .*received signal 9" \
         -e empty atf-run
 }
 
@@ -581,8 +600,8 @@ isolation_env_head()
 isolation_env_body()
 {
     undef_vars="LANG LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY \
-                LC_NUMERIC LC_TIME TZ"
-    def_vars="HOME"
+                LC_NUMERIC LC_TIME"
+    def_vars="HOME TZ"
 
     mangleenv="env"
     for v in ${undef_vars} ${def_vars}; do
@@ -605,6 +624,8 @@ isolation_env_body()
     for v in ${def_vars}; do
         atf_check -s eq:0 -o ignore -e empty grep "^tc-so:${v}=" stdout
     done
+
+    atf_check -s eq:0 -o ignore -e empty grep "^tc-so:TZ=UTC" stdout
 }
 
 atf_test_case isolation_home
@@ -619,6 +640,18 @@ isolation_home_body()
     atf_check -s eq:0 -o ignore -e ignore env HOME=foo atf-run helper
 }
 
+atf_test_case isolation_stdin
+isolation_stdin_head()
+{
+    atf_set "descr" "Tests that atf-run nullifies the stdin of test cases"
+}
+isolation_stdin_body()
+{
+    create_helper read_stdin
+    create_atffile helper
+    atf_check -s eq:0 -o ignore -e ignore -x 'echo hello world | atf-run helper'
+}
+
 atf_test_case isolation_umask
 isolation_umask_head()
 {
@@ -853,6 +886,36 @@ require_config_body()
         -v var1=a -v var2=' ' helper
 }
 
+atf_test_case require_files
+require_files_head()
+{
+    atf_set "descr" "Tests that atf-run validates the require.files property"
+}
+require_files_body()
+{
+    create_helper require_files
+    create_atffile helper
+
+    touch i-exist
+
+    echo "Checking absolute paths"
+    atf_check -s eq:0 -o match:"${TESTCASE}, passed" -e ignore atf-run \
+        -v files='/bin/cp' helper
+    atf_check -s eq:0 -o match:"${TESTCASE}, passed" -e ignore atf-run \
+        -v files="$(pwd)/i-exist" helper
+    atf_check -s eq:0 \
+        -o match:"${TESTCASE}, skipped, .*/dont-exist" \
+        -e ignore atf-run -v files="$(pwd)/i-exist $(pwd)/dont-exist" helper
+
+    echo "Checking that relative paths are not allowed"
+    atf_check -s eq:1 \
+        -o match:"${TESTCASE}, failed, Relative paths.*not allowed.*hello" \
+        -e ignore atf-run -v files='hello' helper
+    atf_check -s eq:1 \
+        -o match:"${TESTCASE}, failed, Relative paths.*not allowed.*a/b" \
+        -e ignore atf-run -v files='a/b' helper
+}
+
 atf_test_case require_machine
 require_machine_head()
 {
@@ -1029,6 +1092,7 @@ ignore_deprecated_use_fs_body()
 
 atf_init_test_cases()
 {
+    atf_add_test_case no_warnings
     atf_add_test_case config
     atf_add_test_case vflag
     atf_add_test_case atffile
@@ -1045,6 +1109,7 @@ atf_init_test_cases()
     atf_add_test_case hooks
     atf_add_test_case isolation_env
     atf_add_test_case isolation_home
+    atf_add_test_case isolation_stdin
     atf_add_test_case isolation_umask
     atf_add_test_case cleanup_pass
     atf_add_test_case cleanup_fail
@@ -1055,6 +1120,7 @@ atf_init_test_cases()
     atf_add_test_case cleanup_symlink
     atf_add_test_case require_arch
     atf_add_test_case require_config
+    atf_add_test_case require_files
     atf_add_test_case require_machine
     atf_add_test_case require_progs
     atf_add_test_case require_user_root
index b51bd436a645a2965112aee43f9ea40460ebb0df..c99ee34ef211245704bd2128dd6994857374408a 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -41,9 +41,9 @@ extern "C" {
 #include "../atf-c/error.h"
 }
 
+#include "../atf-c++/detail/auto_array.hpp"
 #include "../atf-c++/detail/exceptions.hpp"
 #include "../atf-c++/detail/sanity.hpp"
-#include "../atf-c++/utils.hpp"
 
 #include "io.hpp"
 
@@ -290,7 +290,7 @@ size_t
 impl::muxer::read_one(const size_t index, const int fd, std::string& accum,
                       const bool report_errors)
 {
-    atf::utils::auto_array< char > buffer(new char[m_bufsize]);
+    atf::auto_array< char > buffer(new char[m_bufsize]);
     const size_t nbytes = safe_read(fd, buffer.get(), m_bufsize - 1,
                                     report_errors);
     INV(nbytes < m_bufsize);
@@ -319,7 +319,7 @@ impl::muxer::read_one(const size_t index, const int fd, std::string& accum,
 void
 impl::muxer::mux(volatile const bool& terminate)
 {
-    atf::utils::auto_array< struct pollfd > poll_fds(new struct pollfd[m_nfds]);
+    atf::auto_array< struct pollfd > poll_fds(new struct pollfd[m_nfds]);
     for (size_t i = 0; i < m_nfds; i++) {
         poll_fds[i].fd = m_fds[i];
         poll_fds[i].events = POLLIN;
index 4d9c548c5cbedc357157b365fc667d5bf1156c53..b8ff59a808d9ab36a122f8ee15e5ee69e5774df8 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,8 @@
 
 #include "fs.hpp"
 
-#include "../atf-c++/utils.hpp"
+#include "../atf-c++/detail/auto_array.hpp"
+#include "../atf-c++/noncopyable.hpp"
 
 namespace atf {
 namespace atf_run {
@@ -253,8 +254,7 @@ private:
 //! However, it is not copyable to avoid introducing inconsistences with
 //! the on-disk file and the in-memory buffers.
 //!
-class systembuf :
-    public std::streambuf, atf::utils::noncopyable
+class systembuf : public std::streambuf, atf::noncopyable
 {
 public:
     typedef int handle_type;
@@ -374,14 +374,8 @@ protected:
 //! this happens, the buffer eventually empties and the system blocks
 //! until the writer generates some data.
 //!
-class pistream :
-    public std::istream, utils::noncopyable
+class pistream : public std::istream, noncopyable
 {
-    //!
-    //! \brief The file handle managed by this stream.
-    //!
-    int m_fd;
-
     //!
     //! \brief The systembuf object used to manage this stream's data.
     //!
@@ -406,12 +400,12 @@ public:
 // The "muxer" class.
 // ------------------------------------------------------------------------
 
-class muxer : utils::noncopyable {
+class muxer : noncopyable {
     const int* m_fds;
     const size_t m_nfds;
 
     const size_t m_bufsize;
-    atf::utils::auto_array< std::string > m_buffers;
+    atf::auto_array< std::string > m_buffers;
 
 protected:
     virtual void line_callback(const size_t, const std::string&) = 0;
index 9dad0620342b9ce1c0f0b36029e3727fba65927d..03fc97e82e8fb4abc8b239346b00afe0588139a7 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -407,8 +407,9 @@ muxer_test(const size_t bufsize, const size_t iterations)
     std::cout << "flush done\n";
     check_stream(std::cout);
 
+    sigchld.unprogram();
     int status;
-    ::wait(&status);
+    ATF_REQUIRE(::waitpid(pid, &status, 0) != -1);
     ATF_REQUIRE(WIFEXITED(status));
     ATF_REQUIRE(WEXITSTATUS(status) == EXIT_SUCCESS);
 
index b9d2f12afd4d48b938919432ca047d5f7a5f4877..abc9a4a945fe7e6b7a56d7460b88f63494ccbaaa 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,7 @@ extern "C" {
 #include <cstdlib>
 #include <fstream>
 #include <iomanip>
+#include <ios>
 #include <iostream>
 #include <string>
 
@@ -65,6 +66,15 @@ touch(const std::string& path)
 // Helper tests for "t_integration".
 // ------------------------------------------------------------------------
 
+ATF_TEST_CASE(pass);
+ATF_TEST_CASE_HEAD(pass)
+{
+    set_md_var("descr", "Helper test case for the t_integration test program");
+}
+ATF_TEST_CASE_BODY(pass)
+{
+}
+
 ATF_TEST_CASE(config);
 ATF_TEST_CASE_HEAD(config)
 {
@@ -165,6 +175,26 @@ ATF_TEST_CASE_BODY(env_home)
     ATF_REQUIRE_EQ(fi1.get_inode(), fi2.get_inode());
 }
 
+ATF_TEST_CASE(read_stdin);
+ATF_TEST_CASE_HEAD(read_stdin)
+{
+    set_md_var("descr", "Helper test case for the t_integration test program");
+}
+ATF_TEST_CASE_BODY(read_stdin)
+{
+    char buf[100];
+    ssize_t len = ::read(STDIN_FILENO, buf, sizeof(buf) - 1);
+    ATF_REQUIRE(len != -1);
+
+    buf[len + 1] = '\0';
+    for (ssize_t i = 0; i < len; i++) {
+        if (buf[i] != '\0') {
+            fail("The stdin of the test case does not seem to be /dev/zero; "
+                 "got '" + std::string(buf) + "'");
+        }
+    }
+}
+
 ATF_TEST_CASE(umask);
 ATF_TEST_CASE_HEAD(umask)
 {
@@ -244,6 +274,16 @@ ATF_TEST_CASE_BODY(require_config)
     std::cout << "var2: " << get_config_var("var2") << "\n";
 }
 
+ATF_TEST_CASE(require_files);
+ATF_TEST_CASE_HEAD(require_files)
+{
+    set_md_var("descr", "Helper test case for the t_integration test program");
+    set_md_var("require.files", get_config_var("files", "not-set"));
+}
+ATF_TEST_CASE_BODY(require_files)
+{
+}
+
 ATF_TEST_CASE(require_machine);
 ATF_TEST_CASE_HEAD(require_machine)
 {
@@ -336,6 +376,8 @@ ATF_INIT_TEST_CASES(tcs)
     std::string which = atf::env::get("TESTCASE");
 
     // Add helper tests for t_integration.
+    if (which == "pass")
+        ATF_ADD_TEST_CASE(tcs, pass);
     if (which == "config")
         ATF_ADD_TEST_CASE(tcs, config);
     if (which == "fds")
@@ -348,6 +390,8 @@ ATF_INIT_TEST_CASES(tcs)
         ATF_ADD_TEST_CASE(tcs, env_list);
     if (which == "env_home")
         ATF_ADD_TEST_CASE(tcs, env_home);
+    if (which == "read_stdin")
+        ATF_ADD_TEST_CASE(tcs, read_stdin);
     if (which == "umask")
         ATF_ADD_TEST_CASE(tcs, umask);
     if (which == "cleanup_states")
@@ -358,6 +402,8 @@ ATF_INIT_TEST_CASES(tcs)
         ATF_ADD_TEST_CASE(tcs, require_arch);
     if (which == "require_config")
         ATF_ADD_TEST_CASE(tcs, require_config);
+    if (which == "require_files")
+        ATF_ADD_TEST_CASE(tcs, require_files);
     if (which == "require_machine")
         ATF_ADD_TEST_CASE(tcs, require_machine);
     if (which == "require_progs")
index 49f1e3217ac0cc81ea9dc1444852862b11aa00fe..b752b131b387230cc5732ed6e7d34e55b9d19523 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index e2cbaa00943887cc872e0a7f99c5234427cf8888..75537d5ea52bcf9881363705d251ccbe1351c5d4 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 
-// TODO: We probably don't want to raise std::runtime_error for the errors
-// detected in this file.
+extern "C" {
+#include <sys/param.h>
+#include <sys/sysctl.h>
+}
+
+#include <cerrno>
+#include <cstring>
 #include <stdexcept>
 
+extern "C" {
+#include "atf-c/defs.h"
+}
+
 #include "atf-c++/config.hpp"
 
 #include "atf-c++/detail/fs.hpp"
@@ -104,6 +113,23 @@ check_config(const std::string& variables, const atf::tests::vars_map& config)
     return "";
 }
 
+static
+std::string
+check_files(const std::string& progs)
+{
+    const std::vector< std::string > v = atf::text::split(progs, " ");
+    for (std::vector< std::string >::const_iterator iter = v.begin();
+         iter != v.end(); iter++) {
+        const atf::fs::path file(*iter);
+        if (!file.is_absolute())
+            throw std::runtime_error("Relative paths are not allowed when "
+                "checking for a required file (" + file.str() + ")");
+        if (!atf::fs::exists(file))
+            return "Required file '" + file.str() + "' not found";
+    }
+    return "";
+}
+
 static
 std::string
 check_machine(const std::string& machines)
@@ -122,6 +148,66 @@ check_machine(const std::string& machines)
         return "Requires one of the '" + machines + "' machine types";
 }
 
+#if defined(__APPLE__) || defined(__NetBSD__)
+static
+std::string
+check_memory_sysctl(const int64_t needed, const char* sysctl_variable)
+{
+    int64_t available;
+    std::size_t available_length = sizeof(available);
+    if (::sysctlbyname(sysctl_variable, &available, &available_length,
+                       NULL, 0) == -1) {
+        const char* e = std::strerror(errno);
+        return "Failed to get sysctl(hw.usermem64) value: " + std::string(e);
+    }
+
+    if (available < needed) {
+        return "Not enough memory; needed " + atf::text::to_string(needed) +
+            ", available " + atf::text::to_string(available);
+    } else
+        return "";
+}
+#   if defined(__APPLE__)
+static
+std::string
+check_memory_darwin(const int64_t needed)
+{
+    return check_memory_sysctl(needed, "hw.usermem");
+}
+#   elif defined(__NetBSD__)
+static
+std::string
+check_memory_netbsd(const int64_t needed)
+{
+    return check_memory_sysctl(needed, "hw.usermem64");
+}
+#   else
+#      error "Conditional error"
+#   endif
+#else
+static
+std::string
+check_memory_unknown(const int64_t needed ATF_DEFS_ATTRIBUTE_UNUSED)
+{
+    return "";
+}
+#endif
+
+static
+std::string
+check_memory(const std::string& raw_memory)
+{
+    const int64_t needed = atf::text::to_bytes(raw_memory);
+
+#if defined(__APPLE__)
+    return check_memory_darwin(needed);
+#elif defined(__NetBSD__)
+    return check_memory_netbsd(needed);
+#else
+    return check_memory_unknown(needed);
+#endif
+}
+
 static
 std::string
 check_progs(const std::string& progs)
@@ -186,8 +272,12 @@ impl::check_requirements(const atf::tests::vars_map& metadata,
             failure_reason = check_arch(value);
         else if (name == "require.config")
             failure_reason = check_config(value, config);
+        else if (name == "require.files")
+            failure_reason = check_files(value);
         else if (name == "require.machine")
             failure_reason = check_machine(value);
+        else if (name == "require.memory")
+            failure_reason = check_memory(value);
         else if (name == "require.progs")
             failure_reason = check_progs(value);
         else if (name == "require.user")
index 0c81ba8f99eb9ebde73bf1aca26d9ba8f7a3036f..ef72b411d9058b024a6740a36610125c0671a134 100644 (file)
@@ -28,6 +28,7 @@
 //
 
 #include "atf-c++/config.hpp"
+#include "atf-c++/detail/text.hpp"
 #include "atf-c++/macros.hpp"
 
 #include "requirements.hpp"
@@ -48,7 +49,7 @@ do_check(const std::string& expected, const atf::tests::vars_map& metadata,
          const atf::tests::vars_map& config = no_config)
 {
     const std::string actual = impl::check_requirements(metadata, config);
-    if (actual != expected)
+    if (!atf::text::match(actual, expected))
         ATF_FAIL("Requirements failure reason \"" + actual + "\" does not "
                  "match \"" + expected + "\"");
 }
@@ -137,6 +138,54 @@ ATF_TEST_CASE_BODY(require_config_many_fail) {
              config);
 }
 
+// -------------------------------------------------------------------------
+// Tests for the require.files metadata property.
+// -------------------------------------------------------------------------
+
+ATF_TEST_CASE_WITHOUT_HEAD(require_files_one_ok);
+ATF_TEST_CASE_BODY(require_files_one_ok) {
+    atf::tests::vars_map metadata;
+    metadata["require.files"] = "/bin/ls";
+    do_check("", metadata);
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(require_files_one_missing);
+ATF_TEST_CASE_BODY(require_files_one_missing) {
+    atf::tests::vars_map metadata;
+    metadata["require.files"] = "/non-existent/foo";
+    do_check("Required file '/non-existent/foo' not found", metadata);
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(require_files_one_fail);
+ATF_TEST_CASE_BODY(require_files_one_fail) {
+    atf::tests::vars_map metadata;
+    metadata["require.files"] = "/bin/cp this-is-relative";
+    ATF_REQUIRE_THROW_RE(std::runtime_error, "Relative.*(this-is-relative)",
+                         impl::check_requirements(metadata, no_config));
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(require_files_many_ok);
+ATF_TEST_CASE_BODY(require_files_many_ok) {
+    atf::tests::vars_map metadata;
+    metadata["require.files"] = "/bin/ls /bin/cp";
+    do_check("", metadata);
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(require_files_many_missing);
+ATF_TEST_CASE_BODY(require_files_many_missing) {
+    atf::tests::vars_map metadata;
+    metadata["require.files"] = "/bin/ls /non-existent/bar /bin/cp";
+    do_check("Required file '/non-existent/bar' not found", metadata);
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(require_files_many_fail);
+ATF_TEST_CASE_BODY(require_files_many_fail) {
+    atf::tests::vars_map metadata;
+    metadata["require.files"] = "/bin/cp also-relative";
+    ATF_REQUIRE_THROW_RE(std::runtime_error, "Relative.*(also-relative)",
+                         impl::check_requirements(metadata, no_config));
+}
+
 // -------------------------------------------------------------------------
 // Tests for the require.machine metadata property.
 // -------------------------------------------------------------------------
@@ -175,6 +224,37 @@ ATF_TEST_CASE_BODY(require_machine_many_fail) {
              metadata);
 }
 
+// -------------------------------------------------------------------------
+// Tests for the require.memory metadata property.
+// -------------------------------------------------------------------------
+
+ATF_TEST_CASE_WITHOUT_HEAD(require_memory_ok);
+ATF_TEST_CASE_BODY(require_memory_ok) {
+    atf::tests::vars_map metadata;
+    metadata["require.memory"] = "1m";
+    do_check("", metadata);
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(require_memory_not_enough);
+ATF_TEST_CASE_BODY(require_memory_not_enough) {
+    atf::tests::vars_map metadata;
+    metadata["require.memory"] = "128t";
+#if defined(__APPLE__) || defined(__NetBSD__)
+    do_check("Not enough memory; needed 140737488355328, available [0-9]*",
+             metadata);
+#else
+    skip("Don't know how to check for the amount of physical memory");
+#endif
+}
+
+ATF_TEST_CASE_WITHOUT_HEAD(require_memory_fail);
+ATF_TEST_CASE_BODY(require_memory_fail) {
+    atf::tests::vars_map metadata;
+    metadata["require.memory"] = "foo";
+    ATF_REQUIRE_THROW(std::runtime_error,
+                      impl::check_requirements(metadata, no_config));
+}
+
 // -------------------------------------------------------------------------
 // Tests for the require.progs metadata property.
 // -------------------------------------------------------------------------
@@ -284,12 +364,25 @@ ATF_INIT_TEST_CASES(tcs)
     ATF_ADD_TEST_CASE(tcs, require_config_many_ok);
     ATF_ADD_TEST_CASE(tcs, require_config_many_fail);
 
+    // Add test cases for require.files.
+    ATF_ADD_TEST_CASE(tcs, require_files_one_ok);
+    ATF_ADD_TEST_CASE(tcs, require_files_one_missing);
+    ATF_ADD_TEST_CASE(tcs, require_files_one_fail);
+    ATF_ADD_TEST_CASE(tcs, require_files_many_ok);
+    ATF_ADD_TEST_CASE(tcs, require_files_many_missing);
+    ATF_ADD_TEST_CASE(tcs, require_files_many_fail);
+
     // Add test cases for require.machine.
     ATF_ADD_TEST_CASE(tcs, require_machine_one_ok);
     ATF_ADD_TEST_CASE(tcs, require_machine_one_fail);
     ATF_ADD_TEST_CASE(tcs, require_machine_many_ok);
     ATF_ADD_TEST_CASE(tcs, require_machine_many_fail);
 
+    // Add test cases for require.memory.
+    ATF_ADD_TEST_CASE(tcs, require_memory_ok);
+    ATF_ADD_TEST_CASE(tcs, require_memory_not_enough);
+    ATF_ADD_TEST_CASE(tcs, require_memory_fail);
+
     // Add test cases for require.progs.
     ATF_ADD_TEST_CASE(tcs, require_progs_one_ok);
     ATF_ADD_TEST_CASE(tcs, require_progs_one_missing);
index 0ea001b935cf7d702d179bb91af0bc669a155afd..d287c8193a67bce568cda64c84bc86eaf96ec6e9 100644 (file)
@@ -52,10 +52,7 @@ ATF_TC_CLEANUP(second, tc)
 {
 }
 
-ATF_TC(third);
-ATF_TC_HEAD(third, tc)
-{
-}
+ATF_TC_WITHOUT_HEAD(third);
 ATF_TC_BODY(third, tc)
 {
 }
index 3a55aee6bfed23f4cebabe279660a2a125c963f0..c94f3bcfc9ec6fd85e58291f6615ae8296663ea6 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -62,7 +62,7 @@ default_info_start_hook()
     set -- $(env)
     val=${1}; shift
     while [ ${#} -gt 0 ]; do
-        if echo "${1}" | grep '^[a-zA-Z_][a-zA-Z_]*=' >/dev/null; then
+        if echo "${1}" | grep '^[a-zA-Z0-0_][a-zA-Z0-9_]*=' >/dev/null; then
             atf_tps_writer_info "env" "${val}"
             val="${1}"
         else
index 9b1a37b9fd2e79b7ec7a296ec6cd93013140ad73..851c8f02c2c4ce9563a7776962ad838a50d87d8f 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 2e6f3c715544a88ccc50c0c69de9d5650194de3c..8765ac9ec56ec2c01bba88fbb44a111516168617 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 466b0ccee327c6c5f661e944c357350a04d9a43c..358c8a8ab5906ee604a594936f6203ac946b7361 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2008 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,8 @@ extern "C" {
 #include <cstdlib>
 #include <iostream>
 
+#include "atf-c/defs.h"
+
 #include "atf-c++/macros.hpp"
 
 #include "atf-c++/detail/exceptions.hpp"
@@ -53,7 +55,7 @@ namespace sigusr1 {
 
     static
     void
-    handler(int signo)
+    handler(int signo ATF_DEFS_ATTRIBUTE_UNUSED)
     {
         happened = true;
     }
@@ -77,7 +79,7 @@ namespace sigusr1_2 {
 
     static
     void
-    handler(int signo)
+    handler(int signo ATF_DEFS_ATTRIBUTE_UNUSED)
     {
         happened = true;
     }
@@ -223,7 +225,7 @@ ATF_TEST_CASE_BODY(signal_programmer_preserve)
 
 static
 void
-reset_child(void *v)
+reset_child(void *v ATF_DEFS_ATTRIBUTE_UNUSED)
 {
     sigusr1::program();
 
index c3c5885e5c506e6e2e50443a8dc1561891414e69..14647c2f78fdcd07b15eafb9a898b523c49029e4 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -30,7 +30,9 @@
 extern "C" {
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/time.h>
 
+#include <fcntl.h>
 #include <signal.h>
 #include <unistd.h>
 }
@@ -41,6 +43,8 @@ extern "C" {
 #include <fstream>
 #include <iostream>
 
+#include "atf-c/defs.h"
+
 #include "atf-c++/detail/env.hpp"
 #include "atf-c++/detail/parser.hpp"
 #include "atf-c++/detail/process.hpp"
@@ -110,7 +114,7 @@ class metadata_reader : public detail::atf_tp_reader {
             m_tcs[ident].insert(std::make_pair("has.cleanup", "false"));
 
         if (m_tcs[ident].find("timeout") == m_tcs[ident].end())
-            m_tcs[ident].insert(std::make_pair("timeout", "30"));
+            m_tcs[ident].insert(std::make_pair("timeout", "300"));
     }
 
 public:
@@ -166,6 +170,24 @@ struct test_case_params {
     }
 };
 
+static
+std::string
+generate_timestamp(void)
+{
+    struct timeval tv;
+    if (gettimeofday(&tv, NULL) == -1)
+        return "0.0";
+
+    char buf[32];
+    const int len = snprintf(buf, sizeof(buf), "%ld.%ld",
+                             static_cast< long >(tv.tv_sec),
+                             static_cast< long >(tv.tv_usec));
+    if (len >= static_cast< int >(sizeof(buf)) || len < 0)
+        return "0.0";
+    else
+        return buf;
+}
+
 static
 void
 append_to_vector(std::vector< std::string >& v1,
@@ -218,6 +240,17 @@ config_to_args(const atf::tests::vars_map& config)
     return args;
 }
 
+static
+void
+silence_stdin(void)
+{
+    ::close(STDIN_FILENO);
+    int fd = ::open("/dev/null", O_RDONLY);
+    if (fd == -1)
+        throw std::runtime_error("Could not open /dev/null");
+    INV(fd == STDIN_FILENO);
+}
+
 static
 void
 prepare_child(const atf::fs::path& workdir)
@@ -239,9 +272,13 @@ prepare_child(const atf::fs::path& workdir)
     atf::env::unset("LC_MONETARY");
     atf::env::unset("LC_NUMERIC");
     atf::env::unset("LC_TIME");
-    atf::env::unset("TZ");
+    atf::env::set("TZ", "UTC");
+
+    atf::env::set("__RUNNING_INSIDE_ATF_RUN", "internal-yes-value");
 
     impl::change_directory(workdir);
+
+    silence_stdin();
 }
 
 static
@@ -379,8 +416,9 @@ detail::atf_tp_reader::~atf_tp_reader(void)
 }
 
 void
-detail::atf_tp_reader::got_tc(const std::string& ident,
-                              const std::map< std::string, std::string >& md)
+detail::atf_tp_reader::got_tc(
+    const std::string& ident ATF_DEFS_ATTRIBUTE_UNUSED,
+    const std::map< std::string, std::string >& md ATF_DEFS_ATTRIBUTE_UNUSED)
 {
 }
 
@@ -418,7 +456,15 @@ detail::atf_tp_reader::validate_and_insert(const std::string& name,
                               ident_regex + "; was '" + value + "'");
     } else if (name == "require.arch") {
     } else if (name == "require.config") {
+    } else if (name == "require.files") {
     } else if (name == "require.machine") {
+    } else if (name == "require.memory") {
+        try {
+            (void)atf::text::to_bytes(value);
+        } catch (const std::runtime_error&) {
+            throw parse_error(lineno, "The require.memory property requires an "
+                              "integer value representing an amount of bytes");
+        }
     } else if (name == "require.progs") {
     } else if (name == "require.user") {
     } else if (name == "timeout") {
@@ -521,7 +567,7 @@ impl::atf_tps_writer::atf_tps_writer(std::ostream& os) :
 {
     atf::parser::headers_map hm;
     atf::parser::attrs_map ct_attrs;
-    ct_attrs["version"] = "2";
+    ct_attrs["version"] = "3";
     hm["Content-Type"] =
         atf::parser::header_entry("Content-Type", "application/X-atf-tps",
                                   ct_attrs);
@@ -546,7 +592,8 @@ void
 impl::atf_tps_writer::start_tp(const std::string& tp, size_t ntcs)
 {
     m_tpname = tp;
-    m_os << "tp-start: " << tp << ", " << ntcs << "\n";
+    m_os << "tp-start: " << generate_timestamp() << ", " << tp << ", "
+         << ntcs << "\n";
     m_os.flush();
 }
 
@@ -555,9 +602,10 @@ impl::atf_tps_writer::end_tp(const std::string& reason)
 {
     PRE(reason.find('\n') == std::string::npos);
     if (reason.empty())
-        m_os << "tp-end: " << m_tpname << "\n";
+        m_os << "tp-end: " << generate_timestamp() << ", " << m_tpname << "\n";
     else
-        m_os << "tp-end: " << m_tpname << ", " << reason << "\n";
+        m_os << "tp-end: " << generate_timestamp() << ", " << m_tpname
+             << ", " << reason << "\n";
     m_os.flush();
 }
 
@@ -565,7 +613,7 @@ void
 impl::atf_tps_writer::start_tc(const std::string& tcname)
 {
     m_tcname = tcname;
-    m_os << "tc-start: " << tcname << "\n";
+    m_os << "tc-start: " << generate_timestamp() << ", " << tcname << "\n";
     m_os.flush();
 }
 
@@ -591,10 +639,10 @@ void
 impl::atf_tps_writer::end_tc(const std::string& state,
                              const std::string& reason)
 {
-    std::string str = "tc-end: " + m_tcname + ", " + state;
+    std::string str =  ", " + m_tcname + ", " + state;
     if (!reason.empty())
         str += ", " + reason;
-    m_os << str << "\n";
+    m_os << "tc-end: " << generate_timestamp() << str << "\n";
     m_os.flush();
 }
 
@@ -647,7 +695,7 @@ namespace {
 static volatile bool terminate_poll;
 
 static void
-sigchld_handler(const int signo)
+sigchld_handler(const int signo ATF_DEFS_ATTRIBUTE_UNUSED)
 {
     terminate_poll = true;
 }
@@ -724,10 +772,9 @@ impl::run_test_case(const atf::fs::path& executable,
         UNREACHABLE;
     }
 
-    ::killpg(child_pid, SIGTERM);
+    ::killpg(child_pid, SIGKILL);
     mux.flush();
     atf::process::status status = child.wait();
-    ::killpg(child_pid, SIGKILL);
 
     std::string reason;
 
index 05c9e35fd1268620bfb1e4194b087cb2952df941..444dc3e4d8f455eda959e43cdc880d7fac25fbfd 100644 (file)
@@ -98,11 +98,11 @@ print_indented(const std::string& str)
 // at the moment will be bogus if there are some.
 static
 void
-check_equal(const atf::tests::tc& tc, const std::string& str,
+check_match(const atf::tests::tc& tc, const std::string& str,
             const std::string& exp)
 {
-    if (str != exp) {
-        std::cout << "String equality check failed.\n"
+    if (!atf::text::match(str, exp)) {
+        std::cout << "String match check failed.\n"
                   << "Adding >> and << to delimit the string boundaries "
                      "below.\n";
         std::cout << "GOT:\n";
@@ -190,7 +190,7 @@ ATF_TEST_CASE_BODY(tp_2)
         "\n"
         "ident: test_case_1\n"
         "descr: This is the description\n"
-        "timeout: 30\n"
+        "timeout: 300\n"
         "\n"
         "ident: test_case_2\n"
         "\n"
@@ -201,7 +201,7 @@ ATF_TEST_CASE_BODY(tp_2)
 
     // NO_CHECK_STYLE_BEGIN
     const char* exp_calls[] = {
-        "got_tc(test_case_1, {descr=This is the description, ident=test_case_1, timeout=30})",
+        "got_tc(test_case_1, {descr=This is the description, ident=test_case_1, timeout=300})",
         "got_tc(test_case_2, {ident=test_case_2})",
         "got_tc(test_case_3, {X-prop1=A custom property, descr=Third test case, ident=test_case_3})",
         "got_eof()",
@@ -224,9 +224,10 @@ ATF_TEST_CASE_BODY(tp_3)
         "\n"
         "ident: single_test\n"
         "descr: Some description\n"
-        "timeout: 30\n"
+        "timeout: 300\n"
         "require.arch: thearch\n"
         "require.config: foo-bar\n"
+        "require.files: /a/1 /b/2\n"
         "require.machine: themachine\n"
         "require.progs: /bin/cp mv\n"
         "require.user: root\n"
@@ -234,7 +235,7 @@ ATF_TEST_CASE_BODY(tp_3)
 
     // NO_CHECK_STYLE_BEGIN
     const char* exp_calls[] = {
-        "got_tc(single_test, {descr=Some description, ident=single_test, require.arch=thearch, require.config=foo-bar, require.machine=themachine, require.progs=/bin/cp mv, require.user=root, timeout=30})",
+        "got_tc(single_test, {descr=Some description, ident=single_test, require.arch=thearch, require.config=foo-bar, require.files=/a/1 /b/2, require.machine=themachine, require.progs=/bin/cp mv, require.user=root, timeout=300})",
         "got_eof()",
         NULL
     };
@@ -474,7 +475,7 @@ ATF_TEST_CASE_BODY(tp_59)
         "\n"
         "\n"
         "ident: test\n"
-        "timeout: 30\n"
+        "timeout: 300\n"
     ;
 
     const char* exp_calls[] = {
@@ -489,6 +490,29 @@ ATF_TEST_CASE_BODY(tp_59)
     do_parser_test< tp_reader >(input, exp_calls, exp_errors);
 }
 
+ATF_TEST_CASE_WITHOUT_HEAD(tp_60);
+ATF_TEST_CASE_BODY(tp_60)
+{
+    const char* input =
+        "Content-Type: application/X-atf-tp; version=\"1\"\n"
+        "\n"
+        "ident: test\n"
+        "require.memory: 12345D\n"
+    ;
+
+    const char* exp_calls[] = {
+        NULL
+    };
+
+    const char* exp_errors[] = {
+        "4: The require.memory property requires an integer value representing"
+        " an amount of bytes",
+        NULL
+    };
+
+    do_parser_test< tp_reader >(input, exp_calls, exp_errors);
+}
+
 // -------------------------------------------------------------------------
 // Tests for the "tps" writer.
 // -------------------------------------------------------------------------
@@ -502,19 +526,20 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
 {
     std::ostringstream expss;
     std::ostringstream ss;
+    const char *ts_regex = "[0-9]+\\.[0-9]{1,6}, ";
 
 #define RESET \
     expss.str(""); \
     ss.str("")
 
 #define CHECK \
-    check_equal(*this, ss.str(), expss.str())
+    check_match(*this, ss.str(), expss.str())
 
     {
         RESET;
 
         impl::atf_tps_writer w(ss);
-        expss << "Content-Type: application/X-atf-tps; version=\"2\"\n\n";
+        expss << "Content-Type: application/X-atf-tps; version=\"3\"\n\n";
         CHECK;
     }
 
@@ -522,7 +547,7 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         RESET;
 
         impl::atf_tps_writer w(ss);
-        expss << "Content-Type: application/X-atf-tps; version=\"2\"\n\n";
+        expss << "Content-Type: application/X-atf-tps; version=\"3\"\n\n";
         CHECK;
 
         w.info("foo", "bar");
@@ -538,7 +563,7 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         RESET;
 
         impl::atf_tps_writer w(ss);
-        expss << "Content-Type: application/X-atf-tps; version=\"2\"\n\n";
+        expss << "Content-Type: application/X-atf-tps; version=\"3\"\n\n";
         CHECK;
 
         w.ntps(0);
@@ -550,7 +575,7 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         RESET;
 
         impl::atf_tps_writer w(ss);
-        expss << "Content-Type: application/X-atf-tps; version=\"2\"\n\n";
+        expss << "Content-Type: application/X-atf-tps; version=\"3\"\n\n";
         CHECK;
 
         w.ntps(123);
@@ -562,7 +587,7 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         RESET;
 
         impl::atf_tps_writer w(ss);
-        expss << "Content-Type: application/X-atf-tps; version=\"2\"\n\n";
+        expss << "Content-Type: application/X-atf-tps; version=\"3\"\n\n";
         CHECK;
 
         w.ntps(2);
@@ -570,19 +595,19 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         CHECK;
 
         w.start_tp("foo", 0);
-        expss << "tp-start: foo, 0\n";
+        expss << "tp-start: " << ts_regex << "foo, 0\n";
         CHECK;
 
         w.end_tp("");
-        expss << "tp-end: foo\n";
+        expss << "tp-end: " << ts_regex << "foo\n";
         CHECK;
 
         w.start_tp("bar", 0);
-        expss << "tp-start: bar, 0\n";
+        expss << "tp-start: " << ts_regex << "bar, 0\n";
         CHECK;
 
         w.end_tp("failed program");
-        expss << "tp-end: bar, failed program\n";
+        expss << "tp-end: " << ts_regex << "bar, failed program\n";
         CHECK;
     }
 
@@ -590,7 +615,7 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         RESET;
 
         impl::atf_tps_writer w(ss);
-        expss << "Content-Type: application/X-atf-tps; version=\"2\"\n\n";
+        expss << "Content-Type: application/X-atf-tps; version=\"3\"\n\n";
         CHECK;
 
         w.ntps(1);
@@ -598,15 +623,15 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         CHECK;
 
         w.start_tp("foo", 1);
-        expss << "tp-start: foo, 1\n";
+        expss << "tp-start: " << ts_regex << "foo, 1\n";
         CHECK;
 
         w.start_tc("brokentc");
-        expss << "tc-start: brokentc\n";
+        expss << "tc-start: " << ts_regex << "brokentc\n";
         CHECK;
 
         w.end_tp("aborted");
-        expss << "tp-end: foo, aborted\n";
+        expss << "tp-end: " << ts_regex << "foo, aborted\n";
         CHECK;
     }
 
@@ -614,7 +639,7 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         RESET;
 
         impl::atf_tps_writer w(ss);
-        expss << "Content-Type: application/X-atf-tps; version=\"2\"\n\n";
+        expss << "Content-Type: application/X-atf-tps; version=\"3\"\n\n";
         CHECK;
 
         w.ntps(1);
@@ -622,35 +647,35 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         CHECK;
 
         w.start_tp("thetp", 3);
-        expss << "tp-start: thetp, 3\n";
+        expss << "tp-start: " << ts_regex << "thetp, 3\n";
         CHECK;
 
         w.start_tc("passtc");
-        expss << "tc-start: passtc\n";
+        expss << "tc-start: " << ts_regex << "passtc\n";
         CHECK;
 
         w.end_tc("passed", "");
-        expss << "tc-end: passtc, passed\n";
+        expss << "tc-end: " << ts_regex << "passtc, passed\n";
         CHECK;
 
         w.start_tc("failtc");
-        expss << "tc-start: failtc\n";
+        expss << "tc-start: " << ts_regex << "failtc\n";
         CHECK;
 
         w.end_tc("failed", "The reason");
-        expss << "tc-end: failtc, failed, The reason\n";
+        expss << "tc-end: " << ts_regex << "failtc, failed, The reason\n";
         CHECK;
 
         w.start_tc("skiptc");
-        expss << "tc-start: skiptc\n";
+        expss << "tc-start: " << ts_regex << "skiptc\n";
         CHECK;
 
         w.end_tc("skipped", "The reason");
-        expss << "tc-end: skiptc, skipped, The reason\n";
+        expss << "tc-end: " << ts_regex << "skiptc, skipped, The reason\n";
         CHECK;
 
         w.end_tp("");
-        expss << "tp-end: thetp\n";
+        expss << "tp-end: " << ts_regex << "thetp\n";
         CHECK;
     }
 
@@ -658,7 +683,7 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         RESET;
 
         impl::atf_tps_writer w(ss);
-        expss << "Content-Type: application/X-atf-tps; version=\"2\"\n\n";
+        expss << "Content-Type: application/X-atf-tps; version=\"3\"\n\n";
         CHECK;
 
         w.ntps(1);
@@ -666,11 +691,11 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         CHECK;
 
         w.start_tp("thetp", 1);
-        expss << "tp-start: thetp, 1\n";
+        expss << "tp-start: " << ts_regex << "thetp, 1\n";
         CHECK;
 
         w.start_tc("thetc");
-        expss << "tc-start: thetc\n";
+        expss << "tc-start: " << ts_regex << "thetc\n";
         CHECK;
 
         w.stdout_tc("a line");
@@ -686,11 +711,11 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         CHECK;
 
         w.end_tc("passed", "");
-        expss << "tc-end: thetc, passed\n";
+        expss << "tc-end: " << ts_regex << "thetc, passed\n";
         CHECK;
 
         w.end_tp("");
-        expss << "tp-end: thetp\n";
+        expss << "tp-end: " << ts_regex << "thetp\n";
         CHECK;
     }
 
@@ -698,7 +723,7 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         RESET;
 
         impl::atf_tps_writer w(ss);
-        expss << "Content-Type: application/X-atf-tps; version=\"2\"\n\n";
+        expss << "Content-Type: application/X-atf-tps; version=\"3\"\n\n";
         CHECK;
 
         w.ntps(1);
@@ -706,11 +731,11 @@ ATF_TEST_CASE_BODY(atf_tps_writer)
         CHECK;
 
         w.start_tp("thetp", 0);
-        expss << "tp-start: thetp, 0\n";
+        expss << "tp-start: " << ts_regex << "thetp, 0\n";
         CHECK;
 
         w.end_tp("");
-        expss << "tp-end: thetp\n";
+        expss << "tp-end: " << ts_regex << "thetp\n";
         CHECK;
 
         w.info("foo", "bar");
@@ -762,7 +787,7 @@ ATF_TEST_CASE_BODY(get_metadata_several_tcs) {
         check_property((*iter).second, "descr", "Description 1");
         check_property((*iter).second, "has.cleanup", "false");
         check_property((*iter).second, "ident", "first");
-        check_property((*iter).second, "timeout", "30");
+        check_property((*iter).second, "timeout", "300");
     }
 
     {
@@ -786,7 +811,7 @@ ATF_TEST_CASE_BODY(get_metadata_several_tcs) {
         ATF_REQUIRE_EQ(3, (*iter).second.size());
         check_property((*iter).second, "has.cleanup", "false");
         check_property((*iter).second, "ident", "third");
-        check_property((*iter).second, "timeout", "30");
+        check_property((*iter).second, "timeout", "300");
     }
 }
 
@@ -965,6 +990,7 @@ ATF_INIT_TEST_CASES(tcs)
     ATF_ADD_TEST_CASE(tcs, tp_57);
     ATF_ADD_TEST_CASE(tcs, tp_58);
     ATF_ADD_TEST_CASE(tcs, tp_59);
+    ATF_ADD_TEST_CASE(tcs, tp_60);
 
     ATF_ADD_TEST_CASE(tcs, atf_tps_writer);
 
@@ -982,6 +1008,8 @@ ATF_INIT_TEST_CASES(tcs)
     ATF_ADD_TEST_CASE(tcs, parse_test_case_result_skipped);
     ATF_ADD_TEST_CASE(tcs, parse_test_case_result_unknown);
 
+    ATF_ADD_TEST_CASE(tcs, read_test_case_result_failed);
+    ATF_ADD_TEST_CASE(tcs, read_test_case_result_skipped);
     ATF_ADD_TEST_CASE(tcs, read_test_case_result_no_file);
     ATF_ADD_TEST_CASE(tcs, read_test_case_result_empty_file);
     ATF_ADD_TEST_CASE(tcs, read_test_case_result_multiline);
index 3eef4f8cb8e7526b47df6e0076d06c07c043615f..6ed70d97f62c010bc764cb1be28dbd4b40c9a261 100644 (file)
 // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 
+#if defined(HAVE_CONFIG_H)
+#   include <bconfig.h>
+#endif
+
 extern "C" {
-#include <signal.h>
+#include <sys/time.h>
 }
 
 #include <cerrno>
+#include <csignal>
+#include <ctime>
+
+extern "C" {
+#include "atf-c/defs.h"
+}
 
 #include "atf-c++/detail/exceptions.hpp"
 #include "atf-c++/detail/sanity.hpp"
@@ -42,60 +52,139 @@ extern "C" {
 namespace impl = atf::atf_run;
 #define IMPL_NAME "atf::atf_run"
 
+#if !defined(HAVE_TIMER_T)
+static impl::timer* compat_handle;
+#endif
+
 // ------------------------------------------------------------------------
 // Auxiliary functions.
 // ------------------------------------------------------------------------
 
-namespace sigalrm {
-
-bool m_fired = false;
-impl::timer* m_timer = NULL;
-
+#if defined(HAVE_TIMER_T)
+static
 void
-handler(const int signo)
+handler(const int signo ATF_DEFS_ATTRIBUTE_UNUSED, siginfo_t* si,
+        void* uc ATF_DEFS_ATTRIBUTE_UNUSED)
 {
-    PRE(signo == SIGALRM);
-
-    m_fired = true;
-    m_timer->timeout_callback();
+    impl::timer* timer = static_cast< impl::timer* >(si->si_value.sival_ptr);
+    timer->set_fired();
+    timer->timeout_callback();
 }
-
-} // anonymous namespace
+#else
+static
+void
+handler(const int signo ATF_DEFS_ATTRIBUTE_UNUSED,
+        siginfo_t* si ATF_DEFS_ATTRIBUTE_UNUSED,
+        void* uc ATF_DEFS_ATTRIBUTE_UNUSED)
+{
+    compat_handle->set_fired();
+    compat_handle->timeout_callback();
+}
+#endif
 
 // ------------------------------------------------------------------------
 // The "timer" class.
 // ------------------------------------------------------------------------
 
-impl::timer::timer(const unsigned int seconds)
-{
-    sigalrm::m_fired = false;
-    sigalrm::m_timer = this;
-    m_sigalrm.reset(new signal_programmer(SIGALRM, sigalrm::handler));
+struct impl::timer::impl {
+#if defined(HAVE_TIMER_T)
+    ::timer_t m_timer;
+    ::itimerspec m_old_it;
+#else
+    ::itimerval m_old_it;
+#endif
 
-    ::itimerval timeval;
-    timeval.it_interval.tv_sec = 0;
-    timeval.it_interval.tv_usec = 0;
-    timeval.it_value.tv_sec = seconds;
-    timeval.it_value.tv_usec = 0;
+    struct ::sigaction m_old_sa;
+    volatile bool m_fired;
 
-    if (::setitimer(ITIMER_REAL, &timeval, &m_old_timeval) == -1)
+    impl(void) : m_fired(false)
+    {
+    }
+};
+
+impl::timer::timer(const unsigned int seconds) :
+    m_pimpl(new impl())
+{
+    struct ::sigaction sa;
+    sigemptyset(&sa.sa_mask);
+    sa.sa_flags = SA_SIGINFO;
+    sa.sa_sigaction = ::handler;
+    if (::sigaction(SIGALRM, &sa, &m_pimpl->m_old_sa) == -1)
+        throw system_error(IMPL_NAME "::timer::timer",
+                           "Failed to set signal handler", errno);
+
+#if defined(HAVE_TIMER_T)
+    struct ::sigevent se;
+    se.sigev_notify = SIGEV_SIGNAL;
+    se.sigev_signo = SIGALRM;
+    se.sigev_value.sival_ptr = static_cast< void* >(this);
+    se.sigev_notify_function = NULL;
+    se.sigev_notify_attributes = NULL;
+    if (::timer_create(CLOCK_MONOTONIC, &se, &m_pimpl->m_timer) == -1) {
+        ::sigaction(SIGALRM, &m_pimpl->m_old_sa, NULL);
+        throw system_error(IMPL_NAME "::timer::timer",
+                           "Failed to create timer", errno);
+    }
+
+    struct ::itimerspec it;
+    it.it_interval.tv_sec = 0;
+    it.it_interval.tv_nsec = 0;
+    it.it_value.tv_sec = seconds;
+    it.it_value.tv_nsec = 0;
+    if (::timer_settime(m_pimpl->m_timer, 0, &it, &m_pimpl->m_old_it) == -1) {
+       ::sigaction(SIGALRM, &m_pimpl->m_old_sa, NULL);
+       ::timer_delete(m_pimpl->m_timer);
+        throw system_error(IMPL_NAME "::timer::timer",
+                           "Failed to program timer", errno);
+    }
+#else
+    ::itimerval it;
+    it.it_interval.tv_sec = 0;
+    it.it_interval.tv_usec = 0;
+    it.it_value.tv_sec = seconds;
+    it.it_value.tv_usec = 0;
+    if (::setitimer(ITIMER_REAL, &it, &m_pimpl->m_old_it) == -1) {
+        ::sigaction(SIGALRM, &m_pimpl->m_old_sa, NULL);
         throw system_error(IMPL_NAME "::timer::timer",
                            "Failed to program timer", errno);
+    }
+    INV(compat_handle == NULL);
+    compat_handle = this;
+#endif
 }
 
 impl::timer::~timer(void)
 {
-    const int ret = ::setitimer(ITIMER_REAL, &m_old_timeval, NULL);
+#if defined(HAVE_TIMER_T)
+    {
+        const int ret = ::timer_delete(m_pimpl->m_timer);
+        INV(ret != -1);
+    }
+#else
+    {
+        const int ret = ::setitimer(ITIMER_REAL, &m_pimpl->m_old_it, NULL);
+        INV(ret != -1);
+    }
+#endif
+    const int ret = ::sigaction(SIGALRM, &m_pimpl->m_old_sa, NULL);
     INV(ret != -1);
-    sigalrm::m_timer = NULL;
-    sigalrm::m_fired = false;
+
+#if !defined(HAVE_TIMER_T)
+    compat_handle = NULL;
+#endif
 }
 
 bool
 impl::timer::fired(void)
     const
 {
-    return sigalrm::m_fired;
+    return m_pimpl->m_fired;
+}
+
+void
+impl::timer::set_fired(void)
+{
+    m_pimpl->m_fired = true;
 }
 
 // ------------------------------------------------------------------------
@@ -117,9 +206,10 @@ impl::child_timer::~child_timer(void)
 void
 impl::child_timer::timeout_callback(void)
 {
+    static const timespec ts = { 1, 0 };
     m_terminate = true;
-
-    // Should use killpg(2) but, according to signal(7), using this system
-    // call in a signal handler context is not safe.
-    ::kill(m_pid, SIGKILL);
+    ::kill(-m_pid, SIGTERM);
+    ::nanosleep(&ts, NULL);
+    if (::kill(-m_pid, 0) != -1)
+       ::kill(-m_pid, SIGKILL);
 }
index 05b2c7b4392b7ec71ba285256c6a3fff5b21bb22..8eb7228409761325833047906af3816d087ffe2e 100644 (file)
 #define _ATF_RUN_ALARM_HPP_
 
 extern "C" {
-#include <sys/time.h>
 #include <sys/types.h>
 }
 
 #include <memory>
 
-#include "atf-c++/utils.hpp"
+#include "atf-c++/noncopyable.hpp"
 
 namespace atf {
 namespace atf_run {
@@ -48,15 +47,16 @@ class signal_programmer;
 // The "timer" class.
 // ------------------------------------------------------------------------
 
-class timer : utils::noncopyable {
-    ::itimerval m_old_timeval;
-    std::auto_ptr< signal_programmer > m_sigalrm;
+class timer : noncopyable {
+    struct impl;
+    std::auto_ptr< impl > m_pimpl;
 
 public:
     timer(const unsigned int);
     virtual ~timer(void);
 
     bool fired(void) const;
+    void set_fired(void);
     virtual void timeout_callback(void) = 0;
 };
 
index 9ba82acf7a9d5cc4e3ae83c2bf9cc080b791ae25..37329f1666769c49390f4ef2b58dae375805639e 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 //
 
 extern "C" {
-#include <unistd.h>
-
 #include <sys/types.h>
 
 #include <pwd.h>
+#include <unistd.h>
 
 #include "../atf-c/detail/user.h"
 }
 
 #include <stdexcept>
+#include <string>
 
 #include "../atf-c++/detail/sanity.hpp"
 
index fe3f4801afeeed83559d82fe90a0bdb1bf9f4790..11b3e5546d36dab90587601b66605a5c08b50d43 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index c48377b879cf1eb7ff0e5dcc59e2023f5a874bda..7218ba6553b56f326699f2444e59371a5a45b3de 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -82,6 +82,14 @@ ATF_TEST_CASE_BODY(is_member_of_group)
         std::cout << "Last GID is " << maxgid << "\n";
     }
 
+    const gid_t maxgid_limit = 1 << 16;
+    if (maxgid > maxgid_limit) {
+        std::cout << "Test truncated from " << maxgid << " groups to "
+                  << maxgid_limit << " to keep the run time reasonable "
+            "enough\n";
+        maxgid = maxgid_limit;
+    }
+
     for (gid_t g = 0; g <= maxgid; g++) {
         if (groups.find(g) == groups.end()) {
             std::cout << "Checking if user does not belong to group "
index 1533e317bc75154e7290872c20f57727f09f1fbe..d4068b17a838ca952ba44db2d0322b32faf4bff2 100644 (file)
@@ -31,5 +31,6 @@
 
 ATF_TP_ADD_TCS(tp)
 {
+    if (tp != NULL) {}  /* Use tp. */
     return atf_no_error();
 }
diff --git a/unit/atf-src/atf-sh/Kyuafile b/unit/atf-src/atf-sh/Kyuafile
new file mode 100644 (file)
index 0000000..01a9253
--- /dev/null
@@ -0,0 +1,11 @@
+syntax("kyuafile", 1)
+
+test_suite("atf")
+
+atf_test_program{name="tc_test"}
+atf_test_program{name="tp_test"}
+atf_test_program{name="normalize_test"}
+atf_test_program{name="config_test"}
+atf_test_program{name="atf-check_test"}
+atf_test_program{name="atf_check_test"}
+atf_test_program{name="integration_test"}
index 54a88a08bcec7f31d2c7c27c97b4a963715d39d2..f8f521a4c7f3758fa3b16818489a6f04d036da5c 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 
 libexec_PROGRAMS += atf-sh/atf-check
 atf_sh_atf_check_SOURCES = atf-sh/atf-check.cpp
-atf_sh_atf_check_LDADD = libatf-c++.la
+atf_sh_atf_check_LDADD = $(ATF_CXX_LIBS)
 dist_man_MANS += atf-sh/atf-check.1
 
 bin_PROGRAMS += atf-sh/atf-sh
 atf_sh_atf_sh_SOURCES = atf-sh/atf-sh.cpp
-atf_sh_atf_sh_LDADD = libatf-c++.la
+atf_sh_atf_sh_LDADD = $(ATF_CXX_LIBS)
 dist_man_MANS += atf-sh/atf-sh.1
 
 atf_sh_DATA = atf-sh/libatf-sh.subr
@@ -43,7 +43,22 @@ EXTRA_DIST += $(atf_sh_DATA)
 
 dist_man_MANS += atf-sh/atf-sh-api.3
 
-tests_atf_sh_DATA = atf-sh/Atffile
+atf_aclocal_DATA += atf-sh/atf-sh.m4
+EXTRA_DIST += atf-sh/atf-sh.m4
+
+atf_shpkgconfigdir = $(atf_pkgconfigdir)
+atf_shpkgconfig_DATA = atf-sh/atf-sh.pc
+CLEANFILES += atf-sh/atf-sh.pc
+EXTRA_DIST += atf-sh/atf-sh.pc.in
+atf-sh/atf-sh.pc: $(srcdir)/atf-sh/atf-sh.pc.in Makefile
+       test -d atf-sh || mkdir -p atf-sh
+       sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \
+           -e 's#__EXEC_PREFIX__#$(exec_prefix)#g' \
+           <$(srcdir)/atf-sh/atf-sh.pc.in >atf-sh/atf-sh.pc.tmp
+       mv atf-sh/atf-sh.pc.tmp atf-sh/atf-sh.pc
+
+tests_atf_sh_DATA = atf-sh/Atffile \
+                    atf-sh/Kyuafile
 tests_atf_shdir = $(pkgtestsdir)/atf-sh
 EXTRA_DIST += $(tests_atf_sh_DATA)
 
index 93f5348cfa596b7d1b556021a6ed774280507fbb..06904bc3ffd32a5ad6cf97b6d5a944586b0bdd27 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" Automated Testing Framework (atf)
 .\"
-.\" Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
index 862bfa28bbd0a58a2cebc54e288447a0246ed185..8fc1545c22018300dbe575f7cf8be20c77322f8b 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2008 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -40,6 +40,7 @@ extern "C" {
 #include <cstdlib>
 #include <cstring>
 #include <fstream>
+#include <ios>
 #include <iostream>
 #include <iterator>
 #include <list>
@@ -48,9 +49,9 @@ extern "C" {
 
 #include "atf-c++/check.hpp"
 #include "atf-c++/config.hpp"
-#include "atf-c++/utils.hpp"
 
 #include "atf-c++/detail/application.hpp"
+#include "atf-c++/detail/auto_array.hpp"
 #include "atf-c++/detail/exceptions.hpp"
 #include "atf-c++/detail/fs.hpp"
 #include "atf-c++/detail/process.hpp"
@@ -115,7 +116,7 @@ public:
         std::ostream(NULL),
         m_fd(-1)
     {
-        atf::utils::auto_array< char > buf(new char[p.str().length() + 1]);
+        atf::auto_array< char > buf(new char[p.str().length() + 1]);
         std::strcpy(buf.get(), p.c_str());
 
         m_fd = ::mkstemp(buf.get());
@@ -185,6 +186,7 @@ static struct name_number {
     { "int", SIGINT },
     { "quit", SIGQUIT },
     { "trap", SIGTRAP },
+    { "abrt", SIGABRT },
     { "kill", SIGKILL },
     { "segv", SIGSEGV },
     { "pipe", SIGPIPE },
@@ -269,7 +271,7 @@ parse_status_check_arg(const std::string& arg)
         else
             value = parse_signal(value_str);
     } else
-        throw atf::application::usage_error("Invalid output checker");
+        throw atf::application::usage_error("Invalid status checker");
 
     return status_check(type, negated, value);
 }
@@ -379,7 +381,7 @@ grep_file(const atf::fs::path& path, const std::string& regexp)
     bool found = false;
 
     std::string line;
-    while (!found && std::getline(stream, line).good()) {
+    while (!found && !std::getline(stream, line).fail()) {
         if (atf::text::match(line, regexp))
             found = true;
     }
@@ -422,8 +424,6 @@ compare_files(const atf::fs::path& p1, const atf::fs::path& p2)
         if (f2.bad())
             throw std::runtime_error("Failed to read from " + p1.str());
 
-        std::cout << "1 read: " << f1.gcount() << "\n";
-        std::cout << "2 read: " << f2.gcount() << "\n";
         if ((f1.gcount() == 0) && (f2.gcount() == 0)) {
             equal = true;
             break;
index 4873fb4d81eee57b758f66e53edec5b9feb3a256..7319a2b882ba5984953ea2c92bf4336e6797e234 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
 # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
-# The Atf_Check variable is set by atf-sh.
+# The Atf_Check and Atf-Shell variables are set by atf-sh.
 
 h_pass()
 {
@@ -36,7 +36,7 @@ h_pass()
     echo "Running [atf-check $*] against [${cmd}]"
 
     cat >script.sh <<EOF
-#! $(atf-config -t atf_shell)
+#! ${Atf_Shell}
 ${cmd}
 EOF
     chmod +x script.sh
@@ -54,7 +54,7 @@ h_fail()
     echo "Running [atf-check $*] against [${cmd}]"
 
     cat >script.sh <<EOF
-#! $(atf-config -t atf_shell)
+#! ${Atf_Shell}
 ${cmd}
 EOF
     chmod +x script.sh
@@ -211,10 +211,10 @@ oflag_inline_body()
     h_pass "echo foo bar" -o inline:"foo bar\n"
     h_pass "printf 'foo bar'" -o inline:"foo bar"
     h_pass "printf '\t\n\t\n'" -o inline:"\t\n\t\n"
-    # XXX Ugly hack to workaround the lack of \e in FreeBSD.  Look for a
-    # nicer solution...
+    # XXX Ugly hack to workaround the lack of \e in FreeBSD.  Also, \e doesn't
+    # seem to work as expected in Linux.  Look for a nicer solution.
     case $(uname) in
-    FreeBSD)
+    Darwin|FreeBSD|Linux)
         h_pass "printf '\a\b\f\n\r\t\v'" -o inline:"\a\b\f\n\r\t\v"
         ;;
     *)
@@ -234,6 +234,7 @@ oflag_match_head()
 }
 oflag_match_body()
 {
+    h_pass "printf no-newline" -o "match:^no-newline"
     h_pass "echo line1; echo foo bar" -o "match:^foo"
     h_pass "echo foo bar" -o "match:o b"
     h_fail "echo foo bar" -o "match:baz"
@@ -330,10 +331,10 @@ eflag_inline_body()
     h_pass "echo foo bar 1>&2" -e inline:"foo bar\n"
     h_pass "printf 'foo bar' 1>&2" -e inline:"foo bar"
     h_pass "printf '\t\n\t\n' 1>&2" -e inline:"\t\n\t\n"
-    # XXX Ugly hack to workaround the lack of \e in FreeBSD.  Look for a
-    # nicer solution...
+    # XXX Ugly hack to workaround the lack of \e in FreeBSD.  Also, \e doesn't
+    # seem to work as expected in Linux.  Look for a nicer solution.
     case $(uname) in
-    FreeBSD)
+    Darwin|FreeBSD|Linux)
         h_pass "printf '\a\b\f\n\r\t\v' 1>&2" -e inline:"\a\b\f\n\r\t\v"
         ;;
     *)
@@ -365,6 +366,7 @@ eflag_match_head()
 }
 eflag_match_body()
 {
+    h_pass "printf no-newline 1>&2" -e "match:^no-newline"
     h_pass "echo line1 1>&2; echo foo bar 1>&2" -e "match:^foo"
     h_pass "echo foo bar 1>&2" -e "match:o b"
     h_fail "echo foo bar 1>&2" -e "match:baz"
@@ -398,6 +400,17 @@ eflag_negated_body()
     h_fail "echo foo bar 1>&2" -e not-match:foo
 }
 
+atf_test_case stdin
+stdin_head()
+{
+    atf_set "descr" "Tests that stdin is preserved"
+}
+stdin_body()
+{
+    echo "hello" | ${Atf_Check} -o match:"hello" cat || \
+        atf_fail "atf-check does not seem to respect stdin"
+}
+
 atf_test_case invalid_umask
 invalid_umask_head()
 {
@@ -442,6 +455,8 @@ atf_init_test_cases()
     atf_add_test_case eflag_multiple
     atf_add_test_case eflag_negated
 
+    atf_add_test_case stdin
+
     atf_add_test_case invalid_umask
 }
 
index 2450d2df994686250fa92207e665c88adf961235..247b52c838778c6425bd0b6a21e98c3ead041dc6 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" Automated Testing Framework (atf)
 .\"
-.\" Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
index b587dafba06ae3a7bea7e1a12e60d3ecbd4ff7c0..d7bc7fc82bc0016c1129ef4eb57ce9b79a8f1038 100644 (file)
@@ -65,10 +65,12 @@ construct_script(const char* filename)
 {
     const std::string libexecdir = atf::config::get("atf_libexecdir");
     const std::string pkgdatadir = atf::config::get("atf_pkgdatadir");
+    const std::string shell = atf::config::get("atf_shell");
 
     std::string* command = new std::string();
     command->reserve(512);
     (*command) += ("Atf_Check='" + libexecdir + "/atf-check' ; " +
+                   "Atf_Shell='" + shell + "' ; " +
                    ". " + pkgdatadir + "/libatf-sh.subr ; " +
                    ". " + fix_plain_name(filename) + " ; " +
                    "main \"${@}\"");
diff --git a/unit/atf-src/atf-sh/atf-sh.m4 b/unit/atf-src/atf-sh/atf-sh.m4
new file mode 100644 (file)
index 0000000..7215d1c
--- /dev/null
@@ -0,0 +1,53 @@
+dnl
+dnl Automated Testing Framework (atf)
+dnl
+dnl Copyright 2011 Google Inc.
+dnl All rights reserved.
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted provided that the following conditions are
+dnl met:
+dnl
+dnl * Redistributions of source code must retain the above copyright
+dnl   notice, this list of conditions and the following disclaimer.
+dnl * Redistributions in binary form must reproduce the above copyright
+dnl   notice, this list of conditions and the following disclaimer in the
+dnl   documentation and/or other materials provided with the distribution.
+dnl * Neither the name of Google Inc. nor the names of its contributors
+dnl   may be used to endorse or promote products derived from this software
+dnl   without specific prior written permission.
+dnl
+dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+dnl OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+dnl
+
+dnl ATF_CHECK_SH([version-spec])
+dnl
+dnl Checks if atf-sh is present.  If version-spec is provided, ensures that
+dnl the installed version of atf-sh matches the required version.  This
+dnl argument must be something like '>= 0.14' and accepts any version
+dnl specification supported by pkg-config.
+dnl
+dnl Defines and substitutes ATF_SH with the full path to the atf-sh interpreter.
+AC_DEFUN([ATF_CHECK_SH], [
+    spec="atf-sh[]m4_default_nblank([ $1], [])"
+    _ATF_CHECK_ARG_WITH(
+        [AC_MSG_CHECKING([for ${spec}])
+         PKG_CHECK_EXISTS([${spec}], [found=yes], [found=no])
+         if test "${found}" = yes; then
+             ATF_SH="$(${PKG_CONFIG} --variable=interpreter atf-sh)"
+             AC_SUBST([ATF_SH], [${ATF_SH}])
+             found_atf_sh=yes
+         fi
+         AC_MSG_RESULT([${ATF_SH}])],
+        [required ${spec} not found])
+])
diff --git a/unit/atf-src/atf-sh/atf-sh.pc.in b/unit/atf-src/atf-sh/atf-sh.pc.in
new file mode 100644 (file)
index 0000000..930dc4c
--- /dev/null
@@ -0,0 +1,8 @@
+# ATF pkg-config file
+
+exec_prefix=__EXEC_PREFIX__
+interpreter=${exec_prefix}/bin/atf-sh
+
+Name: atf-sh
+Description: Automated Testing Framework (POSIX shell binding)
+Version: __ATF_VERSION__
index ef16516dd82756ae88d368efa4640232d7945495..da13c92cdd4065681116a893f0df37c0584627c5 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -54,7 +54,7 @@ atf_test_case expout_mismatch
 expout_mismatch_head()
 {
     atf_set "descr" "Verifies that atf_check prints a diff of the" \
-                    "stdout and the expected stdout if the two do no" \
+                    "stdout and the expected stdout if the two do not" \
                     "match"
 }
 expout_mismatch_body()
@@ -79,7 +79,7 @@ atf_test_case experr_mismatch
 experr_mismatch_head()
 {
     atf_set "descr" "Verifies that atf_check prints a diff of the" \
-                    "stderr and the expected stderr if the two do no" \
+                    "stderr and the expected stderr if the two do not" \
                     "match"
 }
 experr_mismatch_body()
index a6ae0e760693c1989593216a8d1c750a9d8ec556..f7f57f0199f6cdd88473a14ca6674914e8b4fa30 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -36,14 +36,14 @@ has_body()
 {
     h="$(atf_get_srcdir)/misc_helpers -s $(atf_get_srcdir)"
 
-    atf_check -s eq:0 -o match:'foo not found' -e empty -x \
+    atf_check -s eq:0 -o match:'foo not found' -e ignore -x \
               "TEST_VARIABLE=foo ${h} config_has"
 
-    atf_check -s eq:0 -o match:'foo found' -e empty -x \
+    atf_check -s eq:0 -o match:'foo found' -e ignore -x \
               "TEST_VARIABLE=foo ${h} -v foo=bar config_has"
 
     echo "Checking for deprecated variables"
-    atf_check -s eq:0 -o match:'workdir not found' -e empty -x \
+    atf_check -s eq:0 -o match:'workdir not found' -e ignore -x \
               "TEST_VARIABLE=workdir ${h} config_has"
 }
 
@@ -67,10 +67,10 @@ get_body()
     [ "${v}" = "the default value" ] || \
         atf_fail "Default value does not work"
 
-    atf_check -s eq:0 -o match:'foo = bar' -e empty -x \
+    atf_check -s eq:0 -o match:'foo = bar' -e ignore -x \
               "TEST_VARIABLE=foo ${h} -v foo=bar config_get"
 
-    atf_check -s eq:0 -o match:'foo = baz' -e empty -x \
+    atf_check -s eq:0 -o match:'foo = baz' -e ignore -x \
               "TEST_VARIABLE=foo ${h} -v foo=baz config_get"
 }
 
index a3a9b88c12d1c518da7a3825bfd0146589b92c28..8525b220c7ca85a97ca3424afd89eed00c338419 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -33,9 +33,6 @@ set -e
 # GLOBAL VARIABLES
 # ------------------------------------------------------------------------
 
-# The list of all test cases defined by the test program.
-Defined_Test_Cases=
-
 # Values for the expect property.
 Expect=pass
 Expect_Reason=
@@ -61,9 +58,7 @@ Test_Case=
 Test_Case_Vars=
 
 # The list of all test cases provided by the test program.
-# Subset of ${Defined_Test_Cases}.
 Test_Cases=
-Test_Cases_With_Cleanup=
 
 # ------------------------------------------------------------------------
 # PUBLIC INTERFACE
@@ -79,9 +74,6 @@ Test_Cases_With_Cleanup=
 #
 atf_add_test_case()
 {
-    _atf_is_tc_defined "${1}" || \
-        _atf_error 128 "Test case ${1} was not correctly defined by" \
-                       "this test program"
     Test_Cases="${Test_Cases} ${1}"
 }
 
@@ -157,7 +149,7 @@ atf_expect_death()
     _atf_validate_expect
 
     Expect=death
-    _atf_create_resfile expected_death -1 "${@}"
+    _atf_create_resfile "expected_death: ${*}"
 }
 
 #
@@ -170,7 +162,7 @@ atf_expect_timeout()
     _atf_validate_expect
 
     Expect=timeout
-    _atf_create_resfile expected_timeout -1 "${@}"
+    _atf_create_resfile "expected_timeout: ${*}"
 }
 
 #
@@ -185,7 +177,11 @@ atf_expect_exit()
     _atf_validate_expect
 
     Expect=exit
-    _atf_create_resfile expected_exit "${_exitcode}" "${@}"
+    if [ "${_exitcode}" = "-1" ]; then
+        _atf_create_resfile "expected_exit: ${*}"
+    else
+        _atf_create_resfile "expected_exit(${_exitcode}): ${*}"
+    fi
 }
 
 #
@@ -226,7 +222,11 @@ atf_expect_signal()
     _atf_validate_expect
 
     Expect=signal
-    _atf_create_resfile expected_signal "${_signo}" "${@}"
+    if [ "${_signo}" = "-1" ]; then
+        _atf_create_resfile "expected_signal: ${*}"
+    else
+        _atf_create_resfile "expected_signal(${_signo}): ${*}"
+    fi
 }
 
 #
@@ -238,7 +238,7 @@ atf_expect_signal()
 #
 atf_expected_failure()
 {
-    _atf_create_resfile expected_failure -1 "${Expect_Reason}:" "${@}"
+    _atf_create_resfile "expected_failure: ${Expect_Reason}: ${*}"
     exit 0
 }
 
@@ -256,7 +256,7 @@ atf_fail()
             atf_expected_failure "${@}"
             ;;
         pass)
-            _atf_create_resfile failed -1 "${@}"
+            _atf_create_resfile "failed: ${*}"
             exit 1
             ;;
         *)
@@ -284,18 +284,7 @@ atf_get()
 #
 atf_get_srcdir()
 {
-    _atf_internal_get srcdir
-}
-
-#
-# atf_init_test_cases
-#
-#   The function in charge of registering the test cases that have to
-#   be made available to the user.  Must be redefined.
-#
-atf_init_test_cases()
-{
-    _atf_error 128 "No test cases defined"
+    echo ${Source_Dir}
 }
 
 #
@@ -312,7 +301,7 @@ atf_pass()
             atf_fail "Test case was expecting a failure but got a pass instead"
             ;;
         pass)
-            _atf_create_resfile passed -1
+            _atf_create_resfile passed
             exit 0
             ;;
         *)
@@ -377,7 +366,7 @@ atf_set()
 #
 atf_skip()
 {
-    _atf_create_resfile skipped -1 "${@}"
+    _atf_create_resfile "skipped: ${*}"
     exit 0
 }
 
@@ -391,12 +380,10 @@ atf_skip()
 #
 atf_test_case()
 {
-    Defined_Test_Cases="${Defined_Test_Cases} ${1}"
-
     eval "${1}_head() { :; }"
-    eval "${1}_body() { :; }"
+    eval "${1}_body() { atf_fail 'Test case not implemented'; }"
     if [ "${2}" = cleanup ]; then
-        Test_Cases_With_Cleanup="${Test_Cases_With_Cleanup} ${1}"
+        eval __has_cleanup_${1}=true
         eval "${1}_cleanup() { :; }"
     else
         eval "${1}_cleanup() {
@@ -440,69 +427,20 @@ _atf_config_set_from_str()
 }
 
 #
-# _atf_create_resfile result arg [reason ...]
+# _atf_create_resfile contents
 #
 #   Creates the results file.
 #
 _atf_create_resfile()
 {
-    _result="${1}"; shift
-    if [ "${1}" -eq -1 ]; then
-        _arg=""
-        shift
-    else
-        _arg="(${1})"
-        shift
-    fi
-    if [ ${#} -gt 0 ]; then
-        _reason=": ${*}"
-    else
-        _reason=""
-    fi
-
     if [ -n "${Results_File}" ]; then
-        echo "${_result}${_arg}${_reason}" >"${Results_File}" || \
+        echo "${*}" >"${Results_File}" || \
             _atf_error 128 "Cannot create results file '${Results_File}'"
     else
-        echo "${_result}${_arg}${_reason}"
+        echo "${*}"
     fi
 }
 
-#
-# _atf_ensure_boolean var
-#
-#   Ensures that the test case defined the variable 'var' to a boolean
-#   value.
-#
-_atf_ensure_boolean()
-{
-    _atf_ensure_not_empty ${1}
-
-    case $(atf_get ${1}) in
-    [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee])
-        atf_set ${1} true
-        ;;
-    [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee])
-        atf_set ${1} false
-        ;;
-    *)
-        _atf_error 128 "Invalid value for boolean variable \`${1}'"
-        ;;
-    esac
-}
-
-#
-# _atf_ensure_not_empty var
-#
-#   Ensures that the test case defined the variable 'var' to a non-empty
-#   value.
-#
-_atf_ensure_not_empty()
-{
-    [ -n "$(atf_get ${1})" ] || \
-        _atf_error 128 "Undefined or empty variable \`${1}'"
-}
-
 #
 # _atf_error error_code [msg1 [.. msgN]]
 #
@@ -522,6 +460,17 @@ _atf_error()
     exit ${_error_code}
 }
 
+#
+# _atf_warning msg1 [.. msgN]
+#
+#   Prints the given warning message (which can be composed of multiple
+#   arguments, in which case are joined by a single space).
+#
+_atf_warning()
+{
+    echo "${Prog_Name}: WARNING:" "$@" 1>&2
+}
+
 #
 # _atf_find_in_path program
 #
@@ -556,48 +505,11 @@ _atf_find_in_path()
 _atf_has_tc()
 {
     for _tc in ${Test_Cases}; do
-        if [ ${_tc} = ${1} ]; then
-            return 0
-        fi
+        [ "${_tc}" != "${1}" ] || return 0
     done
     return 1
 }
 
-#
-# _atf_get_bool varname
-#
-#   Evaluates a test case-specific variable as a boolean and returns its
-#   value.
-#
-_atf_get_bool()
-{
-    eval $(atf_get ${1})
-}
-
-#
-# _atf_internal_get varname
-#
-#   Prints the value of a test case-specific internal variable.  Given
-#   that one should not get the value of non-existent variables, it is
-#   fine to always use this function as 'val=$(_atf_internal_get var)'.
-#
-_atf_internal_get()
-{
-    eval echo \${__tc_internal_var_${Test_Case}_${1}}
-}
-
-#
-# _atf_internal_set varname val1 [.. valN]
-#
-#   Sets the test case's private variable 'varname' to the specified
-#   values which are concatenated using a single blank space.
-#
-_atf_internal_set()
-{
-    _var=${1}; shift
-    eval __tc_internal_var_${Test_Case}_${_var}=\"\${*}\"
-}
-
 #
 # _atf_list_tcs
 #
@@ -640,7 +552,6 @@ _atf_normalize()
 #
 _atf_parse_head()
 {
-    ${Parsing_Head} && _atf_error 128 "_atf_parse_head called recursively"
     Parsing_Head=true
 
     Test_Case="${1}"
@@ -650,11 +561,8 @@ _atf_parse_head()
         atf_set has.cleanup "true"
     fi
 
-    atf_set ident "${1}"
     ${1}_head
-    _atf_ensure_not_empty ident
-    test $(atf_get ident) = "${1}" || \
-        _atf_error 128 "Test case redefined ident"
+    atf_set ident "${1}"
 
     Parsing_Head=false
 }
@@ -684,72 +592,37 @@ _atf_run_tc()
         ;;
     esac
 
-    if _atf_has_tc ${_tcname}; then
-        _atf_parse_head ${_tcname}
-
-        _atf_internal_set srcdir "${Source_Dir}"
-
-        case ${_tcpart} in
-        body)
-            if ${_tcname}_body; then
-                _atf_validate_expect
-                _atf_create_resfile passed -1
-            else
-                Expect=pass
-                atf_fail "Test case body returned a non-ok exit code, but" \
-                    "this is not allowed"
-            fi
-            ;;
-        cleanup)
-            if _atf_has_cleanup "${_tcname}"; then
-                if ${_tcname}_cleanup; then
-                    :
-                else
-                    _atf_error 128 "The test case cleanup returned a non-ok" \
-                        "exit code, but this is not allowed"
-                fi
-            fi
-            ;;
-        *)
-            _atf_error 128 "Unknown test case part"
-            ;;
-        esac
-    else
-        _atf_syntax_error "Unknown test case \`${1}'"
+    _atf_has_tc "${_tcname}" || _atf_syntax_error "Unknown test case \`${1}'"
+
+    if [ "${__RUNNING_INSIDE_ATF_RUN}" != "internal-yes-value" ]; then
+        _atf_warning "Running test cases without atf-run(1) is unsupported"
+        _atf_warning "No isolation nor timeout control is being applied;" \
+            "you may get unexpected failures; see atf-test-case(4)"
     fi
-}
 
-#
-# _atf_sighup_handler
-#
-#   Handler for the SIGHUP signal that registers its occurrence so that
-#   it can be processed at a later stage.
-#
-_atf_sighup_handler()
-{
-    Held_Signals="${Held_Signals} SIGHUP"
-}
+    _atf_parse_head ${_tcname}
 
-#
-# _atf_sigint_handler
-#
-#   Handler for the SIGINT signal that registers its occurrence so that
-#   it can be processed at a later stage.
-#
-_atf_sigint_handler()
-{
-    Held_Signals="${Held_Signals} SIGINT"
-}
-
-#
-# _atf_sigterm_handler
-#
-#   Handler for the SIGTERM signal that registers its occurrence so that
-#   it can be processed at a later stage.
-#
-_atf_sigterm_handler()
-{
-    Held_Signals="${Held_Signals} SIGTERM"
+    case ${_tcpart} in
+    body)
+        if ${_tcname}_body; then
+            _atf_validate_expect
+            _atf_create_resfile passed
+        else
+            Expect=pass
+            atf_fail "Test case body returned a non-ok exit code, but" \
+                "this is not allowed"
+        fi
+        ;;
+    cleanup)
+        if _atf_has_cleanup "${_tcname}"; then
+            ${_tcname}_cleanup || _atf_error 128 "The test case cleanup" \
+                "returned a non-ok exit code, but this is not allowed"
+        fi
+        ;;
+    *)
+        _atf_error 128 "Unknown test case part"
+        ;;
+    esac
 }
 
 #
@@ -765,20 +638,6 @@ _atf_syntax_error()
     exit 1
 }
 
-#
-# _atf_is_tc_defined tc-name
-#
-#   Returns a boolean indicating if the given test case was defined by the
-#   test program or not.
-#
-_atf_is_tc_defined()
-{
-    for _tc in ${Defined_Test_Cases}; do
-        [ ${_tc} = ${1} ] && return 0
-    done
-    return 1
-}
-
 #
 # _atf_has_cleanup tc-name
 #
@@ -787,10 +646,9 @@ _atf_is_tc_defined()
 #
 _atf_has_cleanup()
 {
-    for _tc in ${Test_Cases_With_Cleanup}; do
-        [ ${_tc} = ${1} ] && return 0
-    done
-    return 1
+    _found=true
+    eval "[ x\"\${__has_cleanup_${1}}\" = xtrue ] || _found=false"
+    [ "${_found}" = true ]
 }
 
 #
@@ -898,17 +756,6 @@ main()
         _atf_error 1 "Cannot find the test program in the source" \
                      "directory \`${Source_Dir}'"
 
-    # Set some global variables useful to the user.  Not specific to the
-    # test case because they may be needed during initialization too.
-    # XXX I'm not too fond on this though.  Sure, it is very useful in some
-    # situations -- such as in NetBSD's fs/tmpfs/* tests where each test
-    # program includes a helper subroutines file -- but there are also
-    # other, maybe better ways to achieve the same.  Because, for example,
-    # at the moment it is not possible to detect failures in the inclusion
-    # and report them nicely.  Plus this change is difficult to implement
-    # in the current C++ API.
-    _atf_internal_set srcdir "${Source_Dir}"
-
     # Call the test program's hook to register all available test cases.
     atf_init_test_cases
 
index 860f1009ef01fb2c1205567b1a78c83cee054c28..8b72f0ae2b754785d1ee7fb9cf827123d1d146b6 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -235,6 +235,12 @@ tc_fail_body()
     exit 1
 }
 
+atf_test_case tc_missing_body
+tc_missing_body_head()
+{
+    atf_set "descr" "Helper test case for the t_tc test program"
+}
+
 # -------------------------------------------------------------------------
 # Helper tests for "t_tp".
 # -------------------------------------------------------------------------
@@ -280,6 +286,7 @@ atf_init_test_cases()
     atf_add_test_case tc_pass_false
     atf_add_test_case tc_pass_return_error
     atf_add_test_case tc_fail
+    atf_add_test_case tc_missing_body
 
     # Add helper tests for t_tp.
     [ -f $(atf_get_srcdir)/subrs ] && . $(atf_get_srcdir)/subrs
index b87141cd71f16514584c4a573d65f3cd42f9dd42..0f59da03bd6cead03ec4f074e7a411f866d023e7 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
index 5a1698cfe171be227fb11b46f93734fd442f49d4..5bece420007935694427fc41ffe4ee9b3edcfe84 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -43,9 +43,22 @@ default_status_body()
     atf_check -s eq:1 -o ignore -e match:'An error' ${h} tc_fail
 }
 
+atf_test_case missing_body
+missing_body_head()
+{
+    atf_set "descr" "Verifies that test cases without a body are reported" \
+                    "as failed"
+}
+missing_body_body()
+{
+    h="$(atf_get_srcdir)/misc_helpers -s $(atf_get_srcdir)"
+    atf_check -s eq:1 -o ignore -e ignore ${h} tc_missing_body
+}
+
 atf_init_test_cases()
 {
     atf_add_test_case default_status
+    atf_add_test_case missing_body
 }
 
 # vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4
index 07f9c0c806085c9c6c362a1eb17681bde3d31593..c159813d51bd4bbde766061bfad81f507b38772c 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -44,7 +44,7 @@ helper_subr() {
 EOF
 
     atf_check -s eq:0 -o match:'Calling helper' \
-        -o match:'This is a helper subroutine' -e empty ./work/misc_helpers \
+        -o match:'This is a helper subroutine' -e ignore ./work/misc_helpers \
         -s "$(pwd)"/work tp_srcdir
 }
 
index e85358a8bfd4f5a61b1a60358c953e42db69a9c9..ec553b38834204dd3f7e311766583cab6890f23b 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@ bin_PROGRAMS += atf-version/atf-version
 atf_version_atf_version_SOURCES = atf-version/atf-version.cpp
 nodist_atf_version_atf_version_SOURCES = atf-version/revision.h
 atf_version_atf_version_CPPFLAGS = -Iatf-version
-atf_version_atf_version_LDADD = libatf-c++.la
+atf_version_atf_version_LDADD = $(ATF_CXX_LIBS)
 dist_man_MANS += atf-version/atf-version.1
 
 EXTRA_DIST += atf-version/generate-revision.sh
@@ -44,11 +44,11 @@ atf-version/revision.h: atf-version/revision.h.stamp
            cp -p atf-version/revision.h.stamp atf-version/revision.h
 
 CLEANFILES += atf-version/revision.h.stamp
-.PHONY: atf-version/revision.h.stamp
+PHONY_TARGETS += atf-version/revision.h.stamp
 atf-version/revision.h.stamp:
        @test -d atf-version || mkdir -p atf-version
        @$(top_srcdir)/atf-version/generate-revision.sh \
-           -m "$(MTN)" -r $(top_srcdir) -o atf-version/revision.h.stamp \
+           -g "$(GIT)" -r $(top_srcdir) -o atf-version/revision.h.stamp \
            -v $(PACKAGE_VERSION)
 
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
index 751df08ec4d17571b568833ba3af613758aa9a56..136f13cd463dc0de45eb1a3d12d279df0a2f05d9 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" Automated Testing Framework (atf)
 .\"
-.\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
index 60ef935b4a6fd471f19b001e5d7334d703e7e1aa..dfd092c7490288a9916d9efd74faaea35c96bde6 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -69,7 +69,7 @@ atf_version::main(void)
 #if defined(PACKAGE_REVISION_TYPE_DIST)
     std::cout << format_text("Built from a distribution file; no revision "
         "information available.") << "\n";
-#elif defined(PACKAGE_REVISION_TYPE_MTN)
+#elif defined(PACKAGE_REVISION_TYPE_GIT)
     std::cout << format_text_with_tag(PACKAGE_REVISION_BRANCH, "Branch: ",
                                       false) << "\n";
     std::cout << format_text_with_tag(PACKAGE_REVISION_BASE
index 68ae6de146f2b121d4379d056daaaeefc719ab06..169be85f941a6c11b1c29b103e2dbba13faa08ac 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -35,9 +35,9 @@
 
 set -e
 
-Prog_Name=`echo "${0}" | sed 's;.*/;;'`
+Prog_Name=${0##*/}
 
-MTN=
+GIT=
 ROOT=
 
 #
@@ -49,57 +49,10 @@ err() {
 }
 
 #
-# call_mtn args
+# call_git args
 #
-call_mtn() {
-    ${MTN} --root=${ROOT} "${@}"
-}
-
-# extract_certs rev
-#
-extract_certs() {
-    call_mtn automate certs ${1} | awk '
-BEGIN {
-    current_cert = ""
-}
-
-/^[ \t]*name "([^"]*)"[ \t]*$/ {
-    current_cert = substr($2, 2, length($2) - 2)
-    next
-}
-
-/^[ \t]*value "([^"]*)"[ \t]*$/ {
-    value = substr($2, 2, length($2) - 2)
-    if (current_cert == "branch") {
-        print "rev_branch=\"" value "\""
-    } else if (current_cert == "date") {
-        print "rev_date=\"" value "\""
-    }
-    next
-}
-'
-}
-
-#
-# get_rev_info_into_vars
-#
-# Sets the following variables to describe the current revision of the tree:
-#    rev_base_id: The base revision identifier.
-#    rev_branch: The branch name.
-#    rev_modified: true if the tree has been locally modified.
-#    rev_date: The date of the revision.
-#
-get_rev_info_into_vars() {
-    rev_base_id=`call_mtn automate get_base_revision_id`
-
-    if call_mtn status | grep "no changes" >/dev/null; then
-        rev_modified=false
-    else
-        rev_modified=true
-    fi
-
-    # The following defines several rev_* variables.
-    eval `extract_certs ${rev_base_id}`
+call_git() {
+    ( cd "${ROOT}" && "${GIT}" "${@}" )
 }
 
 #
@@ -115,16 +68,23 @@ generate_from_dist() {
 }
 
 #
-# generate_from_mtn revfile
+# generate_from_git revfile
 #
-generate_from_mtn() {
+generate_from_git() {
     revfile=${1}
 
-    get_rev_info_into_vars
+    rev_base_id=$(call_git rev-parse HEAD)
+    rev_branch=$(call_git branch | grep '^\* ' | cut -d ' ' -f 2-)
+    rev_date=$(call_git log -1 | grep '^Date:' | sed -e 's,^Date:[ \t]*,,')
+    if [ -z "$(call_git status -s)" ]; then
+        rev_modified=false
+    else
+        rev_modified=true
+    fi
 
     >${revfile}
 
-    echo "#define PACKAGE_REVISION_TYPE_MTN" >>${revfile}
+    echo "#define PACKAGE_REVISION_TYPE_GIT" >>${revfile}
 
     echo "#define PACKAGE_REVISION_BRANCH \"${rev_branch}\"" >>${revfile}
     echo "#define PACKAGE_REVISION_BASE \"${rev_base_id}\"" >>${revfile}
@@ -144,10 +104,10 @@ generate_from_mtn() {
 main() {
     outfile=
     version=
-    while getopts :m:r:o:v: arg; do
+    while getopts :g:r:o:v: arg; do
         case ${arg} in
-            m)
-                MTN=${OPTARG}
+            g)
+                GIT=${OPTARG}
                 ;;
             o)
                 outfile=${OPTARG}
@@ -170,8 +130,8 @@ main() {
     [ -n "${version}" ] || \
         err "Must specify a version number with -v"
 
-    if [ -n "${MTN}" -a -d ${ROOT}/_MTN ]; then
-        generate_from_mtn ${outfile}
+    if [ -n "${GIT}" -a -d ${ROOT}/.git ]; then
+        generate_from_git ${outfile}
     else
         generate_from_dist ${outfile} ${version}
     fi
index 8fe77af234b22b682cac0ddf62e2e6522896fb22..a590999f966caf8cab41d18a646a00bc20da400a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 
 check_PROGRAMS = bootstrap/h_app_empty
 bootstrap_h_app_empty_SOURCES = bootstrap/h_app_empty.cpp
-bootstrap_h_app_empty_LDADD = libatf-c++.la
+bootstrap_h_app_empty_LDADD = $(ATF_CXX_LIBS)
 
 check_PROGRAMS += bootstrap/h_app_opts_args
 bootstrap_h_app_opts_args_SOURCES = bootstrap/h_app_opts_args.cpp
-bootstrap_h_app_opts_args_LDADD = libatf-c++.la
+bootstrap_h_app_opts_args_LDADD = $(ATF_CXX_LIBS)
 
 check_PROGRAMS += bootstrap/h_tp_basic_c
 bootstrap_h_tp_basic_c_SOURCES = bootstrap/h_tp_basic_c.c
@@ -41,7 +41,7 @@ bootstrap_h_tp_basic_c_LDADD = libatf-c.la
 
 check_PROGRAMS += bootstrap/h_tp_basic_cpp
 bootstrap_h_tp_basic_cpp_SOURCES = bootstrap/h_tp_basic_cpp.cpp
-bootstrap_h_tp_basic_cpp_LDADD = libatf-c++.la
+bootstrap_h_tp_basic_cpp_LDADD = $(ATF_CXX_LIBS)
 
 check_SCRIPTS = bootstrap/h_tp_basic_sh
 CLEANFILES += bootstrap/h_tp_basic_sh
@@ -103,6 +103,7 @@ testsuite_incs=     $(srcdir)/bootstrap/t_application_help.at \
        echo 'm4_define(AT_PACKAGE_VERSION,   @PACKAGE_VERSION@)'; \
        echo 'm4_define(AT_PACKAGE_STRING,    @PACKAGE_STRING@)'; \
        echo 'm4_define(AT_PACKAGE_BUGREPORT, @PACKAGE_BUGREPORT@)'; \
+       echo 'm4_define(ENABLE_TOOLS,         @ENABLE_TOOLS@)'; \
        } >$(srcdir)/bootstrap/package.m4
 
 @target_srcdir@bootstrap/testsuite: $(srcdir)/bootstrap/testsuite.at \
@@ -113,8 +114,8 @@ testsuite_incs=     $(srcdir)/bootstrap/t_application_help.at \
            $(srcdir)/bootstrap/testsuite.at -o $@.tmp
        mv $@.tmp $@
 
-installcheck-local: installcheck-bootstrap
-.PHONY: installcheck-bootstrap
+INSTALLCHECK_TARGETS += installcheck-bootstrap
+PHONY_TARGETS += installcheck-bootstrap
 installcheck-bootstrap: @target_srcdir@bootstrap/testsuite check
        $(TESTS_ENVIRONMENT) $(srcdir)/bootstrap/testsuite
 
index 4502364a39165faebd728ea83b7ee1820b8d97be..df8c1fb276231aa79b19928187919252e1c8c3ec 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index b1e2f29d8217b5988f55de7b8fece0ca317e7f7f..26d6be841e24e7da264d335f8af3dd8d56f5a709 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 1384618d96f395f60226d1a226c4e781507bcef2..1023684446465c8c74d406b8104d86183abc878d 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
index b0bfd89bd7ffa50c39b9884bac95a8a5b2654413..c08444593dcaa3e8db181667ee20428aede59984 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
index 67559875c6fc42d89ea940c4ce940f79be6d2009..f2bff9e60b9e6f0dba472c5d5f91bacd5ff81627 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
index d8ea96e78cc4e3f563ecb4b4db0c08cc35b1abc2..2b148546792ad05111e6bc3472328ab50ce94550 100644 (file)
@@ -1,6 +1,7 @@
 # Signature of the current package.
 m4_define(AT_PACKAGE_NAME,      Automated Testing Framework)
 m4_define(AT_PACKAGE_TARNAME,   atf)
-m4_define(AT_PACKAGE_VERSION,   0.12)
-m4_define(AT_PACKAGE_STRING,    Automated Testing Framework 0.12)
+m4_define(AT_PACKAGE_VERSION,   0.17)
+m4_define(AT_PACKAGE_STRING,    Automated Testing Framework 0.17)
 m4_define(AT_PACKAGE_BUGREPORT, atf-devel@NetBSD.org)
+m4_define(ENABLE_TOOLS,         yes)
index cc2dcbafd01571c1359da52752a03b2bcaeed6f6..7686fea2c1e6350a3bd08472e77fc4ec823e375e 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
index 7cf1e634ea7d616e81909a62094f089e1bb8cf7d..0c36cef776311a55b1717be540cb5c9b039f5004 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
index 88ed725d3176bb258a2aacfcf01feddf76e387fb..a86316999256cd001193f8622385b6639881ab4e 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
index e87ce27d5050b9810d62a4ce1e39028036d951da..db09deb2cd24d0d992f9750a0616b1f35c7626f3 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
index 48a74c2757413347953a2792051ed40df4a1ed48..a8c39e2f663ee9b9d9011dce82c3ab8e3eedbe10 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
index 56c0dd5e99a6dabb43f7fc7885c1268eec1c962d..fe7643460461486d086ef77179d2823e26620e28 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
index 57bd0d06b5567852ee010767d4cdf5154c92a060..89a7b68a31e3e4a9e45277fff49d2250c537d2c5 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
index 3347d2eeced8e2797d3115c69c5dc4e36e9a9b99..bb7b67affc9d9892f2b45585c2b5c6845eeadd02 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
index 40af837472c6cd6775eeba970216dffee961a7e6..5b6968ce12397f7caa804fd8c0049d317a5b05c3 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
index 55f8d01796d42e92dc1346d8f838a4a8234739bb..2c1aa3f38a524c8dc24725604f28b80f5a1549cf 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
-# Generated from bootstrap/testsuite.at by GNU Autoconf 2.68.
+# Generated from bootstrap/testsuite.at by GNU Autoconf 2.69.
 #
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
 #
 # This test suite is free software; the Free Software Foundation gives
 # unlimited permission to copy, distribute and modify it.
@@ -162,7 +162,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -207,21 +208,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-       # neutralization value for shells without unset; and this also
-       # works around shells that cannot unset nonexistent variables.
-       # Preserve -v and -x to the replacement shell.
-       BASH_ENV=/dev/null
-       ENV=/dev/null
-       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-       export CONFIG_SHELL
-       case $- in # ((((
-         *v*x* | *x*v* ) as_opts=-vx ;;
-         *v* ) as_opts=-v ;;
-         *x* ) as_opts=-x ;;
-         * ) as_opts= ;;
-       esac
-       exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
 fi
 
     if test x$as_have_required = xno; then :
@@ -323,6 +328,14 @@ $as_echo X"$as_dir" |
 
 
 } # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -444,6 +457,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -478,16 +495,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -499,28 +516,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -587,22 +584,17 @@ at_change_dir=false
 # Whether to enable colored test results.
 at_color=no
 # List of the tested programs.
-at_tested='atf-config
-atf-run'
+at_tested=''
 # As many question marks as there are digits in the last test group number.
 # Used to normalize the test group numbers so that `ls' lists them in
 # numerical order.
 at_format='?'
 # Description of all the test groups.
-at_help_all="1;t_application_opts_args.at:30;application: arguments and options handling;;
-2;t_application_help.at:30;application: online help option;;
-3;t_test_program_filter.at:30;test_program: filter test cases by name;;
-4;t_test_program_run.at:30;test_program: output format and exit codes;;
-5;t_test_program_list.at:30;test_program: list test cases;;
-6;t_atf_config.at:30;atf-config: querying of build-time variables;;
-7;t_atf_run.at:30;atf-run: execution of tests;;
-8;t_test_program_compare.at:30;test_program: compare the user-visible interfaces;;
-9;t_subr_atf_check.at:30;subr: atf_check function;;
+at_help_all="1;t_test_program_filter.at:30;test_program: filter test cases by name;;
+2;t_test_program_run.at:30;test_program: output format and exit codes;;
+3;t_test_program_list.at:30;test_program: list test cases;;
+4;t_test_program_compare.at:30;test_program: compare the user-visible interfaces;;
+5;t_subr_atf_check.at:30;subr: atf_check function;;
 "
 # List of the all the test groups.
 at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
@@ -616,7 +608,7 @@ at_fn_validate_ranges ()
   for at_grp
   do
     eval at_value=\$$at_grp
-    if test $at_value -lt 1 || test $at_value -gt 9; then
+    if test $at_value -lt 1 || test $at_value -gt 5; then
       $as_echo "invalid test group: $at_value" >&2
       exit 1
     fi
@@ -914,7 +906,7 @@ fi
 # List of tests.
 if $at_list_p; then
   cat <<_ATEOF || at_write_fail=1
-Automated Testing Framework 0.12 test suite: bootstrap tests test groups:
+Automated Testing Framework 0.17 test suite: bootstrap tests test groups:
 
  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
       KEYWORDS
@@ -955,10 +947,10 @@ _ATEOF
   exit $at_write_fail
 fi
 if $at_version_p; then
-  $as_echo "$as_me (Automated Testing Framework 0.12)" &&
+  $as_echo "$as_me (Automated Testing Framework 0.17)" &&
   cat <<\_ATEOF || at_write_fail=1
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This test suite is free software; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
 _ATEOF
@@ -1132,11 +1124,11 @@ exec 5>>"$at_suite_log"
 
 # Banners and logs.
 $as_echo "## ------------------------------------------------------------- ##
-## Automated Testing Framework 0.12 test suite: bootstrap tests. ##
+## Automated Testing Framework 0.17 test suite: bootstrap tests. ##
 ## ------------------------------------------------------------- ##"
 {
   $as_echo "## ------------------------------------------------------------- ##
-## Automated Testing Framework 0.12 test suite: bootstrap tests. ##
+## Automated Testing Framework 0.17 test suite: bootstrap tests. ##
 ## ------------------------------------------------------------- ##"
   echo
 
@@ -1980,7 +1972,7 @@ _ASBOX
   $as_echo "Please send $at_msg and all information you think might help:
 
    To: <atf-devel@NetBSD.org>
-   Subject: [Automated Testing Framework 0.12] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
+   Subject: [Automated Testing Framework 0.17] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
 
 You may investigate any problem if you feel able to do so, in which
 case the test suite provides a good starting point.  Its output may
@@ -1995,16 +1987,27 @@ exit 0
 ## Actual tests. ##
 ## ------------- ##
 #AT_START_1
-at_fn_group_banner 1 't_application_opts_args.at:30' \
-  "application: arguments and options handling" "    "
+at_fn_group_banner 1 't_test_program_filter.at:30' \
+  "test_program: filter test cases by name" "        "
 at_xfail=no
 (
   $as_echo "1. $at_setup_line: testing $at_desc ..."
   $at_traceon
 
 
+for h in tp_basic_c tp_basic_cpp tp_basic_sh; do
+
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:34: \$({
+$as_echo "$at_srcdir/t_test_program_filter.at:35: \$({
+    old=\$(pwd)
+    while test \$(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=\$(pwd)
+    cd \${old}
+    echo \${topdir}
+})/bootstrap/h_\${h} \\
+                          -s \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2012,8 +2015,8 @@ $as_echo "$at_srcdir/t_application_opts_args.at:34: \$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_app_empty -h"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:34"
+})/bootstrap invalid"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_filter.at:35"
 ( $at_check_trace; $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
@@ -2022,71 +2025,50 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_app_empty -h
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:34"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:35: grep ' -d ' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:35"
-( $at_check_trace; grep ' -d ' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_application_opts_args.at:35"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:36: grep ' -h ' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:36"
-( $at_check_trace; grep ' -h ' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:36"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:37: grep ' -v ' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:37"
-( $at_check_trace; grep ' -v ' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
+})/bootstrap/h_${h} \
+                          -s $({
+    old=$(pwd)
+    while test $(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=$(pwd)
+    cd ${old}
+    echo ${topdir}
+})/bootstrap invalid
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_application_opts_args.at:37"
+echo stderr:; tee stderr <"$at_stderr"
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/t_test_program_filter.at:35"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:38: grep ' -z ' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:38"
-( $at_check_trace; grep ' -z ' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
+$as_echo "$at_srcdir/t_test_program_filter.at:36: grep \"Unknown test case .invalid'\" stderr"
+at_fn_check_prepare_trace "t_test_program_filter.at:36"
+( $at_check_trace; grep "Unknown test case .invalid'" stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_application_opts_args.at:38"
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:36"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
 
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:42: \$({
+$as_echo "$at_srcdir/t_test_program_filter.at:40: \$({
+    old=\$(pwd)
+    while test \$(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=\$(pwd)
+    cd \${old}
+    echo \${topdir}
+})/bootstrap/h_\${h} \\
+                          -s \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2094,8 +2076,8 @@ $as_echo "$at_srcdir/t_application_opts_args.at:42: \$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_app_opts_args -h"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:42"
+})/bootstrap \"*p*\""
+at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_filter.at:40"
 ( $at_check_trace; $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
@@ -2104,71 +2086,54 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_app_opts_args -h
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:42"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:43: grep ' -d ' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:43"
-( $at_check_trace; grep ' -d ' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:43"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:44: grep ' -h ' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:44"
-( $at_check_trace; grep ' -h ' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
+})/bootstrap/h_${h} \
+                          -s $({
+    old=$(pwd)
+    while test $(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=$(pwd)
+    cd ${old}
+    echo ${topdir}
+})/bootstrap "*p*"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:44"
+echo stderr:; tee stderr <"$at_stderr"
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/t_test_program_filter.at:40"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:45: grep ' -v ' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:45"
-( $at_check_trace; grep ' -v ' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
+$as_echo "$at_srcdir/t_test_program_filter.at:41: grep \"Unknown test case .\\\\*p\\\\*'\" stderr"
+at_fn_check_prepare_trace "t_test_program_filter.at:41"
+( $at_check_trace; grep "Unknown test case .\\*p\\*'" stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:45"
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:41"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:46: grep ' -z ' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:46"
-( $at_check_trace; grep ' -z ' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_application_opts_args.at:46"
-$at_failed && at_fn_log_failure
-$at_traceon; }
 
+cat >expres <<'_ATEOF'
+passed
+_ATEOF
 
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:50: \$({
+$as_echo "$at_srcdir/t_test_program_filter.at:46: \$({
+    old=\$(pwd)
+    while test \$(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=\$(pwd)
+    cd \${old}
+    echo \${topdir}
+})/bootstrap/h_\${h} \\
+                          -s \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2176,8 +2141,8 @@ $as_echo "$at_srcdir/t_application_opts_args.at:50: \$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_app_empty -d"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:50"
+})/bootstrap -r resout pass"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_filter.at:46"
 ( $at_check_trace; $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
@@ -2186,31 +2151,54 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_app_empty -d
-) >>"$at_stdout" 2>>"$at_stderr"
+})/bootstrap/h_${h} \
+                          -s $({
+    old=$(pwd)
+    while test $(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=$(pwd)
+    cd ${old}
+    echo ${topdir}
+})/bootstrap -r resout pass
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_application_opts_args.at:50"
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:46"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:51: grep 'Unknown option.*-d' stderr"
-at_fn_check_prepare_trace "t_application_opts_args.at:51"
-( $at_check_trace; grep 'Unknown option.*-d' stderr
-) >>"$at_stdout" 2>>"$at_stderr"
+$as_echo "$at_srcdir/t_test_program_filter.at:47: cmp -s resout expres"
+at_fn_check_prepare_trace "t_test_program_filter.at:47"
+( $at_check_trace; cmp -s resout expres
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:51"
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:47"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
+
+cat >expres <<'_ATEOF'
+skipped: By design
+_ATEOF
+
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:52: \$({
+$as_echo "$at_srcdir/t_test_program_filter.at:51: \$({
+    old=\$(pwd)
+    while test \$(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=\$(pwd)
+    cd \${old}
+    echo \${topdir}
+})/bootstrap/h_\${h} \\
+                          -s \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2218,8 +2206,8 @@ $as_echo "$at_srcdir/t_application_opts_args.at:52: \$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_app_empty -v"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:52"
+})/bootstrap -r resout skip"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_filter.at:51"
 ( $at_check_trace; $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
@@ -2228,31 +2216,54 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_app_empty -v
-) >>"$at_stdout" 2>>"$at_stderr"
+})/bootstrap/h_${h} \
+                          -s $({
+    old=$(pwd)
+    while test $(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=$(pwd)
+    cd ${old}
+    echo ${topdir}
+})/bootstrap -r resout skip
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_application_opts_args.at:52"
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:51"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:53: grep 'Unknown option.*-v' stderr"
-at_fn_check_prepare_trace "t_application_opts_args.at:53"
-( $at_check_trace; grep 'Unknown option.*-v' stderr
-) >>"$at_stdout" 2>>"$at_stderr"
+$as_echo "$at_srcdir/t_test_program_filter.at:52: cmp -s resout expres"
+at_fn_check_prepare_trace "t_test_program_filter.at:52"
+( $at_check_trace; cmp -s resout expres
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:53"
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:52"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
+
+cat >expres <<'_ATEOF'
+failed: On purpose
+_ATEOF
+
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:54: \$({
+$as_echo "$at_srcdir/t_test_program_filter.at:56: \$({
+    old=\$(pwd)
+    while test \$(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=\$(pwd)
+    cd \${old}
+    echo \${topdir}
+})/bootstrap/h_\${h} \\
+                          -s \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2260,8 +2271,8 @@ $as_echo "$at_srcdir/t_application_opts_args.at:54: \$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_app_empty -z"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:54"
+})/bootstrap -r resout fail"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_filter.at:56"
 ( $at_check_trace; $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
@@ -2270,32 +2281,59 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_app_empty -z
-) >>"$at_stdout" 2>>"$at_stderr"
+})/bootstrap/h_${h} \
+                          -s $({
+    old=$(pwd)
+    while test $(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=$(pwd)
+    cd ${old}
+    echo ${topdir}
+})/bootstrap -r resout fail
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_application_opts_args.at:54"
+echo stderr:; cat "$at_stderr"
+echo stdout:; cat "$at_stdout"
+at_fn_check_status 1 $at_status "$at_srcdir/t_test_program_filter.at:56"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:55: grep 'Unknown option.*-z' stderr"
-at_fn_check_prepare_trace "t_application_opts_args.at:55"
-( $at_check_trace; grep 'Unknown option.*-z' stderr
-) >>"$at_stdout" 2>>"$at_stderr"
+$as_echo "$at_srcdir/t_test_program_filter.at:57: cmp -s resout expres"
+at_fn_check_prepare_trace "t_test_program_filter.at:57"
+( $at_check_trace; cmp -s resout expres
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:55"
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:57"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
 
+done
+
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_1
+#AT_START_2
+at_fn_group_banner 2 't_test_program_run.at:30' \
+  "test_program: output format and exit codes" "     "
+at_xfail=no
+(
+  $as_echo "2. $at_setup_line: testing $at_desc ..."
+  $at_traceon
+
+
+for h in tp_basic_c tp_basic_cpp tp_basic_sh; do
+
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:59: \$({
+$as_echo "$at_srcdir/t_test_program_run.at:35: \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2303,41 +2341,8 @@ $as_echo "$at_srcdir/t_application_opts_args.at:59: \$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_app_opts_args -d"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:59"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_app_opts_args -d
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:59"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:60: grep -- '-d given' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:60"
-( $at_check_trace; grep -- '-d given' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:60"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:61: \$({
+})/bootstrap/h_\${h} \\
+                          -s \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2345,8 +2350,8 @@ $as_echo "$at_srcdir/t_application_opts_args.at:61: \$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_app_opts_args -v"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:61"
+})/bootstrap -r resout pass"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_run.at:35"
 ( $at_check_trace; $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
@@ -2355,41 +2360,8 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_app_opts_args -v
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_application_opts_args.at:61"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:62: grep 'Option.*-v.*requires an argument' stderr"
-at_fn_check_prepare_trace "t_application_opts_args.at:62"
-( $at_check_trace; grep 'Option.*-v.*requires an argument' stderr
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:62"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:63: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_app_opts_args -v foo"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:63"
-( $at_check_trace; $({
+})/bootstrap/h_${h} \
+                          -s $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2397,31 +2369,36 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_app_opts_args -v foo
-) >>"$at_stdout" 2>>"$at_stderr"
+})/bootstrap -r resout pass
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:63"
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:35"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:64: grep -- '-v given with argument foo' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:64"
-( $at_check_trace; grep -- '-v given with argument foo' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
+echo 'passed' >expres <<EOF
+passed
+EOF
+
+                      { set +x
+$as_echo "$at_srcdir/t_test_program_run.at:36: diff -u expres resout"
+at_fn_check_prepare_trace "t_test_program_run.at:36"
+( $at_check_trace; diff -u expres resout
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:64"
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:36"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
+
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:65: \$({
+$as_echo "$at_srcdir/t_test_program_run.at:38: \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2429,42 +2406,8 @@ $as_echo "$at_srcdir/t_application_opts_args.at:65: \$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_app_opts_args -z"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:65"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_app_opts_args -z
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_application_opts_args.at:65"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:66: grep 'Unknown option.*-z' stderr"
-at_fn_check_prepare_trace "t_application_opts_args.at:66"
-( $at_check_trace; grep 'Unknown option.*-z' stderr
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:66"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:69: \$({
+})/bootstrap/h_\${h} \\
+                          -s \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2472,8 +2415,8 @@ $as_echo "$at_srcdir/t_application_opts_args.at:69: \$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_app_opts_args -- -d"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:69"
+})/bootstrap -r resout fail"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_run.at:38"
 ( $at_check_trace; $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
@@ -2482,41 +2425,8 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_app_opts_args -- -d
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:69"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:70: grep -- '-d given' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:70"
-( $at_check_trace; grep -- '-d given' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_application_opts_args.at:70"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:71: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_app_opts_args arg -d"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:71"
-( $at_check_trace; $({
+})/bootstrap/h_${h} \
+                          -s $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2524,32 +2434,36 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_app_opts_args arg -d
-) >>"$at_stdout" 2>>"$at_stderr"
+})/bootstrap -r resout fail
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:71"
+at_fn_check_status 1 $at_status "$at_srcdir/t_test_program_run.at:38"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:72: grep -- '-d given' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:72"
-( $at_check_trace; grep -- '-d given' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
+echo 'failed' >expres <<EOF
+failed
+EOF
+          echo "failed: On purpose" >expres
+                      { set +x
+$as_echo "$at_srcdir/t_test_program_run.at:39: diff -u expres resout"
+at_fn_check_prepare_trace "t_test_program_run.at:39"
+( $at_check_trace; diff -u expres resout
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
 at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_application_opts_args.at:72"
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:39"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
 
 { set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:76: \$({
+$as_echo "$at_srcdir/t_test_program_run.at:41: \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2557,42 +2471,8 @@ $as_echo "$at_srcdir/t_application_opts_args.at:76: \$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_app_empty -h"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:76"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_app_empty -h
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:76"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:77: grep '\\[options\\]\$' stdout"
-at_fn_check_prepare_dynamic "grep '\\[options\\]$' stdout" "t_application_opts_args.at:77"
-( $at_check_trace; grep '\[options\]$' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:77"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:81: \$({
+})/bootstrap/h_\${h} \\
+                          -s \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2600,8 +2480,8 @@ $as_echo "$at_srcdir/t_application_opts_args.at:81: \$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_app_opts_args -h"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_args.at:81"
+})/bootstrap -r resout skip"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_run.at:41"
 ( $at_check_trace; $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
@@ -2610,56 +2490,8 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_opts_
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_app_opts_args -h
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:81"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_opts_args.at:82: grep '\\[options\\] <arg1> <arg2>' stdout"
-at_fn_check_prepare_trace "t_application_opts_args.at:82"
-( $at_check_trace; grep '\[options\] <arg1> <arg2>' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_opts_args.at:82"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-  set +x
-  $at_times_p && times >"$at_times_file"
-) 5>&1 2>&1 7>&- | eval $at_tee_pipe
-read at_status <"$at_status_file"
-#AT_STOP_1
-#AT_START_2
-at_fn_group_banner 2 't_application_help.at:30' \
-  "application: online help option" "                "
-at_xfail=no
-(
-  $as_echo "2. $at_setup_line: testing $at_desc ..."
-  $at_traceon
-
-
-{ set +x
-$as_echo "$at_srcdir/t_application_help.at:32: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_app_empty"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_help.at:32"
-( $at_check_trace; $({
+})/bootstrap/h_${h} \
+                          -s $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -2667,2344 +2499,45 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_help.
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_app_empty
-) >>"$at_stdout" 2>>"$at_stderr"
+})/bootstrap -r resout skip
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_help.at:32"
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:41"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
-{ set +x
-$as_echo "$at_srcdir/t_application_help.at:33: grep 'Available options' stdout"
-at_fn_check_prepare_trace "t_application_help.at:33"
-( $at_check_trace; grep 'Available options' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
+echo 'skipped' >expres <<EOF
+skipped
+EOF
+          echo "skipped: By design" >expres
+                      { set +x
+$as_echo "$at_srcdir/t_test_program_run.at:42: diff -u expres resout"
+at_fn_check_prepare_trace "t_test_program_run.at:42"
+( $at_check_trace; diff -u expres resout
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_application_help.at:33"
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:42"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
 
 { set +x
-$as_echo "$at_srcdir/t_application_help.at:35: \$({
+$as_echo "$at_srcdir/t_test_program_run.at:44: \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_app_empty -h"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_application_help.at:35"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_app_empty -h
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_help.at:35"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_application_help.at:36: grep 'Available options' stdout"
-at_fn_check_prepare_trace "t_application_help.at:36"
-( $at_check_trace; grep 'Available options' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_application_help.at:36"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-  set +x
-  $at_times_p && times >"$at_times_file"
-) 5>&1 2>&1 7>&- | eval $at_tee_pipe
-read at_status <"$at_status_file"
-#AT_STOP_2
-#AT_START_3
-at_fn_group_banner 3 't_test_program_filter.at:30' \
-  "test_program: filter test cases by name" "        "
-at_xfail=no
-(
-  $as_echo "3. $at_setup_line: testing $at_desc ..."
-  $at_traceon
-
-
-for h in tp_basic_c tp_basic_cpp tp_basic_sh; do
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_filter.at:35: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_\${h} \\
-                          -s \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap invalid"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_filter.at:35"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_${h} \
-                          -s $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap invalid
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_test_program_filter.at:35"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_filter.at:36: grep \"Unknown test case .invalid'\" stderr"
-at_fn_check_prepare_trace "t_test_program_filter.at:36"
-( $at_check_trace; grep "Unknown test case .invalid'" stderr
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:36"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_filter.at:40: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_\${h} \\
-                          -s \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap \"*p*\""
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_filter.at:40"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_${h} \
-                          -s $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap "*p*"
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_test_program_filter.at:40"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_filter.at:41: grep \"Unknown test case .\\\\*p\\\\*'\" stderr"
-at_fn_check_prepare_trace "t_test_program_filter.at:41"
-( $at_check_trace; grep "Unknown test case .\\*p\\*'" stderr
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:41"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-cat >expres <<'_ATEOF'
-passed
-_ATEOF
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_filter.at:46: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_\${h} \\
-                          -s \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap -r resout pass"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_filter.at:46"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_${h} \
-                          -s $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap -r resout pass
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; cat "$at_stderr"
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:46"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_filter.at:47: cmp -s resout expres"
-at_fn_check_prepare_trace "t_test_program_filter.at:47"
-( $at_check_trace; cmp -s resout expres
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:47"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-cat >expres <<'_ATEOF'
-skipped: By design
-_ATEOF
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_filter.at:51: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_\${h} \\
-                          -s \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap -r resout skip"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_filter.at:51"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_${h} \
-                          -s $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap -r resout skip
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; cat "$at_stderr"
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:51"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_filter.at:52: cmp -s resout expres"
-at_fn_check_prepare_trace "t_test_program_filter.at:52"
-( $at_check_trace; cmp -s resout expres
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:52"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-cat >expres <<'_ATEOF'
-failed: On purpose
-_ATEOF
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_filter.at:56: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_\${h} \\
-                          -s \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap -r resout fail"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_filter.at:56"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_${h} \
-                          -s $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap -r resout fail
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; cat "$at_stderr"
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_test_program_filter.at:56"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_filter.at:57: cmp -s resout expres"
-at_fn_check_prepare_trace "t_test_program_filter.at:57"
-( $at_check_trace; cmp -s resout expres
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_filter.at:57"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-done
-
-  set +x
-  $at_times_p && times >"$at_times_file"
-) 5>&1 2>&1 7>&- | eval $at_tee_pipe
-read at_status <"$at_status_file"
-#AT_STOP_3
-#AT_START_4
-at_fn_group_banner 4 't_test_program_run.at:30' \
-  "test_program: output format and exit codes" "     "
-at_xfail=no
-(
-  $as_echo "4. $at_setup_line: testing $at_desc ..."
-  $at_traceon
-
-
-for h in tp_basic_c tp_basic_cpp tp_basic_sh; do
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_run.at:35: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_\${h} \\
-                          -s \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap -r resout pass"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_run.at:35"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_${h} \
-                          -s $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap -r resout pass
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:35"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-echo 'passed' >expres <<EOF
-passed
-EOF
-
-                      { set +x
-$as_echo "$at_srcdir/t_test_program_run.at:36: diff -u expres resout"
-at_fn_check_prepare_trace "t_test_program_run.at:36"
-( $at_check_trace; diff -u expres resout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:36"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_run.at:38: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_\${h} \\
-                          -s \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap -r resout fail"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_run.at:38"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_${h} \
-                          -s $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap -r resout fail
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_test_program_run.at:38"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-echo 'failed' >expres <<EOF
-failed
-EOF
-          echo "failed: On purpose" >expres
-                      { set +x
-$as_echo "$at_srcdir/t_test_program_run.at:39: diff -u expres resout"
-at_fn_check_prepare_trace "t_test_program_run.at:39"
-( $at_check_trace; diff -u expres resout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:39"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_run.at:41: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_\${h} \\
-                          -s \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap -r resout skip"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_run.at:41"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_${h} \
-                          -s $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap -r resout skip
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:41"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-echo 'skipped' >expres <<EOF
-skipped
-EOF
-          echo "skipped: By design" >expres
-                      { set +x
-$as_echo "$at_srcdir/t_test_program_run.at:42: diff -u expres resout"
-at_fn_check_prepare_trace "t_test_program_run.at:42"
-( $at_check_trace; diff -u expres resout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:42"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_run.at:44: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_\${h} \\
-                          -s \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap -r resout default"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_run.at:44"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_${h} \
-                          -s $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap -r resout default
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:44"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-echo 'passed' >expres <<EOF
-passed
-EOF
-
-                      { set +x
-$as_echo "$at_srcdir/t_test_program_run.at:45: diff -u expres resout"
-at_fn_check_prepare_trace "t_test_program_run.at:45"
-( $at_check_trace; diff -u expres resout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:45"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-done
-
-  set +x
-  $at_times_p && times >"$at_times_file"
-) 5>&1 2>&1 7>&- | eval $at_tee_pipe
-read at_status <"$at_status_file"
-#AT_STOP_4
-#AT_START_5
-at_fn_group_banner 5 't_test_program_list.at:30' \
-  "test_program: list test cases" "                  "
-at_xfail=no
-(
-  $as_echo "5. $at_setup_line: testing $at_desc ..."
-  $at_traceon
-
-
-for h in tp_basic_c tp_basic_cpp tp_basic_sh; do
-
-cat >expout <<'_ATEOF'
-Content-Type: application/X-atf-tp; version="1"
-
-ident: pass
-descr: An empty test case that always passes
-
-ident: fail
-descr: An empty test case that always fails
-
-ident: skip
-descr: An empty test case that is always skipped
-
-ident: default
-descr: A test case that passes without explicitly stating it
-_ATEOF
-
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_list.at:49: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_\${h} \\
-                          -s \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap -l"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_list.at:49"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_${h} \
-                          -s $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap -l
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-$at_diff expout "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_list.at:49"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_list.at:51: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_\${h} \\
-                          -s \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap -l pass"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_list.at:51"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_${h} \
-                          -s $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap -l pass
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_test_program_list.at:51"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_list.at:52: grep 'Cannot provide test case names with -l' stderr"
-at_fn_check_prepare_trace "t_test_program_list.at:52"
-( $at_check_trace; grep 'Cannot provide test case names with -l' stderr
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_list.at:52"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_list.at:55: \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_\${h} \\
-                          -s \$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap -l pass fail"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_list.at:55"
-( $at_check_trace; $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_${h} \
-                          -s $({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap -l pass fail
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_test_program_list.at:55"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_test_program_list.at:56: grep 'Cannot provide test case names with -l' stderr"
-at_fn_check_prepare_trace "t_test_program_list.at:56"
-( $at_check_trace; grep 'Cannot provide test case names with -l' stderr
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_list.at:56"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-done
-
-  set +x
-  $at_times_p && times >"$at_times_file"
-) 5>&1 2>&1 7>&- | eval $at_tee_pipe
-read at_status <"$at_status_file"
-#AT_STOP_5
-#AT_START_6
-at_fn_group_banner 6 't_atf_config.at:30' \
-  "atf-config: querying of build-time variables" "   "
-at_xfail=no
-(
-  $as_echo "6. $at_setup_line: testing $at_desc ..."
-  $at_traceon
-
-
-
-all_vars="atf_arch \
-          atf_build_cc \
-          atf_build_cflags \
-          atf_build_cpp \
-          atf_build_cppflags \
-          atf_build_cxx \
-          atf_build_cxxflags \
-          atf_confdir \
-          atf_includedir \
-          atf_libdir \
-          atf_libexecdir \
-          atf_machine \
-          atf_pkgdatadir \
-          atf_shell \
-          atf_workdir"
-all_vars_no=15
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_config.at:51: atf-config"
-at_fn_check_prepare_trace "t_atf_config.at:51"
-( $at_check_trace; atf-config
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:51"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_config.at:52: test $(wc -l stdout | awk '{ print $1 }') = \${all_vars_no}"
-at_fn_check_prepare_notrace 'a ${...} parameter expansion' "t_atf_config.at:52"
-( $at_check_trace; test $(wc -l stdout | awk '{ print $1 }') = ${all_vars_no}
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:52"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-for v in ${all_vars}; do
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:54: grep \"\${v}\" stdout"
-at_fn_check_prepare_notrace 'a ${...} parameter expansion' "t_atf_config.at:54"
-( $at_check_trace; grep "${v}" stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:54"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-done
-
-for v in ${all_vars}; do
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:59: atf-config \${v}"
-at_fn_check_prepare_notrace 'a ${...} parameter expansion' "t_atf_config.at:59"
-( $at_check_trace; atf-config ${v}
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:59"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:60: test $(wc -l stdout | awk '{ print $1 }') = 1"
-at_fn_check_prepare_notrace 'a shell pipeline' "t_atf_config.at:60"
-( $at_check_trace; test $(wc -l stdout | awk '{ print $1 }') = 1
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:60"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:61: grep \"\${v}\" stdout"
-at_fn_check_prepare_notrace 'a ${...} parameter expansion' "t_atf_config.at:61"
-( $at_check_trace; grep "${v}" stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:61"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:62: cut -d ' ' -f 3- stdout"
-at_fn_check_prepare_trace "t_atf_config.at:62"
-( $at_check_trace; cut -d ' ' -f 3- stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:62"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:63: mv stdout expout"
-at_fn_check_prepare_trace "t_atf_config.at:63"
-( $at_check_trace; mv stdout expout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:63"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:64: atf-config -t \${v}"
-at_fn_check_prepare_notrace 'a ${...} parameter expansion' "t_atf_config.at:64"
-( $at_check_trace; atf-config -t ${v}
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-$at_diff expout "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:64"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-done
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_config.at:68: atf-config atf_libexecdir atf_pkgdatadir"
-at_fn_check_prepare_trace "t_atf_config.at:68"
-( $at_check_trace; atf-config atf_libexecdir atf_pkgdatadir
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:68"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_config.at:69: grep 'atf_libexecdir' stdout"
-at_fn_check_prepare_trace "t_atf_config.at:69"
-( $at_check_trace; grep 'atf_libexecdir' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:69"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_config.at:70: grep 'atf_pkgdatadir' stdout"
-at_fn_check_prepare_trace "t_atf_config.at:70"
-( $at_check_trace; grep 'atf_pkgdatadir' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:70"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_config.at:71: test $(wc -l stdout | awk '{ print $1 }') = 2"
-at_fn_check_prepare_notrace 'a shell pipeline' "t_atf_config.at:71"
-( $at_check_trace; test $(wc -l stdout | awk '{ print $1 }') = 2
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:71"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_config.at:74: atf-config non_existent"
-at_fn_check_prepare_trace "t_atf_config.at:74"
-( $at_check_trace; atf-config non_existent
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_config.at:74"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_config.at:75: grep 'Unknown variable.*non_existent' stderr"
-at_fn_check_prepare_trace "t_atf_config.at:75"
-( $at_check_trace; grep 'Unknown variable.*non_existent' stderr
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:75"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-for v in ${all_vars}; do
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:79: atf-config \${v} non_existent"
-at_fn_check_prepare_notrace 'a ${...} parameter expansion' "t_atf_config.at:79"
-( $at_check_trace; atf-config ${v} non_existent
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_config.at:79"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:80: grep 'Unknown variable.*non_existent' stderr"
-at_fn_check_prepare_trace "t_atf_config.at:80"
-( $at_check_trace; grep 'Unknown variable.*non_existent' stderr
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:80"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:82: atf-config non_existent \${v}"
-at_fn_check_prepare_notrace 'a ${...} parameter expansion' "t_atf_config.at:82"
-( $at_check_trace; atf-config non_existent ${v}
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_config.at:82"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:83: grep 'Unknown variable.*non_existent' stderr"
-at_fn_check_prepare_trace "t_atf_config.at:83"
-( $at_check_trace; grep 'Unknown variable.*non_existent' stderr
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:83"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-done
-
-for v in ${all_vars}; do
-    V=$(echo ${v} | tr '[a-z]' '[A-Z]')
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:90: env \${V}=testval atf-config"
-at_fn_check_prepare_notrace 'a ${...} parameter expansion' "t_atf_config.at:90"
-( $at_check_trace; env ${V}=testval atf-config
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:90"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:91: mv stdout all"
-at_fn_check_prepare_trace "t_atf_config.at:91"
-( $at_check_trace; mv stdout all
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:91"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:93: grep \"^\${v} : \" all"
-at_fn_check_prepare_notrace 'a ${...} parameter expansion' "t_atf_config.at:93"
-( $at_check_trace; grep "^${v} : " all
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:93"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:94: mv stdout affected"
-at_fn_check_prepare_trace "t_atf_config.at:94"
-( $at_check_trace; mv stdout affected
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:94"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:95: grep -v \"^\${v} : \" all"
-at_fn_check_prepare_notrace 'a ${...} parameter expansion' "t_atf_config.at:95"
-( $at_check_trace; grep -v "^${v} : " all
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:95"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:96: mv stdout unaffected"
-at_fn_check_prepare_trace "t_atf_config.at:96"
-( $at_check_trace; mv stdout unaffected
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:96"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:98: test $(wc -l affected | awk '{ print $1 }') = 1"
-at_fn_check_prepare_notrace 'a shell pipeline' "t_atf_config.at:98"
-( $at_check_trace; test $(wc -l affected | awk '{ print $1 }') = 1
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:98"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:99: test $(wc -l unaffected | awk '{ print $1 }') = \$((\${all_vars_no} - 1))"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_config.at:99"
-( $at_check_trace; test $(wc -l unaffected | awk '{ print $1 }') = $((${all_vars_no} - 1))
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:99"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:102: grep \"^\${v} : testval\$\" affected"
-at_fn_check_prepare_notrace 'a ${...} parameter expansion' "t_atf_config.at:102"
-( $at_check_trace; grep "^${v} : testval$" affected
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_config.at:102"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-    { set +x
-$as_echo "$at_srcdir/t_atf_config.at:103: grep ' : testval\$' unaffected"
-at_fn_check_prepare_dynamic "grep ' : testval$' unaffected" "t_atf_config.at:103"
-( $at_check_trace; grep ' : testval$' unaffected
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_config.at:103"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-done
-
-  set +x
-  $at_times_p && times >"$at_times_file"
-) 5>&1 2>&1 7>&- | eval $at_tee_pipe
-read at_status <"$at_status_file"
-#AT_STOP_6
-#AT_START_7
-at_fn_group_banner 7 't_atf_run.at:30' \
-  "atf-run: execution of tests" "                    "
-at_xfail=no
-(
-  $as_echo "7. $at_setup_line: testing $at_desc ..."
-  $at_traceon
-
-
-
-
-
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:47: mkdir top"
-at_fn_check_prepare_trace "t_atf_run.at:47"
-( $at_check_trace; mkdir top
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:47"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:48: mkdir top/dir1"
-at_fn_check_prepare_trace "t_atf_run.at:48"
-( $at_check_trace; mkdir top/dir1
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:48"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:49: mkdir top/dir2"
-at_fn_check_prepare_trace "t_atf_run.at:49"
-( $at_check_trace; mkdir top/dir2
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:49"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-cat >top/Atffile <<'_ATEOF'
-Content-Type: application/X-atf-atffile; version="1"
-
-prop: test-suite = atf
-
-tp: dir1
-tp: dir2
-tp: test1
-tp: test2
-_ATEOF
-
-cat >top/dir1/Atffile <<'_ATEOF'
-Content-Type: application/X-atf-atffile; version="1"
-
-prop: test-suite = atf
-
-tp: test3
-_ATEOF
-
-cat >top/dir2/Atffile <<'_ATEOF'
-Content-Type: application/X-atf-atffile; version="1"
-
-prop: test-suite = atf
-
-tp: test4
-tp: test5
-_ATEOF
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:75: sed -e 's,@TC_NAME@,tc_1,g' <\$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_tp_pass"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_run.at:75"
-( $at_check_trace; sed -e 's,@TC_NAME@,tc_1,g' <$({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_tp_pass
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:75"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:75: mv stdout top/test1"
-at_fn_check_prepare_trace "t_atf_run.at:75"
-( $at_check_trace; mv stdout top/test1
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:75"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:75: chmod +x top/test1"
-at_fn_check_prepare_trace "t_atf_run.at:75"
-( $at_check_trace; chmod +x top/test1
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:75"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:76: sed -e 's,@TC_NAME@,tc_2,g' <\$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_tp_fail"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_run.at:76"
-( $at_check_trace; sed -e 's,@TC_NAME@,tc_2,g' <$({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_tp_fail
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:76"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:76: mv stdout top/test2"
-at_fn_check_prepare_trace "t_atf_run.at:76"
-( $at_check_trace; mv stdout top/test2
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:76"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:76: chmod +x top/test2"
-at_fn_check_prepare_trace "t_atf_run.at:76"
-( $at_check_trace; chmod +x top/test2
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:76"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:77: sed -e 's,@TC_NAME@,tc_3,g' <\$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_tp_pass"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_run.at:77"
-( $at_check_trace; sed -e 's,@TC_NAME@,tc_3,g' <$({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_tp_pass
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:77"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:77: mv stdout top/dir1/test3"
-at_fn_check_prepare_trace "t_atf_run.at:77"
-( $at_check_trace; mv stdout top/dir1/test3
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:77"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:77: chmod +x top/dir1/test3"
-at_fn_check_prepare_trace "t_atf_run.at:77"
-( $at_check_trace; chmod +x top/dir1/test3
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:77"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:78: sed -e 's,@TC_NAME@,tc_4,g' <\$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_tp_fail"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_run.at:78"
-( $at_check_trace; sed -e 's,@TC_NAME@,tc_4,g' <$({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_tp_fail
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:78"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:78: mv stdout top/dir2/test4"
-at_fn_check_prepare_trace "t_atf_run.at:78"
-( $at_check_trace; mv stdout top/dir2/test4
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:78"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:78: chmod +x top/dir2/test4"
-at_fn_check_prepare_trace "t_atf_run.at:78"
-( $at_check_trace; chmod +x top/dir2/test4
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:78"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:79: sed -e 's,@TC_NAME@,tc_5,g' <\$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_tp_pass"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_run.at:79"
-( $at_check_trace; sed -e 's,@TC_NAME@,tc_5,g' <$({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_tp_pass
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:79"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:79: mv stdout top/dir2/test5"
-at_fn_check_prepare_trace "t_atf_run.at:79"
-( $at_check_trace; mv stdout top/dir2/test5
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:79"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:79: chmod +x top/dir2/test5"
-at_fn_check_prepare_trace "t_atf_run.at:79"
-( $at_check_trace; chmod +x top/dir2/test5
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:79"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:81: cd top/dir1 && atf-run"
-at_fn_check_prepare_trace "t_atf_run.at:81"
-( $at_check_trace; cd top/dir1 && atf-run
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:81"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:82: grep '^tc-end: tc_3, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:82"
-( $at_check_trace; grep '^tc-end: tc_3, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:82"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:83: grep -i 'tc_[1245]' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:83"
-( $at_check_trace; grep -i 'tc_[1245]' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_run.at:83"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:84: grep 'tc-so:ignore-me' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:84"
-( $at_check_trace; grep 'tc-so:ignore-me' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:84"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:85: grep 'tc-se:ignore-me' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:85"
-( $at_check_trace; grep 'tc-se:ignore-me' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:85"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:87: cd top/dir2 && atf-run"
-at_fn_check_prepare_trace "t_atf_run.at:87"
-( $at_check_trace; cd top/dir2 && atf-run
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_run.at:87"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:88: grep '^tc-end: tc_4, failed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:88"
-( $at_check_trace; grep '^tc-end: tc_4, failed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:88"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:89: grep '^tc-end: tc_5, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:89"
-( $at_check_trace; grep '^tc-end: tc_5, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:89"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:90: grep -i 'tc_[123]' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:90"
-( $at_check_trace; grep -i 'tc_[123]' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_run.at:90"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:91: grep 'tc-so:ignore-me' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:91"
-( $at_check_trace; grep 'tc-so:ignore-me' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:91"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:92: grep 'tc-se:ignore-me' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:92"
-( $at_check_trace; grep 'tc-se:ignore-me' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:92"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:94: cd top && atf-run"
-at_fn_check_prepare_trace "t_atf_run.at:94"
-( $at_check_trace; cd top && atf-run
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_run.at:94"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:95: grep '^tc-end: tc_1, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:95"
-( $at_check_trace; grep '^tc-end: tc_1, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:95"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:96: grep '^tc-end: tc_2, failed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:96"
-( $at_check_trace; grep '^tc-end: tc_2, failed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:96"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:97: grep '^tc-end: tc_3, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:97"
-( $at_check_trace; grep '^tc-end: tc_3, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:97"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:98: grep '^tc-end: tc_4, failed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:98"
-( $at_check_trace; grep '^tc-end: tc_4, failed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:98"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:99: grep '^tc-end: tc_5, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:99"
-( $at_check_trace; grep '^tc-end: tc_5, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:99"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:100: grep 'tc-so:ignore-me' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:100"
-( $at_check_trace; grep 'tc-so:ignore-me' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:100"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:101: grep 'tc-se:ignore-me' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:101"
-( $at_check_trace; grep 'tc-se:ignore-me' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:101"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-cat >top/Atffile <<'_ATEOF'
-Content-Type: application/X-atf-atffile; version="1"
-
-prop: test-suite = atf
-
-tp-glob: *
-_ATEOF
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:111: cd top && atf-run"
-at_fn_check_prepare_trace "t_atf_run.at:111"
-( $at_check_trace; cd top && atf-run
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_run.at:111"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:112: grep '^tc-end: tc_1, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:112"
-( $at_check_trace; grep '^tc-end: tc_1, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:112"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:113: grep '^tc-end: tc_2, failed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:113"
-( $at_check_trace; grep '^tc-end: tc_2, failed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:113"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:114: grep '^tc-end: tc_3, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:114"
-( $at_check_trace; grep '^tc-end: tc_3, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:114"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:115: grep '^tc-end: tc_4, failed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:115"
-( $at_check_trace; grep '^tc-end: tc_4, failed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:115"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:116: grep '^tc-end: tc_5, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:116"
-( $at_check_trace; grep '^tc-end: tc_5, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:116"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:117: grep 'tc-so:ignore-me' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:117"
-( $at_check_trace; grep 'tc-so:ignore-me' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:117"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:118: grep 'tc-se:ignore-me' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:118"
-( $at_check_trace; grep 'tc-se:ignore-me' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:118"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-cat >top/Atffile <<'_ATEOF'
-Content-Type: application/X-atf-atffile; version="1"
-
-prop: test-suite = atf
-
-tp-glob: d*
-_ATEOF
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:128: cd top && atf-run"
-at_fn_check_prepare_trace "t_atf_run.at:128"
-( $at_check_trace; cd top && atf-run
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_run.at:128"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:129: grep '^tc-end: tc_3, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:129"
-( $at_check_trace; grep '^tc-end: tc_3, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:129"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:130: grep '^tc-end: tc_4, failed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:130"
-( $at_check_trace; grep '^tc-end: tc_4, failed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:130"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:131: grep '^tc-end: tc_5, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:131"
-( $at_check_trace; grep '^tc-end: tc_5, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:131"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:132: grep 'tc-so:ignore-me' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:132"
-( $at_check_trace; grep 'tc-so:ignore-me' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:132"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:133: grep 'tc-se:ignore-me' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:133"
-( $at_check_trace; grep 'tc-se:ignore-me' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:133"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:138: rm -rf top"
-at_fn_check_prepare_trace "t_atf_run.at:138"
-( $at_check_trace; rm -rf top
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:138"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:139: mkdir top"
-at_fn_check_prepare_trace "t_atf_run.at:139"
-( $at_check_trace; mkdir top
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:139"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:140: sed -e 's,@TC_NAME@,tc_1,g' <\$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_tp_pass"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_run.at:140"
-( $at_check_trace; sed -e 's,@TC_NAME@,tc_1,g' <$({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_tp_pass
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:140"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:140: mv stdout top/test1"
-at_fn_check_prepare_trace "t_atf_run.at:140"
-( $at_check_trace; mv stdout top/test1
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:140"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:140: chmod +x top/test1"
-at_fn_check_prepare_trace "t_atf_run.at:140"
-( $at_check_trace; chmod +x top/test1
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:140"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:141: sed -e 's,@TC_NAME@,tc_2,g' <\$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_tp_pass"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_run.at:141"
-( $at_check_trace; sed -e 's,@TC_NAME@,tc_2,g' <$({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_tp_pass
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:141"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:141: mv stdout top/test2"
-at_fn_check_prepare_trace "t_atf_run.at:141"
-( $at_check_trace; mv stdout top/test2
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:141"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:141: chmod +x top/test2"
-at_fn_check_prepare_trace "t_atf_run.at:141"
-( $at_check_trace; chmod +x top/test2
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:141"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:142: sed -e 's,@TC_NAME@,tc_3,g' <\$({
-    old=\$(pwd)
-    while test \$(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=\$(pwd)
-    cd \${old}
-    echo \${topdir}
-})/bootstrap/h_tp_pass"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_run.at:142"
-( $at_check_trace; sed -e 's,@TC_NAME@,tc_3,g' <$({
-    old=$(pwd)
-    while test $(pwd) != '/' -a ! -e ./Makefile; do
-        cd ..
-    done
-    topdir=$(pwd)
-    cd ${old}
-    echo ${topdir}
-})/bootstrap/h_tp_pass
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:142"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:142: mv stdout top/test3"
-at_fn_check_prepare_trace "t_atf_run.at:142"
-( $at_check_trace; mv stdout top/test3
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:142"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:142: chmod +x top/test3"
-at_fn_check_prepare_trace "t_atf_run.at:142"
-( $at_check_trace; chmod +x top/test3
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:142"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:143: chmod -x top/test3"
-at_fn_check_prepare_trace "t_atf_run.at:143"
-( $at_check_trace; chmod -x top/test3
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:143"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:144: sed -e 's,@TC_NAME@,tc_4,g' <\$({
+    done
+    topdir=\$(pwd)
+    cd \${old}
+    echo \${topdir}
+})/bootstrap/h_\${h} \\
+                          -s \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -5012,9 +2545,18 @@ $as_echo "$at_srcdir/t_atf_run.at:144: sed -e 's,@TC_NAME@,tc_4,g' <\$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_tp_pass"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_run.at:144"
-( $at_check_trace; sed -e 's,@TC_NAME@,tc_4,g' <$({
+})/bootstrap -r resout default"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_run.at:44"
+( $at_check_trace; $({
+    old=$(pwd)
+    while test $(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=$(pwd)
+    cd ${old}
+    echo ${topdir}
+})/bootstrap/h_${h} \
+                          -s $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -5022,158 +2564,80 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_run.at:144"
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_tp_pass
-) >>"$at_stdout" 2>>"$at_stderr"
+})/bootstrap -r resout default
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
+echo stderr:; tee stderr <"$at_stderr"
 echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:144"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:144: mv stdout top/.test4"
-at_fn_check_prepare_trace "t_atf_run.at:144"
-( $at_check_trace; mv stdout top/.test4
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:144"
-$at_failed && at_fn_log_failure
-$at_traceon; }
-
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:144: chmod +x top/.test4"
-at_fn_check_prepare_trace "t_atf_run.at:144"
-( $at_check_trace; chmod +x top/.test4
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:144"
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:44"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
+echo 'passed' >expres <<EOF
+passed
+EOF
 
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:145: chmod -x top/.test4"
-at_fn_check_prepare_trace "t_atf_run.at:145"
-( $at_check_trace; chmod -x top/.test4
-) >>"$at_stdout" 2>>"$at_stderr"
+                      { set +x
+$as_echo "$at_srcdir/t_test_program_run.at:45: diff -u expres resout"
+at_fn_check_prepare_trace "t_test_program_run.at:45"
+( $at_check_trace; diff -u expres resout
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
 at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:145"
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_run.at:45"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
-cat >top/Atffile <<'_ATEOF'
-Content-Type: application/X-atf-atffile; version="1"
 
-prop: test-suite = atf
+done
 
-tp-glob: *
-_ATEOF
+  set +x
+  $at_times_p && times >"$at_times_file"
+) 5>&1 2>&1 7>&- | eval $at_tee_pipe
+read at_status <"$at_status_file"
+#AT_STOP_2
+#AT_START_3
+at_fn_group_banner 3 't_test_program_list.at:30' \
+  "test_program: list test cases" "                  "
+at_xfail=no
+(
+  $as_echo "3. $at_setup_line: testing $at_desc ..."
+  $at_traceon
 
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:153: cd top && atf-run"
-at_fn_check_prepare_trace "t_atf_run.at:153"
-( $at_check_trace; cd top && atf-run
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:153"
-$at_failed && at_fn_log_failure
-$at_traceon; }
 
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:154: grep '^tc-end: tc_1, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:154"
-( $at_check_trace; grep '^tc-end: tc_1, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:154"
-$at_failed && at_fn_log_failure
-$at_traceon; }
+for h in tp_basic_c tp_basic_cpp tp_basic_sh; do
 
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:155: grep '^tc-end: tc_2, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:155"
-( $at_check_trace; grep '^tc-end: tc_2, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:155"
-$at_failed && at_fn_log_failure
-$at_traceon; }
+cat >expout <<'_ATEOF'
+Content-Type: application/X-atf-tp; version="1"
 
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:156: grep -i 'tc_3' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:156"
-( $at_check_trace; grep -i 'tc_3' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_run.at:156"
-$at_failed && at_fn_log_failure
-$at_traceon; }
+ident: pass
+descr: An empty test case that always passes
 
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:157: grep -i 'tc_4' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:157"
-( $at_check_trace; grep -i 'tc_4' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_run.at:157"
-$at_failed && at_fn_log_failure
-$at_traceon; }
+ident: fail
+descr: An empty test case that always fails
 
+ident: skip
+descr: An empty test case that is always skipped
 
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:160: rm -rf top"
-at_fn_check_prepare_trace "t_atf_run.at:160"
-( $at_check_trace; rm -rf top
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:160"
-$at_failed && at_fn_log_failure
-$at_traceon; }
+ident: default
+descr: A test case that passes without explicitly stating it
+_ATEOF
 
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:161: mkdir top"
-at_fn_check_prepare_trace "t_atf_run.at:161"
-( $at_check_trace; mkdir top
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:161"
-$at_failed && at_fn_log_failure
-$at_traceon; }
 
 { set +x
-$as_echo "$at_srcdir/t_atf_run.at:162: cp \$({
+$as_echo "$at_srcdir/t_test_program_list.at:49: \$({
+    old=\$(pwd)
+    while test \$(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=\$(pwd)
+    cd \${old}
+    echo \${topdir}
+})/bootstrap/h_\${h} \\
+                          -s \$({
     old=\$(pwd)
     while test \$(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -5181,9 +2645,18 @@ $as_echo "$at_srcdir/t_atf_run.at:162: cp \$({
     topdir=\$(pwd)
     cd \${old}
     echo \${topdir}
-})/bootstrap/h_tp_basic_sh top"
-at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_run.at:162"
-( $at_check_trace; cp $({
+})/bootstrap -l"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_list.at:49"
+( $at_check_trace; $({
+    old=$(pwd)
+    while test $(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=$(pwd)
+    cd ${old}
+    echo ${topdir}
+})/bootstrap/h_${h} \
+                          -s $({
     old=$(pwd)
     while test $(pwd) != '/' -a ! -e ./Makefile; do
         cd ..
@@ -5191,101 +2664,152 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_atf_run.at:162"
     topdir=$(pwd)
     cd ${old}
     echo ${topdir}
-})/bootstrap/h_tp_basic_sh top
-) >>"$at_stdout" 2>>"$at_stderr"
+})/bootstrap -l
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
-at_fn_diff_devnull "$at_stdout" || at_failed=:
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:162"
+$at_diff expout "$at_stdout" || at_failed=:
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_list.at:49"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
-cat >top/Atffile <<'_ATEOF'
-Content-Type: application/X-atf-atffile; version="1"
-
-prop: test-suite = atf
-
-tp: h_tp_basic_sh
-_ATEOF
 
 { set +x
-$as_echo "$at_srcdir/t_atf_run.at:170: cd top && atf-run"
-at_fn_check_prepare_trace "t_atf_run.at:170"
-( $at_check_trace; cd top && atf-run
-) >>"$at_stdout" 2>>"$at_stderr"
+$as_echo "$at_srcdir/t_test_program_list.at:51: \$({
+    old=\$(pwd)
+    while test \$(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=\$(pwd)
+    cd \${old}
+    echo \${topdir}
+})/bootstrap/h_\${h} \\
+                          -s \$({
+    old=\$(pwd)
+    while test \$(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=\$(pwd)
+    cd \${old}
+    echo \${topdir}
+})/bootstrap -l pass"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_list.at:51"
+( $at_check_trace; $({
+    old=$(pwd)
+    while test $(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=$(pwd)
+    cd ${old}
+    echo ${topdir}
+})/bootstrap/h_${h} \
+                          -s $({
+    old=$(pwd)
+    while test $(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=$(pwd)
+    cd ${old}
+    echo ${topdir}
+})/bootstrap -l pass
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
-echo stdout:; tee stdout <"$at_stdout"
-at_fn_check_status 1 $at_status "$at_srcdir/t_atf_run.at:170"
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/t_test_program_list.at:51"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
 { set +x
-$as_echo "$at_srcdir/t_atf_run.at:171: grep '^tc-end: pass, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:171"
-( $at_check_trace; grep '^tc-end: pass, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
+$as_echo "$at_srcdir/t_test_program_list.at:52: grep 'Cannot provide test case names with -l' stderr"
+at_fn_check_prepare_trace "t_test_program_list.at:52"
+( $at_check_trace; grep 'Cannot provide test case names with -l' stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:171"
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_list.at:52"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
-{ set +x
-$as_echo "$at_srcdir/t_atf_run.at:172: grep '^tc-end: fail, failed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:172"
-( $at_check_trace; grep '^tc-end: fail, failed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
-at_status=$? at_failed=false
-$at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:172"
-$at_failed && at_fn_log_failure
-$at_traceon; }
 
 { set +x
-$as_echo "$at_srcdir/t_atf_run.at:173: grep '^tc-end: skip, skipped' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:173"
-( $at_check_trace; grep '^tc-end: skip, skipped' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
+$as_echo "$at_srcdir/t_test_program_list.at:55: \$({
+    old=\$(pwd)
+    while test \$(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=\$(pwd)
+    cd \${old}
+    echo \${topdir}
+})/bootstrap/h_\${h} \\
+                          -s \$({
+    old=\$(pwd)
+    while test \$(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=\$(pwd)
+    cd \${old}
+    echo \${topdir}
+})/bootstrap -l pass fail"
+at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_list.at:55"
+( $at_check_trace; $({
+    old=$(pwd)
+    while test $(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=$(pwd)
+    cd ${old}
+    echo ${topdir}
+})/bootstrap/h_${h} \
+                          -s $({
+    old=$(pwd)
+    while test $(pwd) != '/' -a ! -e ./Makefile; do
+        cd ..
+    done
+    topdir=$(pwd)
+    cd ${old}
+    echo ${topdir}
+})/bootstrap -l pass fail
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
-at_fn_diff_devnull "$at_stderr" || at_failed=:
-echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:173"
+echo stderr:; tee stderr <"$at_stderr"
+at_fn_diff_devnull "$at_stdout" || at_failed=:
+at_fn_check_status 1 $at_status "$at_srcdir/t_test_program_list.at:55"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
 { set +x
-$as_echo "$at_srcdir/t_atf_run.at:174: grep '^tc-end: default, passed' stdout"
-at_fn_check_prepare_trace "t_atf_run.at:174"
-( $at_check_trace; grep '^tc-end: default, passed' stdout
-) >>"$at_stdout" 2>>"$at_stderr"
+$as_echo "$at_srcdir/t_test_program_list.at:56: grep 'Cannot provide test case names with -l' stderr"
+at_fn_check_prepare_trace "t_test_program_list.at:56"
+( $at_check_trace; grep 'Cannot provide test case names with -l' stderr
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo stdout:; cat "$at_stdout"
-at_fn_check_status 0 $at_status "$at_srcdir/t_atf_run.at:174"
+at_fn_check_status 0 $at_status "$at_srcdir/t_test_program_list.at:56"
 $at_failed && at_fn_log_failure
 $at_traceon; }
 
 
+done
+
   set +x
   $at_times_p && times >"$at_times_file"
 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
 read at_status <"$at_status_file"
-#AT_STOP_7
-#AT_START_8
-at_fn_group_banner 8 't_test_program_compare.at:30' \
+#AT_STOP_3
+#AT_START_4
+at_fn_group_banner 4 't_test_program_compare.at:30' \
   "test_program: compare the user-visible interfaces" ""
 at_xfail=no
 (
-  $as_echo "8. $at_setup_line: testing $at_desc ..."
+  $as_echo "4. $at_setup_line: testing $at_desc ..."
   $at_traceon
 
 
@@ -5327,7 +2851,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
@@ -5375,7 +2899,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -5423,7 +2947,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -5471,7 +2995,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -h
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
@@ -5519,7 +3043,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -h
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -5567,7 +3091,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -h
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -5615,7 +3139,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -Z
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
@@ -5663,7 +3187,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -Z
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -5711,7 +3235,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -Z
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -5759,7 +3283,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -l
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
@@ -5807,7 +3331,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -l
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
@@ -5855,7 +3379,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -l
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
@@ -5903,7 +3427,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
@@ -5952,7 +3476,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6001,7 +3525,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6049,7 +3573,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -r resout pass
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
@@ -6099,7 +3623,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -r resout pass
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6112,7 +3636,7 @@ $at_traceon; }
 $as_echo "$at_srcdir/t_test_program_compare.at:80: cmp -s resout resexp"
 at_fn_check_prepare_trace "t_test_program_compare.at:80"
 ( $at_check_trace; cmp -s resout resexp
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
@@ -6162,7 +3686,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -r resout pass
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6175,7 +3699,7 @@ $at_traceon; }
 $as_echo "$at_srcdir/t_test_program_compare.at:86: cmp -s resout resexp"
 at_fn_check_prepare_trace "t_test_program_compare.at:86"
 ( $at_check_trace; cmp -s resout resexp
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
@@ -6223,7 +3747,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -r resout fail
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
@@ -6273,7 +3797,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -r resout fail
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6286,7 +3810,7 @@ $at_traceon; }
 $as_echo "$at_srcdir/t_test_program_compare.at:96: cmp -s resout resexp"
 at_fn_check_prepare_trace "t_test_program_compare.at:96"
 ( $at_check_trace; cmp -s resout resexp
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
@@ -6336,7 +3860,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -r resout fail
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6349,7 +3873,7 @@ $at_traceon; }
 $as_echo "$at_srcdir/t_test_program_compare.at:102: cmp -s resout resexp"
 at_fn_check_prepare_trace "t_test_program_compare.at:102"
 ( $at_check_trace; cmp -s resout resexp
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
@@ -6397,7 +3921,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -r resout skip
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
@@ -6447,7 +3971,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -r resout skip
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6460,7 +3984,7 @@ $at_traceon; }
 $as_echo "$at_srcdir/t_test_program_compare.at:112: cmp -s resout resexp"
 at_fn_check_prepare_trace "t_test_program_compare.at:112"
 ( $at_check_trace; cmp -s resout resexp
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
@@ -6510,7 +4034,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -r resout skip
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6523,7 +4047,7 @@ $at_traceon; }
 $as_echo "$at_srcdir/t_test_program_compare.at:118: cmp -s resout resexp"
 at_fn_check_prepare_trace "t_test_program_compare.at:118"
 ( $at_check_trace; cmp -s resout resexp
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
@@ -6571,7 +4095,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -r resout default
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
@@ -6621,7 +4145,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -r resout default
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6634,7 +4158,7 @@ $at_traceon; }
 $as_echo "$at_srcdir/t_test_program_compare.at:128: cmp -s resout resexp"
 at_fn_check_prepare_trace "t_test_program_compare.at:128"
 ( $at_check_trace; cmp -s resout resexp
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
@@ -6684,7 +4208,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap -r resout default
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6697,7 +4221,7 @@ $at_traceon; }
 $as_echo "$at_srcdir/t_test_program_compare.at:134: cmp -s resout resexp"
 at_fn_check_prepare_trace "t_test_program_compare.at:134"
 ( $at_check_trace; cmp -s resout resexp
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
@@ -6745,7 +4269,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap pass fail
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
@@ -6794,7 +4318,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap pass fail
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6843,7 +4367,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap pass fail
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6891,7 +4415,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap unknown
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
@@ -6940,7 +4464,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap unknown
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -6989,7 +4513,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap unknown
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -7037,7 +4561,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap pass:cleanup
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
@@ -7086,7 +4610,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap pass:cleanup
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -7135,7 +4659,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap pass:cleanup
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -7183,7 +4707,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap skip
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; tee stderr <"$at_stderr"
@@ -7232,7 +4756,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap skip
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -7281,7 +4805,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_test_program_comp
     cd ${old}
     echo ${topdir}
 })/bootstrap skip
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 $at_diff experr "$at_stderr" || at_failed=:
@@ -7295,13 +4819,13 @@ $at_traceon; }
   $at_times_p && times >"$at_times_file"
 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
 read at_status <"$at_status_file"
-#AT_STOP_8
-#AT_START_9
-at_fn_group_banner 9 't_subr_atf_check.at:30' \
+#AT_STOP_4
+#AT_START_5
+at_fn_group_banner 5 't_subr_atf_check.at:30' \
   "subr: atf_check function" "                       "
 at_xfail=no
 (
-  $as_echo "9. $at_setup_line: testing $at_desc ..."
+  $as_echo "5. $at_setup_line: testing $at_desc ..."
   $at_traceon
 
 
@@ -7343,7 +4867,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap exitcode_0_0
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7390,7 +4914,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap exitcode_0_1
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7437,7 +4961,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap exitcode_1_0
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7484,7 +5008,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap exitcode_1_1
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7532,7 +5056,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stdout_expout_pass
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7579,7 +5103,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stdout_expout_fail
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7626,7 +5150,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stdout_ignore_empty
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7673,7 +5197,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stdout_ignore_sth
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7720,7 +5244,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stdout_null_empty
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7767,7 +5291,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stdout_null_sth
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7814,7 +5338,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stdout_stdout_written
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7861,7 +5385,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stdout_match_ok
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7908,7 +5432,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stdout_match_fail
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -7956,7 +5480,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stderr_experr_pass
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -8003,7 +5527,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stderr_experr_fail
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -8050,7 +5574,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stderr_ignore_empty
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -8097,7 +5621,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stderr_ignore_sth
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -8144,7 +5668,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stderr_null_empty
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -8191,7 +5715,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stderr_null_sth
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -8238,7 +5762,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stderr_stderr_written
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -8285,7 +5809,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stderr_match_ok
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -8332,7 +5856,7 @@ at_fn_check_prepare_notrace 'a $(...) command substitution' "t_subr_atf_check.at
     cd ${old}
     echo ${topdir}
 })/bootstrap stderr_match_fail
-) >>"$at_stdout" 2>>"$at_stderr"
+) >>"$at_stdout" 2>>"$at_stderr" 5>&-
 at_status=$? at_failed=false
 $at_check_filter
 echo stderr:; cat "$at_stderr"
@@ -8346,4 +5870,4 @@ $at_traceon; }
   $at_times_p && times >"$at_times_file"
 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
 read at_status <"$at_status_file"
-#AT_STOP_9
+#AT_STOP_5
index eb8a577bb9ed7c3fa158ff9addd6194aa01ae482..d6db49ae6a682154e97a7ae64b0067fc6229a105 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
@@ -60,20 +60,25 @@ m4_define(CHECK_TCR, [TCR_DATA([expres], $2, $3)
                       AT_CHECK([diff -u expres $1], [0], [], [])])
 
 m4_define(CHECK_TCS_TCR,
-          [AT_CHECK([grep '^tc-end: $1, $2' $3], [0], [ignore], [])])
+          [AT_CHECK([grep '^tc-end: @<:@0-9. @:>@*, $1, $2' $3], [0],
+          [ignore], [])])
 
 m4_define(CHECK_TPS_TCR,
-          [AT_CHECK([grep '^tc-end: $1, $2' $3], [0], [ignore], [])])
+          [AT_CHECK([grep '^tc-end: @<:@0-9. @:>@*, $1, $2' $3], [0],
+          [ignore], [])])
 
 dnl The tests below are sorted depending on how important they are.
-m4_include(bootstrap/t_application_opts_args.at)
-m4_include(bootstrap/t_application_help.at)
 m4_include(bootstrap/t_test_program_filter.at)
 m4_include(bootstrap/t_test_program_run.at)
 m4_include(bootstrap/t_test_program_list.at)
-m4_include(bootstrap/t_atf_config.at)
-m4_include(bootstrap/t_atf_run.at)
 m4_include(bootstrap/t_test_program_compare.at)
 m4_include(bootstrap/t_subr_atf_check.at)
 
+m4_if([ENABLE_TOOLS], yes, [
+    m4_include(bootstrap/t_application_opts_args.at)
+    m4_include(bootstrap/t_application_help.at)
+    m4_include(bootstrap/t_atf_config.at)
+    m4_include(bootstrap/t_atf_run.at)
+])
+
 dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4
index c468c484100827a4f8bf23f4a63c7915c8bbf89d..714a79414e02996ad02bd3c980c3f9ab66219850 100755 (executable)
@@ -1,19 +1,17 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for Automated Testing Framework 0.12.
+# Generated by GNU Autoconf 2.69 for Automated Testing Framework 0.17.
 #
 # Report bugs to <atf-devel@NetBSD.org>.
 #
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007-2012 The NetBSD Foundation, Inc.
 ## -------------------- ##
 ## M4sh Initialization. ##
 ## -------------------- ##
@@ -93,6 +91,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -137,6 +136,31 @@ export LANGUAGE
 # CDPATH.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
@@ -170,7 +194,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -215,14 +240,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-       # neutralization value for shells without unset; and this also
-       # works around shells that cannot unset nonexistent variables.
-       BASH_ENV=/dev/null
-       ENV=/dev/null
-       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-       export CONFIG_SHELL
-       exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
 fi
 
     if test x$as_have_required = xno; then :
@@ -325,6 +361,14 @@ $as_echo X"$as_dir" |
 
 
 } # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -446,6 +490,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -480,16 +528,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -501,28 +549,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -703,10 +731,10 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='Automated Testing Framework'
 PACKAGE_TARNAME='atf'
-PACKAGE_VERSION='0.12'
-PACKAGE_STRING='Automated Testing Framework 0.12'
+PACKAGE_VERSION='0.17'
+PACKAGE_STRING='Automated Testing Framework 0.17'
 PACKAGE_BUGREPORT='atf-devel@NetBSD.org'
-PACKAGE_URL='http://www.NetBSD.org/~jmmv/atf/'
+PACKAGE_URL='http://code.google.com/p/kyua/wiki/ATF'
 
 ac_unique_file="atf-c.h"
 # Factoring default headers for most tests.
@@ -745,15 +773,22 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='LTLIBOBJS
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
 LIBOBJS
-MTN
+GIT
+HAVE_KYUA_FALSE
+HAVE_KYUA_TRUE
+KYUA
+GDB
 ATF_SHELL
 atf_xsldir
 atf_pkgconfigdir
 atf_egdir
 atf_dtddir
 atf_cssdir
+atf_aclocaldir
 ATF_WORKDIR
 atf_confdir
 ATF_CONFSUBDIR
@@ -766,7 +801,9 @@ ATF_BUILD_CPPFLAGS
 ATF_BUILD_CPP
 ATF_BUILD_CFLAGS
 ATF_BUILD_CC
+ATTRIBUTE_UNUSED
 ATTRIBUTE_NORETURN
+ATTRIBUTE_FORMAT_PRINTF
 CXXCPP
 am__fastdepCXX_FALSE
 am__fastdepCXX_TRUE
@@ -774,6 +811,9 @@ CXXDEPMODE
 ac_ct_CXX
 CXXFLAGS
 CXX
+ENABLE_TOOLS_FALSE
+ENABLE_TOOLS_TRUE
+ENABLE_TOOLS
 CPP
 OTOOL64
 OTOOL
@@ -796,6 +836,7 @@ SED
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
+am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
@@ -893,7 +934,7 @@ enable_fast_install
 enable_dependency_tracking
 with_gnu_ld
 enable_libtool_lock
-enable_unstable_shared
+enable_tools
 enable_developer
 '
       ac_precious_vars='build_alias
@@ -1322,7 +1363,7 @@ Try \`$0 --help' for more information"
     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1373,8 +1414,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1460,7 +1499,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Automated Testing Framework 0.12 to adapt to many kinds of systems.
+\`configure' configures Automated Testing Framework 0.17 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1531,7 +1570,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Automated Testing Framework 0.12:";;
+     short | recursive ) echo "Configuration of Automated Testing Framework 0.17:";;
    esac
   cat <<\_ACEOF
 
@@ -1539,16 +1578,16 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-shared[=PKGS]  build shared libraries [default=no]
+  --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-static[=PKGS]  build static libraries [default=yes]
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-dependency-tracking
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking
+                          speeds up one-time build
   --disable-libtool-lock  avoid locking (might break parallel builds)
-  --enable-unstable-shared
-                          Enables the build of shared libraries with unstable
-                          ABIs/APIs
+  --enable-tools          Enables the build of the deprecated ATF tools
   --enable-developer      enable developer features
 
 Optional Packages:
@@ -1591,7 +1630,7 @@ Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
 Report bugs to <atf-devel@NetBSD.org>.
-Automated Testing Framework home page: <http://www.NetBSD.org/~jmmv/atf/>.
+Automated Testing Framework home page: <http://code.google.com/p/kyua/wiki/ATF>.
 _ACEOF
 ac_status=$?
 fi
@@ -1654,14 +1693,14 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Automated Testing Framework configure 0.12
-generated by GNU Autoconf 2.67
+Automated Testing Framework configure 0.17
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 
-Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+Copyright (c) 2007-2012 The NetBSD Foundation, Inc.
 _ACEOF
   exit
 fi
@@ -1703,7 +1742,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
        ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1735,7 +1774,7 @@ $as_echo "$ac_try_echo"; } >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
+        test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -1749,7 +1788,7 @@ fi
   # interfere with the next link command; also delete a directory that is
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
@@ -1763,7 +1802,7 @@ ac_fn_c_check_header_compile ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1781,7 +1820,7 @@ fi
 eval ac_res=\$$3
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
@@ -1817,7 +1856,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -1859,7 +1898,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -1872,7 +1911,7 @@ ac_fn_c_check_func ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1927,7 +1966,7 @@ fi
 eval ac_res=\$$3
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_func
 
@@ -1964,7 +2003,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
        ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_compile
@@ -2001,7 +2040,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_cpp
@@ -2033,7 +2072,7 @@ $as_echo "$ac_try_echo"; } >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
+        test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -2047,7 +2086,7 @@ fi
   # interfere with the next link command; also delete a directory that is
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_link
@@ -2089,7 +2128,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_run
@@ -2102,7 +2141,7 @@ ac_fn_cxx_check_func ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2157,15 +2196,69 @@ fi
 eval ac_res=\$$3
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_cxx_check_func
+
+# ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES
+# ---------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_cxx_check_type ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+        return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+           return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_cxx_check_type
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Automated Testing Framework $as_me 0.12, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+It was created by Automated Testing Framework $as_me 0.17, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -2515,7 +2608,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-$as_echo "#define PACKAGE_COPYRIGHT \"Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.\"" >>confdefs.h
+$as_echo "#define PACKAGE_COPYRIGHT \"Copyright (c) 2007-2012 The NetBSD Foundation, Inc.\"" >>confdefs.h
 
 ac_aux_dir=
 for ac_dir in admin "$srcdir"/admin; do
@@ -2559,7 +2652,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
@@ -2593,7 +2686,7 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
@@ -2626,7 +2719,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
 $as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then :
+if ${ac_cv_target+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$target_alias" = x; then
@@ -2664,7 +2757,7 @@ test -n "$target_alias" &&
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
 
-am__api_version='1.10'
+am__api_version='1.12'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -2683,7 +2776,7 @@ am__api_version='1.10'
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
 $as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2703,7 +2796,7 @@ case $as_dir/ in #((
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+       if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
          if test $ac_prog = install &&
            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
            # AIX install.  It has an incompatible calling convention.
@@ -2761,32 +2854,50 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
 $as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Do `set' in a subshell so we don't clobber the current shell's
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
-   fi
-   rm -f conftest.file
-   if test "$*" != "X $srcdir/configure conftest.file" \
-      && test "$*" != "X conftest.file $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" "$LINENO" 5
-   fi
-
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$*" = "X"; then
+       # -L didn't work.
+       set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$*" != "X $srcdir/configure conftest.file" \
+       && test "$*" != "X conftest.file $srcdir/configure"; then
+
+       # If neither matched, then we have a broken ls.  This can happen
+       # if, for instance, CONFIG_SHELL is bash and it inherits a
+       # broken ls alias from the environment.  This has actually
+       # happened.  Such a system could not be considered "sane".
+       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment" "$LINENO" 5
+     fi
+     if test "$2" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
    test "$2" = conftest.file
    )
 then
@@ -2798,6 +2909,16 @@ Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
@@ -2811,20 +2932,136 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
 fi
 
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2834,7 +3071,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_prog in mkdir gmkdir; do
         for ac_exec_ext in '' $ac_executable_extensions; do
-          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
           case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
             'mkdir (GNU coreutils) '* | \
             'mkdir (coreutils) '* | \
@@ -2863,19 +3100,13 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
 $as_echo "$MKDIR_P" >&6; }
 
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
-  [\\/$]* | ?:[\\/]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
 for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -2887,7 +3118,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AWK="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2915,7 +3146,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2973,7 +3204,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='atf'
- VERSION='0.12'
+ VERSION='0.17'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3001,115 +3232,19 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
 
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
 
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
@@ -3149,7 +3284,7 @@ ac_config_commands="$ac_config_commands depfiles"
 am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-       @echo done
+       @echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -3160,24 +3295,24 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 
 
@@ -3193,6 +3328,7 @@ fi
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
  if test "x$enable_dependency_tracking" != xno; then
   AMDEP_TRUE=
@@ -3213,7 +3349,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3225,7 +3361,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3253,7 +3389,7 @@ if test -z "$ac_cv_prog_CC"; then
 set dummy gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3265,7 +3401,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3306,7 +3442,7 @@ if test -z "$CC"; then
 set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3318,7 +3454,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3346,7 +3482,7 @@ if test -z "$CC"; then
 set dummy cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3359,7 +3495,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -3405,7 +3541,7 @@ if test -z "$CC"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3417,7 +3553,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3449,7 +3585,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3461,7 +3597,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3732,7 +3868,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
 ac_clean_files=$ac_clean_files_save
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
 $as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3783,7 +3919,7 @@ OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3820,7 +3956,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -3898,7 +4034,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -3907,8 +4043,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3997,15 +4132,16 @@ depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -4023,6 +4159,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -4034,35 +4175,49 @@ else
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
        continue
       else
        break
       fi
       ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -4103,7 +4258,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
 else
             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
@@ -4123,7 +4278,7 @@ do
     for ac_prog in sed gsed; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+      as_fn_executable_p "$ac_path_SED" || continue
 # Check for GNU ac_path_SED and select it if it is found.
   # Check for GNU $ac_path_SED
 case `"$ac_path_SED" --version 2>&1` in
@@ -4185,7 +4340,7 @@ Xsed="$SED -e 1s/^X//"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -4199,7 +4354,7 @@ do
     for ac_prog in grep ggrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+      as_fn_executable_p "$ac_path_GREP" || continue
 # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -4248,7 +4403,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -4265,7 +4420,7 @@ do
     for ac_prog in egrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+      as_fn_executable_p "$ac_path_EGREP" || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -4315,7 +4470,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
 $as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
+if ${ac_cv_path_FGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
@@ -4332,7 +4487,7 @@ do
     for ac_prog in fgrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+      as_fn_executable_p "$ac_path_FGREP" || continue
 # Check for GNU ac_path_FGREP and select it if it is found.
   # Check for GNU $ac_path_FGREP
 case `"$ac_path_FGREP" --version 2>&1` in
@@ -4446,7 +4601,7 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
 $as_echo_n "checking for non-GNU ld... " >&6; }
 fi
-if test "${lt_cv_path_LD+set}" = set; then :
+if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
@@ -4486,7 +4641,7 @@ fi
 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+if ${lt_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU lds only accept -v.
@@ -4513,7 +4668,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then :
+if ${lt_cv_path_NM+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$NM"; then
@@ -4573,7 +4728,7 @@ else
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_DUMPBIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$DUMPBIN"; then
@@ -4585,7 +4740,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4617,7 +4772,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_DUMPBIN"; then
@@ -4629,7 +4784,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4680,18 +4835,18 @@ test -z "$NM" && NM=nm
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if test "${lt_cv_nm_interface+set}" = set; then :
+if ${lt_cv_nm_interface+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:4688: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:4843: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4691: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:4846: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4694: output\"" >&5)
+  (eval echo "\"\$as_me:4849: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -4715,7 +4870,7 @@ fi
 # find the maximum length of command line arguments
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+if ${lt_cv_sys_max_cmd_len+:} false; then :
   $as_echo_n "(cached) " >&6
 else
     i=0
@@ -4907,7 +5062,7 @@ esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
 $as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then :
+if ${lt_cv_ld_reload_flag+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_reload_flag='-r'
@@ -4943,7 +5098,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}objdump; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_OBJDUMP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OBJDUMP"; then
@@ -4955,7 +5110,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4983,7 +5138,7 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
 set dummy objdump; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OBJDUMP"; then
@@ -4995,7 +5150,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OBJDUMP="objdump"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5042,7 +5197,7 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then :
+if ${lt_cv_deplibs_check_method+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_file_magic_cmd='$MAGIC_CMD'
@@ -5258,7 +5413,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}ar; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
+if ${ac_cv_prog_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AR"; then
@@ -5270,7 +5425,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AR="${ac_tool_prefix}ar"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5298,7 +5453,7 @@ if test -z "$ac_cv_prog_AR"; then
 set dummy ar; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_AR"; then
@@ -5310,7 +5465,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_AR="ar"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5363,7 +5518,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -5375,7 +5530,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5403,7 +5558,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -5415,7 +5570,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_STRIP="strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5462,7 +5617,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -5474,7 +5629,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5502,7 +5657,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
 set dummy ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -5514,7 +5669,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5619,7 +5774,7 @@ compiler=$CC
 # Check for command to grab the raw symbol name followed by C symbol from nm.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -5897,7 +6052,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5900 "configure"' > conftest.$ac_ext
+  echo '#line 6055 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -5991,7 +6146,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   CFLAGS="$CFLAGS -belf"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then :
+if ${lt_cv_cc_needs_belf+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_ext=c
@@ -6067,7 +6222,7 @@ need_locks="$enable_libtool_lock"
 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$DSYMUTIL"; then
@@ -6079,7 +6234,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6107,7 +6262,7 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then
 set dummy dsymutil; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_DSYMUTIL"; then
@@ -6119,7 +6274,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6159,7 +6314,7 @@ fi
 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_NMEDIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$NMEDIT"; then
@@ -6171,7 +6326,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6199,7 +6354,7 @@ if test -z "$ac_cv_prog_NMEDIT"; then
 set dummy nmedit; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_NMEDIT"; then
@@ -6211,7 +6366,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_NMEDIT="nmedit"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6251,7 +6406,7 @@ fi
 set dummy ${ac_tool_prefix}lipo; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LIPO+set}" = set; then :
+if ${ac_cv_prog_LIPO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$LIPO"; then
@@ -6263,7 +6418,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6291,7 +6446,7 @@ if test -z "$ac_cv_prog_LIPO"; then
 set dummy lipo; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_LIPO"; then
@@ -6303,7 +6458,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_LIPO="lipo"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6343,7 +6498,7 @@ fi
 set dummy ${ac_tool_prefix}otool; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL+set}" = set; then :
+if ${ac_cv_prog_OTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OTOOL"; then
@@ -6355,7 +6510,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6383,7 +6538,7 @@ if test -z "$ac_cv_prog_OTOOL"; then
 set dummy otool; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OTOOL"; then
@@ -6395,7 +6550,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL="otool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6435,7 +6590,7 @@ fi
 set dummy ${ac_tool_prefix}otool64; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+if ${ac_cv_prog_OTOOL64+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OTOOL64"; then
@@ -6447,7 +6602,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6475,7 +6630,7 @@ if test -z "$ac_cv_prog_OTOOL64"; then
 set dummy otool64; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OTOOL64"; then
@@ -6487,7 +6642,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL64="otool64"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6550,7 +6705,7 @@ fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
 $as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+if ${lt_cv_apple_cc_single_mod+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_apple_cc_single_mod=no
@@ -6579,7 +6734,7 @@ fi
 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_exported_symbols_list=no
@@ -6656,7 +6811,7 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -6784,7 +6939,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6915,7 +7070,7 @@ for ac_header in dlfcn.h
 do :
   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
 "
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DLFCN_H 1
 _ACEOF
@@ -6927,7 +7082,16 @@ done
 
 
 # Set options
-# Check whether --enable-shared was given.
+
+
+
+        enable_dlopen=no
+
+
+  enable_win32_dll=no
+
+
+            # Check whether --enable-shared was given.
 if test "${enable_shared+set}" = set; then :
   enableval=$enable_shared; p=${PACKAGE-default}
     case $enableval in
@@ -6947,7 +7111,7 @@ if test "${enable_shared+set}" = set; then :
       ;;
     esac
 else
-  enable_shared=no
+  enable_shared=yes
 fi
 
 
@@ -6958,14 +7122,6 @@ fi
 
 
 
-
-        enable_dlopen=no
-
-
-  enable_win32_dll=no
-
-
-
   # Check whether --enable-static was given.
 if test "${enable_static+set}" = set; then :
   enableval=$enable_static; p=${PACKAGE-default}
@@ -7098,7 +7254,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
 $as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then :
+if ${lt_cv_objdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   rm -f .libs 2>/dev/null
@@ -7206,7 +7362,7 @@ file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MAGIC_CMD in
@@ -7272,7 +7428,7 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then
   if test -n "$ac_tool_prefix"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
 $as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MAGIC_CMD in
@@ -7409,7 +7565,7 @@ if test "$GCC" = yes; then
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_rtti_exceptions=no
@@ -7425,11 +7581,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7428: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7584: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7432: \$? = $ac_status" >&5
+   echo "$as_me:7588: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7748,7 +7904,7 @@ $as_echo "$lt_prog_compiler_pic" >&6; }
 if test -n "$lt_prog_compiler_pic"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_pic_works=no
@@ -7764,11 +7920,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7767: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7923: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7771: \$? = $ac_status" >&5
+   echo "$as_me:7927: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7807,7 +7963,7 @@ fi
 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+if ${lt_cv_prog_compiler_static_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works=no
@@ -7850,7 +8006,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o=no
@@ -7869,11 +8025,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7872: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8028: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7876: \$? = $ac_status" >&5
+   echo "$as_me:8032: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -7905,7 +8061,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o=no
@@ -7924,11 +8080,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7927: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8083: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7931: \$? = $ac_status" >&5
+   echo "$as_me:8087: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -10033,7 +10189,7 @@ else
   # if libdl is installed we need to link against it
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10067,7 +10223,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
 
 
   *)
     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = x""yes; then :
+if test "x$ac_cv_func_shl_load" = xyes; then :
   lt_cv_dlopen="shl_load"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
 $as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+if ${ac_cv_lib_dld_shl_load+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10120,16 +10276,16 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
 else
   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = x""yes; then :
+if test "x$ac_cv_func_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10163,12 +10319,12 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+if ${ac_cv_lib_svld_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10202,12 +10358,12 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
 $as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+if ${ac_cv_lib_dld_dld_link+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10241,7 +10397,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
 fi
 
@@ -10282,7 +10438,7 @@ fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then :
+if ${lt_cv_dlopen_self+:} false; then :
   $as_echo_n "(cached) " >&6
 else
          if test "$cross_compiling" = yes; then :
@@ -10291,7 +10447,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10294 "configure"
+#line 10450 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10378,7 +10534,7 @@ $as_echo "$lt_cv_dlopen_self" >&6; }
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then :
+if ${lt_cv_dlopen_self_static+:} false; then :
   $as_echo_n "(cached) " >&6
 else
          if test "$cross_compiling" = yes; then :
@@ -10387,7 +10543,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10390 "configure"
+#line 10546 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10614,14 +10770,25 @@ CC="$lt_save_CC"
 # Only expand once:
 
 
-# Check whether --enable-unstable-shared was given.
-if test "${enable_unstable_shared+set}" = set; then :
-  enableval=$enable_unstable_shared; case $enableval in
-     yes|no) enable_shared=${enableval} ;;
-     *) enable_shared=${enableval} ;;
+
+# Check whether --enable-tools was given.
+if test "${enable_tools+set}" = set; then :
+  enableval=$enable_tools; case $enableval in
+     yes|no) enable_tools=${enableval} ;;
+     *) as_fn_error $? "Invalid value passed to --enable-tools" "$LINENO" 5 ;;
      esac
 else
-  enable_shared=no
+  enable_tools=no
+fi
+
+ENABLE_TOOLS=${enable_tools}
+
+ if test "${enable_tools}" = yes; then
+  ENABLE_TOOLS_TRUE=
+  ENABLE_TOOLS_FALSE='#'
+else
+  ENABLE_TOOLS_TRUE='#'
+  ENABLE_TOOLS_FALSE=
 fi
 
 
@@ -10642,7 +10809,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -10654,7 +10821,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -10682,7 +10849,7 @@ if test -z "$ac_cv_prog_CC"; then
 set dummy gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -10694,7 +10861,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -10735,7 +10902,7 @@ if test -z "$CC"; then
 set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -10747,7 +10914,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -10775,7 +10942,7 @@ if test -z "$CC"; then
 set dummy cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -10788,7 +10955,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -10834,7 +11001,7 @@ if test -z "$CC"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -10846,7 +11013,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -10878,7 +11045,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -10890,7 +11057,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -10962,7 +11129,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10999,7 +11166,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -11077,7 +11244,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -11086,8 +11253,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -11176,15 +11342,16 @@ depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -11202,6 +11369,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -11213,35 +11385,49 @@ else
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
        continue
       else
        break
       fi
       ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -11289,7 +11475,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
 fi
 set dummy $CC; ac_cc=`$as_echo "$2" |
                      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11394,8 +11580,9 @@ fi
 # FIXME: we rely on the cache variable name because
 # there is no other way.
 set dummy $CC
-ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
    # Losing compiler, so override with the script.
    # FIXME: It is wrong to rewrite CC.
    # But if we don't then we get into trouble of one sort or another.
@@ -11428,7 +11615,7 @@ if test -z "$CXX"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CXX"; then
@@ -11440,7 +11627,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -11472,7 +11659,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CXX"; then
@@ -11484,7 +11671,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CXX="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -11550,7 +11737,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11587,7 +11774,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -11673,15 +11860,16 @@ depcc="$CXX"  am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -11699,6 +11887,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -11710,35 +11903,49 @@ else
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
        continue
       else
        break
       fi
       ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -11794,7 +12001,7 @@ if test -z "$CXX"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CXX"; then
@@ -11806,7 +12013,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -11838,7 +12045,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CXX"; then
@@ -11850,7 +12057,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CXX="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -11916,7 +12123,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11953,7 +12160,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -12039,15 +12246,16 @@ depcc="$CXX"  am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named `D' -- because `-MD' means `put the output
-  # in D'.
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -12065,6 +12273,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -12076,35 +12289,49 @@ else
     : > sub/conftest.c
     for i in 1 2 3 4 5 6; do
       echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
-      # Solaris 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
        continue
       else
        break
       fi
       ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -12154,7 +12381,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
 if test -z "$CXXCPP"; then
-  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+  if ${ac_cv_prog_CXXCPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CXXCPP needs to be expanded
@@ -12455,7 +12682,7 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
 $as_echo_n "checking for non-GNU ld... " >&6; }
 fi
-if test "${lt_cv_path_LD+set}" = set; then :
+if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
@@ -12495,7 +12722,7 @@ fi
 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+if ${lt_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU lds only accept -v.
@@ -14017,7 +14244,7 @@ $as_echo "$lt_prog_compiler_pic_CXX" >&6; }
 if test -n "$lt_prog_compiler_pic_CXX"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_pic_works_CXX=no
@@ -14033,11 +14260,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14036: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14263: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14040: \$? = $ac_status" >&5
+   echo "$as_me:14267: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14073,7 +14300,7 @@ fi
 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works_CXX=no
@@ -14113,7 +14340,7 @@ fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o_CXX=no
@@ -14132,11 +14359,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14135: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14362: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14139: \$? = $ac_status" >&5
+   echo "$as_me:14366: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -14165,7 +14392,7 @@ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o_CXX=no
@@ -14184,11 +14411,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14187: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14414: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14191: \$? = $ac_status" >&5
+   echo "$as_me:14418: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -15119,7 +15346,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
 $as_echo_n "checking whether the C++ compiler works... " >&6; }
-if test "${atf_cv_prog_cxx_works+set}" = set; then :
+if ${atf_cv_prog_cxx_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_ext=cpp
@@ -15160,75 +15387,65 @@ if test "${atf_cv_prog_cxx_works}" = no; then
 fi
 
 
+
+
     # Check whether --enable-developer was given.
 if test "${enable_developer+set}" = set; then :
   enableval=$enable_developer;
 else
-  case ${PACKAGE_VERSION} in
-                   0.*|*99*|*alpha*|*beta*)
-                       enable_developer=yes
-                       ;;
-                   *)
-                       enable_developer=no
-                       ;;
-                   esac
+  if test -d ${srcdir}/.git; then
+             { $as_echo "$as_me:${as_lineno-$LINENO}: building from HEAD; developer mode autoenabled" >&5
+$as_echo "$as_me: building from HEAD; developer mode autoenabled" >&6;}
+             enable_developer=yes
+         else
+             enable_developer=no
+         fi
 fi
 
 
+    #
+    # The following warning flags should also be enabled but cannot be.
+    # Reasons given below.
+    #
+    # -Wold-style-cast: Raises errors when using TIOCGWINSZ, at least under
+    #                   Mac OS X.  This is due to the way _IOR is defined.
+    #
+
+    try_c_cxx_flags="-D_FORTIFY_SOURCE=2 \
+                     -Wall \
+                     -Wcast-qual \
+                     -Wextra \
+                     -Wpointer-arith \
+                     -Wredundant-decls \
+                     -Wreturn-type \
+                     -Wshadow \
+                     -Wsign-compare \
+                     -Wswitch \
+                     -Wwrite-strings"
+
+    try_c_flags="-Wmissing-prototypes \
+                 -Wno-traditional \
+                 -Wstrict-prototypes"
+
+    try_cxx_flags="-Wabi \
+                   -Wctor-dtor-privacy \
+                   -Wno-deprecated \
+                   -Wno-non-template-friend \
+                   -Wno-pmf-conversions \
+                   -Wnon-virtual-dtor \
+                   -Woverloaded-virtual \
+                   -Wreorder \
+                   -Wsign-promo \
+                   -Wsynth"
+
     if test ${enable_developer} = yes; then
         try_werror=yes
-
-        try_c_cxx_flags="-g \
-                         -Wall \
-                         -Wcast-qual \
-                         -Wextra \
-                         -Wno-unused-parameter \
-                         -Wpointer-arith \
-                         -Wredundant-decls \
-                         -Wreturn-type \
-                         -Wshadow \
-                         -Wsign-compare \
-                         -Wswitch \
-                         -Wwrite-strings"
-
-        try_c_flags="-Wmissing-prototypes \
-                     -Wno-traditional \
-                     -Wstrict-prototypes"
-
-        try_cxx_flags="-Wabi \
-                       -Wctor-dtor-privacy \
-                       -Wno-deprecated \
-                       -Wno-non-template-friend \
-                       -Wno-pmf-conversions \
-                       -Wnon-virtual-dtor \
-                       -Woverloaded-virtual \
-                       -Wreorder \
-                       -Wsign-promo \
-                       -Wsynth"
-
-        #
-        # The following flags should also be enabled but cannot be.  Reasons
-        # given below.
-        #
-        # -Wold-style-cast: Raises errors when using TIOCGWINSZ, at least under
-        #                   Mac OS X.  This is due to the way _IOR is defined.
-        #
+        try_c_cxx_flags="${try_c_cxx_flags} -g -Werror"
     else
         try_werror=no
-        try_c_cxx_flags="-DNDEBUG"
-        try_c_flags=
-        try_cxx_flags=
+        try_c_cxx_flags="${try_c_cxx_flags} -DNDEBUG"
     fi
-    try_c_cxx_flags="${try_c_cxx_flags} -D_FORTIFY_SOURCE=2"
 
-    # Try and set -Werror first so that tests for other flags are accurate.
-    # Otherwise, compilers such as clang will report the flags as a warning and
-    # we will conclude they are supported... but when they are combined with
-    # -Werror they cause build failures.
-    if test ${try_werror} = yes; then
-
-    valid_cflags=
-    for f in -Werror; do
 
     ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -15236,12 +15453,19 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports ${f}" >&5
-$as_echo_n "checking whether ${CC} supports ${f}... " >&6; }
-    saved_cflags="${CFLAGS}"
-    valid_cflag=no
-    CFLAGS="${CFLAGS} ${f}"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    valid_cflags=
+    for f in ${try_c_cxx_flags} ${try_c_flags}; do
+
+
+
+
+    if test x"${kyua_CC_has_werror-unset}" = xunset; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror" >&5
+$as_echo_n "checking whether ${CC} supports -Werror... " >&6; }
+        saved_flags="${CFLAGS}"
+        kyua_CC_has_werror=no
+        CFLAGS="${CFLAGS}  -Werror"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -15255,46 +15479,29 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-                   valid_cflag=yes
+                       kyua_CC_has_werror=yes
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-    CFLAGS="${saved_cflags}"
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-    if test ${valid_cflag} = yes; then
-        valid_cflags="${valid_cflags} ${f}"
+        CFLAGS="${saved_flags}"
     fi
 
-    done
-    if test -n "${valid_cflags}"; then
-        CFLAGS="${CFLAGS} ${valid_cflags}"
-    fi
-
-
-    valid_cxxflags=
-    for f in -Werror; do
-
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+    if test "${f}" = "-Werror"; then
+        found=${kyua_CC_has_werror}
+    else
+        found=unset
+        if test ${kyua_CC_has_werror} = yes; then
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports ${f}" >&5
-$as_echo_n "checking whether ${CXX} supports ${f}... " >&6; }
-    saved_cxxflags="${CXXFLAGS}"
-    valid_cxxflag=no
-    CXXFLAGS="${CXXFLAGS} ${f}"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    if test x"${found-unset}" = xunset; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports ${f}" >&5
+$as_echo_n "checking whether ${CC} supports ${f}... " >&6; }
+        saved_flags="${CFLAGS}"
+        found=no
+        CFLAGS="${CFLAGS} -Werror ${f}"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -15305,51 +15512,28 @@ return 0;
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-                   valid_cxxflag=yes
+                       found=yes
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-    CXXFLAGS="${saved_cxxflags}"
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-    if test ${valid_cxxflag} = yes; then
-        valid_cxxflags="${valid_cxxflags} ${f}"
+        CFLAGS="${saved_flags}"
     fi
 
-    done
-    if test -n "${valid_cxxflags}"; then
-        CXXFLAGS="${CXXFLAGS} ${valid_cxxflags}"
-    fi
-
-    fi
-
-
-    valid_cflags=
-    for f in ${try_c_cxx_flags} ${try_c_flags}; do
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+        else
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports ${f}" >&5
+    if test x"${found-unset}" = xunset; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports ${f}" >&5
 $as_echo_n "checking whether ${CC} supports ${f}... " >&6; }
-    saved_cflags="${CFLAGS}"
-    valid_cflag=no
-    CFLAGS="${CFLAGS} ${f}"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        saved_flags="${CFLAGS}"
+        found=no
+        CFLAGS="${CFLAGS}  ${f}"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -15363,33 +15547,34 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-                   valid_cflag=yes
+                       found=yes
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-    CFLAGS="${saved_cflags}"
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
+        CFLAGS="${saved_flags}"
+    fi
 
-    if test ${valid_cflag} = yes; then
+        fi
+    fi
+    if test ${found} = yes; then
         valid_cflags="${valid_cflags} ${f}"
     fi
 
+
     done
     if test -n "${valid_cflags}"; then
         CFLAGS="${CFLAGS} ${valid_cflags}"
     fi
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
-    valid_cxxflags=
-    for f in ${try_c_cxx_flags} ${try_cxx_flags}; do
 
     ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -15397,12 +15582,55 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports ${f}" >&5
+    valid_cxxflags=
+    for f in ${try_c_cxx_flags} ${try_cxx_flags}; do
+
+
+
+
+    if test x"${kyua_CXX_has_werror-unset}" = xunset; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror" >&5
+$as_echo_n "checking whether ${CXX} supports -Werror... " >&6; }
+        saved_flags="${CXXFLAGS}"
+        kyua_CXX_has_werror=no
+        CXXFLAGS="${CXXFLAGS}  -Werror"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                       kyua_CXX_has_werror=yes
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        CXXFLAGS="${saved_flags}"
+    fi
+
+    if test "${f}" = "-Werror"; then
+        found=${kyua_CXX_has_werror}
+    else
+        found=unset
+        if test ${kyua_CXX_has_werror} = yes; then
+
+    if test x"${found-unset}" = xunset; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports ${f}" >&5
 $as_echo_n "checking whether ${CXX} supports ${f}... " >&6; }
-    saved_cxxflags="${CXXFLAGS}"
-    valid_cxxflag=no
-    CXXFLAGS="${CXXFLAGS} ${f}"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        saved_flags="${CXXFLAGS}"
+        found=no
+        CXXFLAGS="${CXXFLAGS} -Werror ${f}"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -15416,29 +15644,65 @@ _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-                   valid_cxxflag=yes
+                       found=yes
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-    CXXFLAGS="${saved_cxxflags}"
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+        CXXFLAGS="${saved_flags}"
+    fi
 
+        else
 
-    if test ${valid_cxxflag} = yes; then
+    if test x"${found-unset}" = xunset; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports ${f}" >&5
+$as_echo_n "checking whether ${CXX} supports ${f}... " >&6; }
+        saved_flags="${CXXFLAGS}"
+        found=no
+        CXXFLAGS="${CXXFLAGS}  ${f}"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                       found=yes
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        CXXFLAGS="${saved_flags}"
+    fi
+
+        fi
+    fi
+    if test ${found} = yes; then
         valid_cxxflags="${valid_cxxflags} ${f}"
     fi
 
+
     done
     if test -n "${valid_cxxflags}"; then
         CXXFLAGS="${CXXFLAGS} ${valid_cxxflags}"
     fi
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
 
 
 
@@ -15478,15 +15742,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
 
-    ac_ext=c
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt allows a + sign for POSIX behavior" >&5
+$as_echo_n "checking whether getopt allows a + sign for POSIX behavior... " >&6; }
+if ${kyua_cv_getopt_plus+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt allows a + sign for POSIX behavior" >&5
-$as_echo_n "checking whether getopt allows a + sign for POSIX behavior... " >&6; }
-    if test "$cross_compiling" = yes; then :
+      if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
@@ -15535,35 +15803,43 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  getopt_allows_plus=yes
-
-$as_echo "#define HAVE_GNU_GETOPT 1" >>confdefs.h
-
+  kyua_cv_getopt_plus=yes
 else
-  getopt_allows_plus=no
+  kyua_cv_getopt_plus=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${getopt_allows_plus}" >&5
-$as_echo "${getopt_allows_plus}" >&6; }
-    ac_ext=cpp
+      ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
-    ac_ext=c
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kyua_cv_getopt_plus" >&5
+$as_echo "$kyua_cv_getopt_plus" >&6; }
+    if test x"${kyua_cv_getopt_plus}" = xyes; then
+
+$as_echo "#define HAVE_GNU_GETOPT 1" >>confdefs.h
+
+    fi
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt has optreset" >&5
+$as_echo_n "checking whether getopt has optreset... " >&6; }
+if ${kyua_cv_getopt_optreset+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt has optreset" >&5
-$as_echo_n "checking whether getopt has optreset... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdlib.h>
 #include <unistd.h>
@@ -15579,29 +15855,82 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  getopt_has_optreset=yes
+  kyua_cv_getopt_optreset=yes
 else
-  getopt_has_optreset=no
+  kyua_cv_getopt_optreset=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test x"${getopt_has_optreset}" = yes; then
-
-$as_echo "#define HAVE_OPTRESET 1" >>confdefs.h
-
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${getopt_has_optreset}" >&5
-$as_echo "${getopt_has_optreset}" >&6; }
-    ac_ext=cpp
+      ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kyua_cv_getopt_optreset" >&5
+$as_echo "$kyua_cv_getopt_optreset" >&6; }
+    if test x"${kyua_cv_getopt_optreset}" = xyes; then
+
+$as_echo "#define HAVE_OPTRESET 1" >>confdefs.h
+
+    fi
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((__format__(__printf__, a, b))) is supported" >&5
+$as_echo_n "checking whether __attribute__((__format__(__printf__, a, b))) is supported... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdarg.h>
+#include <stdio.h>
+
+static void test_printf(const char *, ...)
+    __attribute__((__format__(__printf__, 1, 2)));
+
+static void
+test_printf(const char *format, ...)
+{
+    va_list ap;
+
+    va_start(ap, format);
+    vprintf(format, ap);
+    va_end(ap);
+}
+int
+main ()
+{
+
+    test_printf("foo %s", "bar");
+    return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+         value="__attribute__((__format__(__printf__, a, b)))"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+         value=""
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ATTRIBUTE_FORMAT_PRINTF=${value}
+
+
 
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((noreturn)) is supported" >&5
-$as_echo_n "checking whether __attribute__((noreturn)) is supported... " >&6; }
-    if test "$cross_compiling" = yes; then :
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((__noreturn__)) is supported" >&5
+$as_echo_n "checking whether __attribute__((__noreturn__)) is supported... " >&6; }
+if ${kyua_cv_attribute_noreturn+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
@@ -15625,20 +15954,60 @@ main ()
 }
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
+  kyua_cv_attribute_noreturn=yes
+else
+  kyua_cv_attribute_noreturn=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kyua_cv_attribute_noreturn" >&5
+$as_echo "$kyua_cv_attribute_noreturn" >&6; }
+    if test x"${kyua_cv_attribute_noreturn}" = xyes; then
+        value="__attribute__((__noreturn__))"
+    else
+        value=""
+    fi
+    ATTRIBUTE_NORETURN=${value}
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((__unused__)) is supported" >&5
+$as_echo_n "checking whether __attribute__((__unused__)) is supported... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+static void
+function(int a __attribute__((__unused__)))
+{
+}
+int
+main ()
+{
+
+    function(3);
+    return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-         value="__attribute__((noreturn))"
+         value="__attribute__((__unused__))"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
          value=""
 
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ATTRIBUTE_UNUSED=${value}
 
-    ATTRIBUTE_NORETURN=${value}
 
 
 
@@ -15805,7 +16174,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd(NULL, 0) works" >&5
 $as_echo_n "checking whether getcwd(NULL, 0) works... " >&6; }
-    if test "$cross_compiling" = yes; then :
+if ${kyua_cv_getcwd_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
@@ -15827,24 +16200,28 @@ main ()
 }
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_GETCWD_DYN 1" >>confdefs.h
-
+  kyua_cv_getcwd_works=yes
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  kyua_cv_getcwd_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kyua_cv_getcwd_works" >&5
+$as_echo "$kyua_cv_getcwd_works" >&6; }
+    if test x"${kyua_cv_getcwd_works}" = xyes; then
+
+$as_echo "#define HAVE_GETCWD_DYN 1" >>confdefs.h
+
+    fi
+
     for ac_func in unmount
 do :
   ac_fn_cxx_check_func "$LINENO" "unmount" "ac_cv_func_unmount"
-if test "x$ac_cv_func_unmount" = x""yes; then :
+if test "x$ac_cv_func_unmount" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_UNMOUNT 1
 _ACEOF
@@ -15889,7 +16266,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the last valid signal" >&5
 $as_echo_n "checking for the last valid signal... " >&6; }
-    if test "$cross_compiling" = yes; then :
+if ${kyua_cv_signal_lastno+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
@@ -15949,31 +16330,36 @@ main ()
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
   if test ! -f conftest.cnt; then
-         last_signo=15
-         { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed; assuming ${last_signo}" >&5
-$as_echo "failed; assuming ${last_signo}" >&6; }
-     else
-         last_signo=$(cat conftest.cnt)
-         rm -f conftest.cnt
-         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${last_signo}" >&5
-$as_echo "${last_signo}" >&6; }
-     fi
+             kyua_cv_signal_lastno=15
+         else
+             kyua_cv_signal_lastno=$(cat conftest.cnt)
+             rm -f conftest.cnt
+         fi
 else
-  last_signo=15
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed; assuming ${last_signo}" >&5
-$as_echo "failed; assuming ${last_signo}" >&6; }
+  kyua_cv_signal_lastno=15
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kyua_cv_signal_lastno" >&5
+$as_echo "$kyua_cv_signal_lastno" >&6; }
+
 cat >>confdefs.h <<_ACEOF
-#define LAST_SIGNO ${last_signo}
+#define LAST_SIGNO ${kyua_cv_signal_lastno}
 _ACEOF
 
 
 
+ac_fn_cxx_check_type "$LINENO" "timer_t" "ac_cv_type_timer_t" "#include <time.h>
+"
+if test "x$ac_cv_type_timer_t" = xyes; then :
+
+fi
+
+
 
 
     test x"${ATF_BUILD_CC-unset}" = x"unset" && ATF_BUILD_CC="${CC}"
 
 
 
-machine=${target_cpu}
-
-case ${machine} in
-    i[3-9]86)
-        arch=i386
-        ;;
-    x86_64)
-        arch=amd64
-        ;;
-    *)
-        arch=${machine}
-        ;;
-esac
+atf_arch=`uname -p`
+atf_machine=`uname -m`
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: Machine type: ${machine}, architecture: ${arch}" >&5
-$as_echo "$as_me: Machine type: ${machine}, architecture: ${arch}" >&6;}
-atf_arch=${arch}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: Machine type: ${atf_machine}, architecture: ${atf_arch}" >&5
+$as_echo "$as_me: Machine type: ${atf_machine}, architecture: ${atf_arch}" >&6;}
+atf_arch=${atf_arch}
 
-atf_machine=${machine}
+atf_machine=${atf_machine}
 
 
 
@@ -16077,6 +16452,8 @@ else
     esac
 fi
 
+atf_aclocaldir=\${datadir}/aclocal
+
 atf_cssdir=\${datadir}/examples/atf
 
 atf_dtddir=\${datadir}/xml/atf
@@ -16097,7 +16474,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ATF_SHELL+set}" = set; then :
+if ${ac_cv_path_ATF_SHELL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ATF_SHELL in
@@ -16111,7 +16488,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_ATF_SHELL="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -16150,16 +16527,104 @@ if test x"${ATF_SHELL}" = x""; then
 fi
 
 
-# Extract the first word of "mtn", so it can be a program name with args.
-set dummy mtn; ac_word=$2
+# Extract the first word of "gdb", so it can be a program name with args.
+set dummy gdb; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GDB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GDB in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GDB="$GDB" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_GDB="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+GDB=$ac_cv_path_GDB
+if test -n "$GDB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDB" >&5
+$as_echo "$GDB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "kyua", so it can be a program name with args.
+set dummy kyua; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_KYUA+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $KYUA in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_KYUA="$KYUA" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_KYUA="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+KYUA=$ac_cv_path_KYUA
+if test -n "$KYUA"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KYUA" >&5
+$as_echo "$KYUA" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test -n "${KYUA}"; then
+  HAVE_KYUA_TRUE=
+  HAVE_KYUA_FALSE='#'
+else
+  HAVE_KYUA_TRUE='#'
+  HAVE_KYUA_FALSE=
+fi
+
+# Extract the first word of "git", so it can be a program name with args.
+set dummy git; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_MTN+set}" = set; then :
+if ${ac_cv_path_GIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $MTN in
+  case $GIT in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_MTN="$MTN" # Let the user override the test with a path.
+  ac_cv_path_GIT="$GIT" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -16168,8 +16633,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_MTN="$as_dir/$ac_word$ac_exec_ext"
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_GIT="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -16180,10 +16645,10 @@ IFS=$as_save_IFS
   ;;
 esac
 fi
-MTN=$ac_cv_path_MTN
-if test -n "$MTN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MTN" >&5
-$as_echo "$MTN" >&6; }
+GIT=$ac_cv_path_GIT
+if test -n "$GIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5
+$as_echo "$GIT" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
@@ -16258,10 +16723,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
+    if test "x$cache_file" != "x/dev/null"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+       cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+         mv -f confcache "$cache_file"$$ &&
+         mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+         mv -f confcache "$cache_file" ;;
+       esac
+      fi
+    fi
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -16292,6 +16768,22 @@ LIBOBJS=$ac_libobjs
 LTLIBOBJS=$ac_ltlibobjs
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
   as_fn_error $? "conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16300,6 +16792,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_TOOLS_TRUE}" && test -z "${ENABLE_TOOLS_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_TOOLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16312,8 +16808,12 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
   as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_KYUA_TRUE}" && test -z "${HAVE_KYUA_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_KYUA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -16414,6 +16914,7 @@ fi
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -16609,16 +17110,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -16678,28 +17179,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -16720,8 +17209,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Automated Testing Framework $as_me 0.12, which was
-generated by GNU Autoconf 2.67.  Invocation command line was
+This file was extended by Automated Testing Framework $as_me 0.17, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -16781,17 +17270,17 @@ Configuration commands:
 $config_commands
 
 Report bugs to <atf-devel@NetBSD.org>.
-Automated Testing Framework home page: <http://www.NetBSD.org/~jmmv/atf/>."
+Automated Testing Framework home page: <http://code.google.com/p/kyua/wiki/ATF>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-Automated Testing Framework config.status 0.12
-configured by $0, generated by GNU Autoconf 2.67,
+Automated Testing Framework config.status 0.17
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -16882,7 +17371,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
   trap 'as_fn_exit 1' 1 2 13 15
 }
@@ -17308,12 +17798,13 @@ $debug ||
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -17335,7 +17826,7 @@ else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -17363,7 +17854,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -17411,7 +17902,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = "\a"
 
@@ -17443,7 +17934,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
   cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
@@ -17477,7 +17968,7 @@ fi # test -n "$CONFIG_FILES"
 # No need to generate them if there are no CONFIG_HEADERS.
 # This happens for instance with `./config.status Makefile'.
 if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -17489,8 +17980,8 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
@@ -17610,7 +18101,7 @@ do
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
         # (if the path is not absolute).  The absolute path cannot be DOS-style,
         # because $ac_f cannot contain `:'.
@@ -17645,7 +18136,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
@@ -17782,21 +18273,22 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
@@ -17807,20 +18299,20 @@ which seems to be undefined.  Please make sure it is defined" >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
+      mv "$ac_tmp/config.h" "$ac_file" \
        || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
@@ -17869,7 +18361,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
     "bootstrap/atconfig":C) cat >bootstrap/atconfig <<ATEOF
 # Configurable variable values for building test suites.
 # Generated by $0.
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2012 Free Software Foundation, Inc.
 
 # The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
 at_testdir='bootstrap'
@@ -17889,18 +18381,28 @@ AUTOTEST_PATH='bootstrap'
 SHELL=\${CONFIG_SHELL-'$SHELL'}
 ATEOF
  ;;
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$mf" : 'X\(//\)[^/]' \| \
         X"$mf" : 'X\(//\)$' \| \
@@ -17923,28 +18425,26 @@ $as_echo X"$mf" |
            q
          }
          s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$file" : 'X\(//\)[^/]' \| \
         X"$file" : 'X\(//\)$' \| \
@@ -17967,11 +18467,12 @@ $as_echo X"$file" |
            q
          }
          s/.*/./; q'`
-    as_dir=$dirpart/$fdir; as_fn_mkdir_p
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
  ;;
     "libtool":C)
 
@@ -18814,10 +19315,10 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
 
-if test ${enable_shared} = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Shared libraries with unstable ABIs/APIs have been enabled." >&5
-$as_echo "$as_me: WARNING: Shared libraries with unstable ABIs/APIs have been enabled." >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please do not install them as part of a binary package." >&5
-$as_echo "$as_me: WARNING: Please do not install them as part of a binary package." >&2;}
+if test ${enable_tools} = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building the deprecated ATF tools (atf-run and atf-report);" >&5
+$as_echo "$as_me: WARNING: Building the deprecated ATF tools (atf-run and atf-report);" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: please migrate to Kyua as soon as feasible." >&5
+$as_echo "$as_me: WARNING: please migrate to Kyua as soon as feasible." >&2;}
 fi
 
index 0c2f27b0bf7dd9cbf2c160c5a20d285e96dea068..14ac2c7d106b290ac67793719a9600c3f3049572 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
@@ -31,12 +31,12 @@ dnl -----------------------------------------------------------------------
 dnl Initialize the GNU build system.
 dnl -----------------------------------------------------------------------
 
-AC_INIT([Automated Testing Framework], [0.12], [atf-devel@NetBSD.org], [atf],
-        [http://www.NetBSD.org/~jmmv/atf/])
+AC_INIT([Automated Testing Framework], [0.17], [atf-devel@NetBSD.org], [atf],
+        [http://code.google.com/p/kyua/wiki/ATF])
 AC_PREREQ([2.65])
-AC_COPYRIGHT([Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.])
+AC_COPYRIGHT([Copyright (c) 2007-2012 The NetBSD Foundation, Inc.])
 AC_DEFINE([PACKAGE_COPYRIGHT],
-          ["Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc."],
+          ["Copyright (c) 2007-2012 The NetBSD Foundation, Inc."],
           [Define to the copyright string applicable to this package.])
 AC_CONFIG_AUX_DIR([admin])
 AC_CONFIG_HEADERS([bconfig.h])
@@ -48,22 +48,18 @@ AC_CANONICAL_TARGET
 
 AM_INIT_AUTOMAKE([1.9 check-news foreign subdir-objects -Wall])
 
-LT_INIT([disable-shared])
-dnl This is just a hack to reverse the meaning of the --enable-shared
-dnl flag provided by libtool.  We want it to default to building static
-dnl libraries only for now, but these are painful during development.
-dnl It is nice to have an easy way to enable shared library builds.
-dnl
-dnl TODO(1.0): Enable shared libraries by default, and fix their
-dnl -version-info.
-AC_ARG_ENABLE(unstable-shared,
-    AS_HELP_STRING([--enable-unstable-shared],
-        [Enables the build of shared libraries with unstable ABIs/APIs]),
+LT_INIT
+
+AC_ARG_ENABLE(tools,
+    AS_HELP_STRING([--enable-tools],
+        [Enables the build of the deprecated ATF tools]),
     [case $enableval in
-     yes|no) enable_shared=${enableval} ;;
-     *) enable_shared=${enableval} ;;
+     yes|no) enable_tools=${enableval} ;;
+     *) AC_MSG_ERROR([Invalid value passed to --enable-tools]) ;;
      esac],
-    [enable_shared=no])
+    [enable_tools=no])
+AC_SUBST([ENABLE_TOOLS], ${enable_tools})
+AM_CONDITIONAL([ENABLE_TOOLS], [test "${enable_tools}" = yes])
 
 dnl -----------------------------------------------------------------------
 dnl Check for the C and C++ compilers and required features.
@@ -88,7 +84,7 @@ if test "${atf_cv_prog_cxx_works}" = no; then
     AC_MSG_ERROR([C++ compiler cannot create executables])
 fi
 
-ATF_DEVELOPER_MODE
+KYUA_DEVELOPER_MODE([C,C++])
 
 ATF_MODULE_APPLICATION
 ATF_MODULE_DEFS
@@ -97,6 +93,8 @@ ATF_MODULE_FS
 ATF_MODULE_SANITY
 ATF_MODULE_SIGNALS
 
+AC_CHECK_TYPE([timer_t], [], [], [[#include <time.h>]])
+
 ATF_RUNTIME_TOOL([ATF_BUILD_CC],
                  [C compiler to use at runtime], [${CC}])
 ATF_RUNTIME_TOOL([ATF_BUILD_CFLAGS],
@@ -128,23 +126,12 @@ dnl -----------------------------------------------------------------------
 dnl Architecture and machine checks.
 dnl -----------------------------------------------------------------------
 
-machine=${target_cpu}
-
-case ${machine} in
-    i@<:@3-9@:>@86)
-        arch=i386
-        ;;
-    x86_64)
-        arch=amd64
-        ;;
-    *)
-        arch=${machine}
-        ;;
-esac
+atf_arch=`uname -p`
+atf_machine=`uname -m`
 
-AC_MSG_NOTICE([Machine type: ${machine}, architecture: ${arch}])
-AC_SUBST(atf_arch, ${arch})
-AC_SUBST(atf_machine, ${machine})
+AC_MSG_NOTICE([Machine type: ${atf_machine}, architecture: ${atf_arch}])
+AC_SUBST(atf_arch, ${atf_arch})
+AC_SUBST(atf_machine, ${atf_machine})
 
 dnl -----------------------------------------------------------------------
 dnl User-customizable variables.
@@ -191,6 +178,7 @@ else
     esac
 fi
 
+AC_SUBST(atf_aclocaldir, \${datadir}/aclocal)
 AC_SUBST(atf_cssdir, \${datadir}/examples/atf)
 AC_SUBST(atf_dtddir, \${datadir}/xml/atf)
 AC_SUBST(atf_egdir, \${datadir}/examples/atf)
@@ -221,7 +209,10 @@ dnl -----------------------------------------------------------------------
 dnl Check for required tools.
 dnl -----------------------------------------------------------------------
 
-AC_PATH_PROG([MTN], [mtn])
+AC_PATH_PROG([GDB], [gdb])
+AC_PATH_PROG([KYUA], [kyua])
+AM_CONDITIONAL([HAVE_KYUA], [test -n "${KYUA}"])
+AC_PATH_PROG([GIT], [git])
 
 dnl -----------------------------------------------------------------------
 dnl Finally, generate output.
@@ -229,9 +220,9 @@ dnl -----------------------------------------------------------------------
 
 AC_OUTPUT([Makefile atf-c/defs.h])
 
-if test ${enable_shared} = yes; then
-    AC_MSG_WARN([Shared libraries with unstable ABIs/APIs have been enabled.])
-    AC_MSG_WARN([Please do not install them as part of a binary package.])
+if test ${enable_tools} = yes; then
+    AC_MSG_WARN([Building the deprecated ATF tools (atf-run and atf-report);])
+    AC_MSG_WARN([please migrate to Kyua as soon as feasible.])
 fi
 
 dnl vim: syntax=m4:expandtab:shiftwidth=4:softtabstop=4
index 10a44e64c2423ff638f2d5e4a686cd8ef678707b..858ff04715ed1fff7f014308b92ece822fb5a0d8 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
+dist_man_MANS += doc/atf-test-case.4 \
+                 doc/atf-test-program.1
+
+if ENABLE_TOOLS
+
 man_MANS += doc/atf.7
 CLEANFILES += doc/atf.7
 EXTRA_DIST += doc/atf.7.in
 
-dist_man_MANS += doc/atf-formats.5 \
-                 doc/atf-test-case.4 \
-                 doc/atf-test-program.1
+dist_man_MANS += doc/atf-formats.5
 
 doc/atf.7: $(srcdir)/doc/atf.7.in
        test -d doc || mkdir -p doc
-       sed -e 's,__DOCDIR__,$(docdir),g' \
-           -e 's,__TESTSDIR__,$(testsdir),g' \
+       sed -e 's#__DOCDIR__#$(docdir)#g' \
+           -e 's#__TESTSDIR__#$(testsdir)#g' \
            <$(srcdir)/doc/atf.7.in >doc/atf.7.tmp
        mv doc/atf.7.tmp doc/atf.7
 
+endif
+
 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8
index 1d5edd5b352856a517e4478891fe5c2c025fc33d..bb919f483a9cf6a819c7e912aa812c9589734857 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" Automated Testing Framework (atf)
 .\"
-.\" Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 7, 2010
+.Dd December 20, 2011
 .Dt ATF-FORMATS 5
 .Os
 .Sh NAME
@@ -149,7 +149,7 @@ An example:
 var1 = this is a variable value
 var2 = this is another one      # Optional comment at the end.
 .Ed
-.Ss Format: application/X-atf-tps, version: 2
+.Ss Format: application/X-atf-tps, version: 3
 The
 .Sq application/X-atf-tps
 format multiplexes the standard output, standard error and results output
@@ -165,14 +165,16 @@ DATA ::= INFO* TPS-COUNT TP-STANZA* INFO* EOF
 INFO ::= 'info' COLON STRING COMMA STRING NEWLINE
 TPS-COUNT ::= 'tps-count' COLON POSITIVE-NUMBER NEWLINE
 TP-STANZA ::= TP-START TC-STANZA* TC-END
-TP-START ::= 'tp-start' COLON STRING COMMA POSITIVE-NUMBER NEWLINE
-TP-END ::= 'tc-end' COLON STRING (COMMA STRING)?
+TP-START ::= 'tp-start' COLON TIMESTAMP COMMA STRING COMMA
+             POSITIVE-NUMBER NEWLINE
+TP-END ::= 'tc-end' COLON TIMESTAMP COMMA STRING (COMMA STRING)?
 TC-STANZA ::= TC-START (TC-SO | TC-SE)* TC-END
-TC-START ::= 'tc-start' COLON STRING NEWLINE
+TC-START ::= 'tc-start' COLON TIMESTAMP COMMA STRING NEWLINE
 TC-SO ::= 'tc-so' COLON STRING NEWLINE
 TC-SE ::= 'tc-se' COLON STRING NEWLINE
-TC-END ::= 'tc-end' COLON STRING COMMA TCR NEWLINE
+TC-END ::= 'tc-end' COLON TIMESTAMP COMMA STRING COMMA TCR NEWLINE
 TCR ::= 'passed' | ('failed' | 'skipped') COMMA STRING
+TIMESTAMP ::= [0-9]+.[0-9]+
 .Ed
 .Pp
 The meaning of the constructions above is:
@@ -212,18 +214,18 @@ associated with this result (if applicable).
 An example:
 .Bd -literal -offset indent
 tps-count: 2
-tp-start: calculator, 2
-tc-start: add
-tc-end: add, passed
-tc-start: subtract
+tp-start: calculator, 1324318951.838923, 2
+tc-start: add, 1324318951.839101
+tc-end: add, 1324318951.839500, passed
+tc-start: subtract, 1324318951.840001
 tc-so: 3-2 expected to return 1 but got 0
-tc-end: subtract, failed, Calculated an unexpected value
-tp-end: calculator
-tp-start: files, 1
-tc-start: copy
+tc-end: subtract, 1324318952.000123, failed, Calculated an unexpected value
+tp-end: calculator, 1324318952.002301
+tp-start: files, 1, 1324318952.502348
+tc-start: copy, 1324318952.508291
 tc-se: could not find the cp(1) utility
-tc-end: copy, skipped
-tp-end: files
+tc-end: copy, 1324318953.203145, skipped
+tp-end: files, 1324318953.203800
 .Ed
 .Sh SEE ALSO
 .Xr atf 7
index b7f8ae82abdbe8a2d7daab852ef14b52686cedd0..e1b2bf45ca7f027e782f58cf7d314619cd5a4ad3 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" Automated Testing Framework (atf)
 .\"
-.\" Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 31, 2010
+.Dd January 13, 2011
 .Dt ATF-TEST-CASE 4
 .Os
 .Sh NAME
@@ -61,7 +61,7 @@ failures.
 This body is only executed if the abstract conditions specified by the
 header are met.
 The
-.Em cleanup routine
+.Em cleanup
 routine is a piece of code always executed after the body, regardless of
 the exit status of the test case.
 It can be used to undo side-effects of the test case.
@@ -148,6 +148,9 @@ Test cases will log their results to an auxiliary file, which is then
 collected by the test program they are contained in.
 The developer need not care about this as long as he uses the correct
 APIs to implement the test cases.
+.Pp
+The standard input of the test cases is unconditionally connected to
+.Sq /dev/zero .
 .Ss Meta-data
 The following list describes all meta-data properties interpreted
 internally by ATF.
@@ -179,7 +182,7 @@ Required.
 The test case's identifier.
 Must be unique inside the test program and should be short but descriptive.
 .It require.arch
-Type textual.
+Type: textual.
 Optional.
 .Pp
 A whitespace separated list of architectures that the test case can be run
@@ -192,12 +195,32 @@ A whitespace separated list of configuration variables that must be defined
 to execute the test case.
 If any of the required variables is not defined, the test case is
 .Em skipped .
+.It require.files
+Type: textual.
+Optional.
+.Pp
+A whitespace separated list of files that must be present to execute the
+test case.
+The names of these files must be absolute paths.
+If any of the required files is not found, the test case is
+.Em skipped .
 .It require.machine
-Type textual.
+Type: textual.
 Optional.
 .Pp
 A whitespace separated list of machine types that the test case can be run
 under without causing errors due to a machine type mismatch.
+.It require.memory
+Type: integer.
+Optional.
+Specifies the minimum amount of physical memory needed by the test.
+The value can have a size suffix such as
+.Sq K ,
+.Sq M ,
+.Sq G
+or
+.Sq T
+to make the amount of bytes easier to type and read.
 .It require.progs
 Type: textual.
 Optional.
@@ -219,18 +242,23 @@ Can be one of
 .Sq root
 or
 .Sq unprivileged .
-If the requested privileges do not match the current user, the test case is
+.Pp
+If the test case is running as a regular user and this property is
+.Sq root ,
+the test case is
 .Em skipped .
 .Pp
-.Em NOTE :
-In the future, it is expected that the test case will attempt to gain the
-necessary privileges on its own before failing.
-At the very least, lowering the privileges from the super-user to an
-unprivileged user will be supported.
+If the test case is running as root and this property is
+.Sq unprivileged ,
+.Xr atf-run 1
+will automatically drop the privileges if the
+.Sq unprivileged-user
+configuration property is set; otherwise the test case is
+.Em skipped .
 .It timeout
 Type: integral.
 Optional; defaults to
-.Sq 30 .
+.Sq 300 .
 .Pp
 Specifies the maximum amount of time the test case can run.
 This is particularly useful because some tests can stall either because they
@@ -268,19 +296,24 @@ Undefined.
 .It Ev LC_TIME
 Undefined.
 .It Ev TZ
-Undefined.
+Hardcoded to
+.Sq UTC .
 .El
 .Ss Work directories
 The test program always creates a temporary directory
 and switches to it before running the test case's body.
 This way the test case is free to modify its current directory as it
-wishes, and the test program will be able to clean it up later on in a
+wishes, and the runtime engine will be able to clean it up later on in a
 safe way, removing any traces of its execution from the system.
+To do so, the runtime engine will perform a recursive removal of the work
+directory without crossing mount points; if a mount point is found, the
+file system will be unmounted (if possible).
 .Ss File creation mode mask (umask)
 Test cases are always executed with a file creation mode mask (umask) of
 .Sq 0022 .
 The test case's code is free to change this during execution.
 .Sh SEE ALSO
+.Xr atf-run 1 ,
 .Xr atf-test-program 1 ,
 .Xr atf-formats 5 ,
 .Xr atf 7
index fe6ab98984485dc73037b34c5ebb3ae418887481..49ee12ddff25d3c27bd19fa6d6c74403f5b2478e 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" Automated Testing Framework (atf)
 .\"
-.\" Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 18, 2010
+.Dd February 6, 2011
 .Dt ATF-TEST-PROGRAM 1
 .Os
 .Sh NAME
 .Sh DESCRIPTION
 Test programs written using the ATF libraries all share a common user
 interface, which is what this manual page describes.
+.Em NOTE: There is no binary known as
+.Nm ;
+.Em what is described in this manual page is the command-line interface
+.Em exposed by the atf-c, atf-c++ and atf-sh bindings .
 .Pp
 In the first synopsis form, the test program will execute the provided
 test case and print its results to the standard output, unless otherwise
index bf86b9a8557eb07652dc7ffe6121d90d4638e8bd..5fcca44df161578dfdf82607a47c74b9db386ebf 100644 (file)
@@ -1,7 +1,7 @@
 .\"
 .\" Automated Testing Framework (atf)
 .\"
-.\" Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
index c9bf4d1a36ee2fd6beb7942804d1a0b0f1d00710..480e5c740a2a62bf1bf70f9cc5f99ced0b119048 100644 (file)
-dnl
-dnl Automated Testing Framework (atf)
-dnl
-dnl Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+dnl Copyright 2010 Google Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
-dnl modification, are permitted provided that the following conditions
-dnl are met:
-dnl 1. Redistributions of source code must retain the above copyright
-dnl    notice, this list of conditions and the following disclaimer.
-dnl 2. Redistributions in binary form must reproduce the above copyright
-dnl    notice, this list of conditions and the following disclaimer in the
-dnl    documentation and/or other materials provided with the distribution.
-dnl
-dnl THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
-dnl CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-dnl INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-dnl IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
-dnl DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-dnl GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+dnl modification, are permitted provided that the following conditions are
+dnl met:
 dnl
+dnl * Redistributions of source code must retain the above copyright
+dnl   notice, this list of conditions and the following disclaimer.
+dnl * Redistributions in binary form must reproduce the above copyright
+dnl   notice, this list of conditions and the following disclaimer in the
+dnl   documentation and/or other materials provided with the distribution.
+dnl * Neither the name of Google Inc. nor the names of its contributors
+dnl   may be used to endorse or promote products derived from this software
+dnl   without specific prior written permission.
+dnl
+dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+dnl OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+dnl \file compiler-flags.m4
+dnl
+dnl Macros to check for the existence of compiler flags.  The macros in this
+dnl file support both C and C++.
+dnl
+dnl Be aware that, in order to detect a flag accurately, we may need to enable
+dnl strict warning checking in the compiler (i.e. enable -Werror).  Some
+dnl compilers, e.g. Clang, report unknown -W flags as warnings unless -Werror is
+dnl selected.  This fact would confuse the flag checks below because we would
+dnl conclude that a flag is valid while in reality it is not.  To resolve this,
+dnl the macros below will pass -Werror to the compiler along with any other flag
+dnl being checked.
 
-dnl -----------------------------------------------------------------------
-dnl Check for C/C++ compiler flags
-dnl -----------------------------------------------------------------------
 
+dnl Checks for a compiler flag and sets a result variable.
+dnl
+dnl This is an auxiliary macro for the implementation of _KYUA_FLAG.
 dnl
-dnl ATF_CC_FLAG(flag_name, accum_var)
-dnl
-dnl Checks whether the C compiler supports the flag 'flag_name' and, if
-dnl found, appends it to the variable 'accum_var'.
-dnl
-AC_DEFUN([ATF_CC_FLAG], [
-    AC_LANG_PUSH(C)
-    AC_MSG_CHECKING(whether ${CC} supports $1)
-    saved_cflags="${CFLAGS}"
-    valid_cflag=no
-    CFLAGS="${CFLAGS} $1"
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
-                   AC_MSG_RESULT(yes)
-                   valid_cflag=yes,
-                   AC_MSG_RESULT(no))
-    CFLAGS="${saved_cflags}"
-    AC_LANG_POP()
+dnl \param 1 The shell variable containing the compiler name.  Used for
+dnl     reporting purposes only.  C or CXX.
+dnl \param 2 The shell variable containing the flags for the compiler.
+dnl     CFLAGS or CXXFLAGS.
+dnl \param 3 The name of the compiler flag to check for.
+dnl \param 4 The shell variable to set with the result of the test.  Will
+dnl     be set to 'yes' if the flag is valid, 'no' otherwise.
+dnl \param 5 Additional, optional flags to pass to the C compiler while
+dnl     looking for the flag in $3.  We use this here to pass -Werror to the
+dnl     flag checks (unless we are checking for -Werror already).
+AC_DEFUN([_KYUA_FLAG_AUX], [
+    if test x"${$4-unset}" = xunset; then
+        AC_MSG_CHECKING(whether ${$1} supports $3)
+        saved_flags="${$2}"
+        $4=no
+        $2="${$2} $5 $3"
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
+                       AC_MSG_RESULT(yes)
+                       $4=yes,
+                       AC_MSG_RESULT(no))
+        $2="${saved_flags}"
+    fi
+])
 
-    if test ${valid_cflag} = yes; then
-        $2="${$2} $1"
+
+dnl Checks for a compiler flag and appends it to a result variable.
+dnl
+dnl \param 1 The shell variable containing the compiler name.  Used for
+dnl     reporting purposes only.  CC or CXX.
+dnl \param 2 The shell variable containing the flags for the compiler.
+dnl     CFLAGS or CXXFLAGS.
+dnl \param 3 The name of the compiler flag to check for.
+dnl \param 4 The shell variable to which to append $3 if the flag is valid.
+AC_DEFUN([_KYUA_FLAG], [
+    _KYUA_FLAG_AUX([$1], [$2], [-Werror], [kyua_$1_has_werror])
+    if test "$3" = "-Werror"; then
+        found=${kyua_$1_has_werror}
+    else
+        found=unset
+        if test ${kyua_$1_has_werror} = yes; then
+            _KYUA_FLAG_AUX([$1], [$2], [$3], [found], [-Werror])
+        else
+            _KYUA_FLAG_AUX([$1], [$2], [$3], [found], [])
+        fi
     fi
+    if test ${found} = yes; then
+        $4="${$4} $3"
+    fi
+])
+
+
+dnl Checks for a C compiler flag and appends it to a variable.
+dnl
+dnl \pre The current language is C.
+dnl
+dnl \param 1 The name of the compiler flag to check for.
+dnl \param 2 The shell variable to which to append $1 if the flag is valid.
+AC_DEFUN([KYUA_CC_FLAG], [
+    AC_LANG_ASSERT([C])
+    _KYUA_FLAG([CC], [CFLAGS], [$1], [$2])
+])
+
+
+dnl Checks for a C++ compiler flag and appends it to a variable.
+dnl
+dnl \pre The current language is C++.
+dnl
+dnl \param 1 The name of the compiler flag to check for.
+dnl \param 2 The shell variable to which to append $1 if the flag is valid.
+AC_DEFUN([KYUA_CXX_FLAG], [
+    AC_LANG_ASSERT([C++])
+    _KYUA_FLAG([CXX], [CXXFLAGS], [$1], [$2])
 ])
 
+
+dnl Checks for a set of C compiler flags and appends them to CFLAGS.
 dnl
-dnl ATF_CC_FLAGS(flag_names, accum_var)
-dnl Checks whether the C compiler supports the flags 'flag_names', one by
-dnl one, and appends the valid ones to 'accum_var'.
+dnl The checks are performed independently and only when all the checks are
+dnl done, the output variable is modified.
 dnl
-AC_DEFUN([ATF_CC_FLAGS], [
+dnl \param 1 Whitespace-separated list of C flags to check.
+AC_DEFUN([KYUA_CC_FLAGS], [
+    AC_LANG_PUSH([C])
     valid_cflags=
     for f in $1; do
-        ATF_CC_FLAG(${f}, valid_cflags)
+        KYUA_CC_FLAG(${f}, valid_cflags)
     done
     if test -n "${valid_cflags}"; then
-        $2="${$2} ${valid_cflags}"
+        CFLAGS="${CFLAGS} ${valid_cflags}"
     fi
+    AC_LANG_POP([C])
 ])
 
-dnl
-dnl ATF_CXX_FLAG(flag_name, accum_var)
-dnl
-dnl Checks whether the C++ compiler supports the flag 'flag_name' and, if
-dnl found, appends it to the variable 'accum_var'.
-dnl
-AC_DEFUN([ATF_CXX_FLAG], [
-    AC_LANG_PUSH(C++)
-    AC_MSG_CHECKING(whether ${CXX} supports $1)
-    saved_cxxflags="${CXXFLAGS}"
-    valid_cxxflag=no
-    CXXFLAGS="${CXXFLAGS} $1"
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
-                   AC_MSG_RESULT(yes)
-                   valid_cxxflag=yes,
-                   AC_MSG_RESULT(no))
-    CXXFLAGS="${saved_cxxflags}"
-    AC_LANG_POP()
-
-    if test ${valid_cxxflag} = yes; then
-        $2="${$2} $1"
-    fi
-])
 
+dnl Checks for a set of C++ compiler flags and appends them to CXXFLAGS.
+dnl
+dnl The checks are performed independently and only when all the checks are
+dnl done, the output variable is modified.
 dnl
-dnl ATF_CXX_FLAGS(flag_names, accum_var)
-dnl Checks whether the C++ compiler supports the flags 'flag_names', one by
-dnl one, and appends the valid ones to 'accum_var'.
+dnl \pre The current language is C++.
 dnl
-AC_DEFUN([ATF_CXX_FLAGS], [
+dnl \param 1 Whitespace-separated list of C flags to check.
+AC_DEFUN([KYUA_CXX_FLAGS], [
+    AC_LANG_PUSH([C++])
     valid_cxxflags=
     for f in $1; do
-        ATF_CXX_FLAG(${f}, valid_cxxflags)
+        KYUA_CXX_FLAG(${f}, valid_cxxflags)
     done
     if test -n "${valid_cxxflags}"; then
-        $2="${$2} ${valid_cxxflags}"
+        CXXFLAGS="${CXXFLAGS} ${valid_cxxflags}"
     fi
+    AC_LANG_POP([C++])
 ])
index be949c8dd779c7881b9e596e06f415a64acb9540..d2266b4d5bc0c256b8ef377d05a98a5e43dd8598 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
index d6fcd20e39109949096143a49ee531b991d602cb..9c9118bf1f86495fa4852f1b44f783aeb39f3f0f 100644 (file)
-dnl
-dnl Automated Testing Framework (atf)
-dnl
-dnl Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+dnl Copyright 2010 Google Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
-dnl modification, are permitted provided that the following conditions
-dnl are met:
-dnl 1. Redistributions of source code must retain the above copyright
-dnl    notice, this list of conditions and the following disclaimer.
-dnl 2. Redistributions in binary form must reproduce the above copyright
-dnl    notice, this list of conditions and the following disclaimer in the
-dnl    documentation and/or other materials provided with the distribution.
+dnl modification, are permitted provided that the following conditions are
+dnl met:
 dnl
-dnl THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
-dnl CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-dnl INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-dnl IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
-dnl DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-dnl GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+dnl * Redistributions of source code must retain the above copyright
+dnl   notice, this list of conditions and the following disclaimer.
+dnl * Redistributions in binary form must reproduce the above copyright
+dnl   notice, this list of conditions and the following disclaimer in the
+dnl   documentation and/or other materials provided with the distribution.
+dnl * Neither the name of Google Inc. nor the names of its contributors
+dnl   may be used to endorse or promote products derived from this software
+dnl   without specific prior written permission.
 dnl
+dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+dnl OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-dnl -----------------------------------------------------------------------
-dnl Set up the developer mode
-dnl -----------------------------------------------------------------------
-
+dnl \file developer-mode.m4
 dnl
-dnl ATF_DEVELOPER_MODE
+dnl "Developer mode" is a mode in which the build system reports any
+dnl build-time warnings as fatal errors.  This helps in minimizing the
+dnl amount of trivial coding problems introduced in the code.
+dnl Unfortunately, this is not bullet-proof due to the wide variety of
+dnl compilers available and their different warning diagnostics.
 dnl
-dnl Adds a --enable-developer flag to the configure script and, when given,
-dnl checks for and enables several flags useful during development.
+dnl When developer mode support is added to a package, the compilation will
+dnl gain a bunch of extra warning diagnostics.  These will NOT be enforced
+dnl unless developer mode is enabled.
 dnl
-AC_DEFUN([ATF_DEVELOPER_MODE], [
-    AC_ARG_ENABLE(developer,
-                  AS_HELP_STRING(--enable-developer,
-                                 [enable developer features]),,
-                  [case ${PACKAGE_VERSION} in
-                   0.*|*99*|*alpha*|*beta*)
-                       enable_developer=yes
-                       ;;
-                   *)
-                       enable_developer=no
-                       ;;
-                   esac])
+dnl Developer mode is enabled when the user requests it through the
+dnl configure command line, or when building from the repository.  The
+dnl latter is to minimize the risk of committing new code with warnings
+dnl into the tree.
 
-    if test ${enable_developer} = yes; then
-        try_werror=yes
 
-        try_c_cxx_flags="-g \
-                         -Wall \
-                         -Wcast-qual \
-                         -Wextra \
-                         -Wno-unused-parameter \
-                         -Wpointer-arith \
-                         -Wredundant-decls \
-                         -Wreturn-type \
-                         -Wshadow \
-                         -Wsign-compare \
-                         -Wswitch \
-                         -Wwrite-strings"
+dnl Adds "developer mode" support to the package.
+dnl
+dnl This macro performs the actual definition of the --enable-developer
+dnl flag and implements all of its logic.  See the file-level comment for
+dnl details as to what this implies.
+AC_DEFUN([KYUA_DEVELOPER_MODE], [
+    m4_foreach([language], [$1], [m4_set_add([languages], language)])
+
+    AC_ARG_ENABLE(
+        [developer],
+        AS_HELP_STRING([--enable-developer], [enable developer features]),,
+        [if test -d ${srcdir}/.git; then
+             AC_MSG_NOTICE([building from HEAD; developer mode autoenabled])
+             enable_developer=yes
+         else
+             enable_developer=no
+         fi])
 
-        try_c_flags="-Wmissing-prototypes \
-                     -Wno-traditional \
-                     -Wstrict-prototypes"
+    #
+    # The following warning flags should also be enabled but cannot be.
+    # Reasons given below.
+    #
+    # -Wold-style-cast: Raises errors when using TIOCGWINSZ, at least under
+    #                   Mac OS X.  This is due to the way _IOR is defined.
+    #
 
-        try_cxx_flags="-Wabi \
-                       -Wctor-dtor-privacy \
-                       -Wno-deprecated \
-                       -Wno-non-template-friend \
-                       -Wno-pmf-conversions \
-                       -Wnon-virtual-dtor \
-                       -Woverloaded-virtual \
-                       -Wreorder \
-                       -Wsign-promo \
-                       -Wsynth"
+    try_c_cxx_flags="-D_FORTIFY_SOURCE=2 \
+                     -Wall \
+                     -Wcast-qual \
+                     -Wextra \
+                     -Wpointer-arith \
+                     -Wredundant-decls \
+                     -Wreturn-type \
+                     -Wshadow \
+                     -Wsign-compare \
+                     -Wswitch \
+                     -Wwrite-strings"
 
-        #
-        # The following flags should also be enabled but cannot be.  Reasons
-        # given below.
-        #
-        # -Wold-style-cast: Raises errors when using TIOCGWINSZ, at least under
-        #                   Mac OS X.  This is due to the way _IOR is defined.
-        #
+    try_c_flags="-Wmissing-prototypes \
+                 -Wno-traditional \
+                 -Wstrict-prototypes"
+
+    try_cxx_flags="-Wabi \
+                   -Wctor-dtor-privacy \
+                   -Wno-deprecated \
+                   -Wno-non-template-friend \
+                   -Wno-pmf-conversions \
+                   -Wnon-virtual-dtor \
+                   -Woverloaded-virtual \
+                   -Wreorder \
+                   -Wsign-promo \
+                   -Wsynth"
+
+    if test ${enable_developer} = yes; then
+        try_werror=yes
+        try_c_cxx_flags="${try_c_cxx_flags} -g -Werror"
     else
         try_werror=no
-        try_c_cxx_flags="-DNDEBUG"
-        try_c_flags=
-        try_cxx_flags=
-    fi
-    try_c_cxx_flags="${try_c_cxx_flags} -D_FORTIFY_SOURCE=2"
-
-    # Try and set -Werror first so that tests for other flags are accurate.
-    # Otherwise, compilers such as clang will report the flags as a warning and
-    # we will conclude they are supported... but when they are combined with
-    # -Werror they cause build failures.
-    if test ${try_werror} = yes; then
-        ATF_CC_FLAGS(-Werror, CFLAGS)
-        ATF_CXX_FLAGS(-Werror, CXXFLAGS)
+        try_c_cxx_flags="${try_c_cxx_flags} -DNDEBUG"
     fi
 
-    ATF_CC_FLAGS(${try_c_cxx_flags} ${try_c_flags}, CFLAGS)
-    ATF_CXX_FLAGS(${try_c_cxx_flags} ${try_cxx_flags}, CXXFLAGS)
+    m4_set_contains([languages], [C],
+                    [KYUA_CC_FLAGS(${try_c_cxx_flags} ${try_c_flags})])
+    m4_set_contains([languages], [C++],
+                    [KYUA_CXX_FLAGS(${try_c_cxx_flags} ${try_cxx_flags})])
 ])
index cdcbc77d43d21d3615527c803393c137b09f9061..709c8493e6d49e39a8b0248a1062e5fea78c7659 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
@@ -30,9 +30,11 @@ dnl
 AC_DEFUN([ATF_MODULE_APPLICATION], [
     ATF_CHECK_STD_VSNPRINTF
 
-    AC_LANG_PUSH([C])
-    AC_MSG_CHECKING(whether getopt allows a + sign for POSIX behavior)
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdlib.h>
+    AC_CACHE_CHECK(
+      [whether getopt allows a + sign for POSIX behavior],
+      [kyua_cv_getopt_plus], [
+      AC_LANG_PUSH([C])
+      AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>], [
     int argc = 4;
@@ -64,25 +66,29 @@ AC_DEFUN([ATF_MODULE_APPLICATION], [
 
     return (seen_a && !seen_plus) ? EXIT_SUCCESS : EXIT_FAILURE;
 ])],
-    [getopt_allows_plus=yes
-     AC_DEFINE([HAVE_GNU_GETOPT], [1],
-               [Define to 1 if getopt allows a + sign for POSIX behavior])],
-    [getopt_allows_plus=no])
-    AC_MSG_RESULT(${getopt_allows_plus})
-    AC_LANG_POP([C])
+      [kyua_cv_getopt_plus=yes],
+      [kyua_cv_getopt_plus=no])
+      AC_LANG_POP([C])
+    ])
+    if test x"${kyua_cv_getopt_plus}" = xyes; then
+        AC_DEFINE([HAVE_GNU_GETOPT], [1],
+                  [Define to 1 if getopt allows a + sign for POSIX behavior])
+    fi
 
-    AC_LANG_PUSH([C])
-    AC_MSG_CHECKING(whether getopt has optreset)
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdlib.h>
+    AC_CACHE_CHECK(
+      [whether getopt has optreset],
+      [kyua_cv_getopt_optreset], [
+      AC_LANG_PUSH([C])
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdlib.h>
 #include <unistd.h>], [
     optreset = 1;
     return EXIT_SUCCESS;
 ])],
-    [getopt_has_optreset=yes],
-    [getopt_has_optreset=no])
-    if test x"${getopt_has_optreset}" = yes; then
+      [kyua_cv_getopt_optreset=yes],
+      [kyua_cv_getopt_optreset=no])
+      AC_LANG_POP([C])
+    ])
+    if test x"${kyua_cv_getopt_optreset}" = xyes; then
         AC_DEFINE([HAVE_OPTRESET], [1], [Define to 1 if getopt has optreset])
     fi
-    AC_MSG_RESULT(${getopt_has_optreset})
-    AC_LANG_POP([C])
 ])
index 6803cbcf0059cc15f5251e222e0e049bc33d35b3..eb08eb62c63b937a2ebdeacb54fe2f39f1cafa56 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2008 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
@@ -27,25 +27,86 @@ dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 dnl
 
-AC_DEFUN([ATF_MODULE_DEFS], [
+AC_DEFUN([ATF_ATTRIBUTE_FORMAT_PRINTF], [
+    AC_MSG_CHECKING(
+        [whether __attribute__((__format__(__printf__, a, b))) is supported])
+    AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([
+#include <stdarg.h>
+#include <stdio.h>
+
+static void test_printf(const char *, ...)
+    __attribute__((__format__(__printf__, 1, 2)));
+
+static void
+test_printf(const char *format, ...)
+{
+    va_list ap;
+
+    va_start(ap, format);
+    vprintf(format, ap);
+    va_end(ap);
+}], [
+    test_printf("foo %s", "bar");
+    return 0;
+])],
+        [AC_MSG_RESULT(yes)
+         value="__attribute__((__format__(__printf__, a, b)))"],
+        [AC_MSG_RESULT(no)
+         value=""]
+    )
+    AC_SUBST([ATTRIBUTE_FORMAT_PRINTF], [${value}])
+])
+
+AC_DEFUN([ATF_ATTRIBUTE_NORETURN], [
     dnl XXX This check is overly simple and should be fixed.  For example,
     dnl Sun's cc does support the noreturn attribute but CC (the C++
     dnl compiler) does not.  And in that case, CC just raises a warning
     dnl during compilation, not an error, which later breaks the
     dnl atf-c++/t_pkg_config:cxx_build check.
-    AC_MSG_CHECKING(whether __attribute__((noreturn)) is supported)
-    AC_RUN_IFELSE(
-        [AC_LANG_PROGRAM([], [
+    AC_CACHE_CHECK(
+        [whether __attribute__((__noreturn__)) is supported],
+        [kyua_cv_attribute_noreturn], [
+        AC_RUN_IFELSE(
+            [AC_LANG_PROGRAM([], [
 #if ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
     return 0;
 #else
     return 1;
 #endif
+])],
+        [kyua_cv_attribute_noreturn=yes],
+        [kyua_cv_attribute_noreturn=no])
+    ])
+    if test x"${kyua_cv_attribute_noreturn}" = xyes; then
+        value="__attribute__((__noreturn__))"
+    else
+        value=""
+    fi
+    AC_SUBST([ATTRIBUTE_NORETURN], [${value}])
+])
+
+AC_DEFUN([ATF_ATTRIBUTE_UNUSED], [
+    AC_MSG_CHECKING(whether __attribute__((__unused__)) is supported)
+    AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([
+static void
+function(int a __attribute__((__unused__)))
+{
+}], [
+    function(3);
+    return 0;
 ])],
         [AC_MSG_RESULT(yes)
-         value="__attribute__((noreturn))"],
+         value="__attribute__((__unused__))"],
         [AC_MSG_RESULT(no)
          value=""]
     )
-    AC_SUBST([ATTRIBUTE_NORETURN], [${value}])
+    AC_SUBST([ATTRIBUTE_UNUSED], [${value}])
+])
+
+AC_DEFUN([ATF_MODULE_DEFS], [
+    ATF_ATTRIBUTE_FORMAT_PRINTF
+    ATF_ATTRIBUTE_NORETURN
+    ATF_ATTRIBUTE_UNUSED
 ])
index cd7b4702c45f3916a59177fd9a624021d7616563..8080e1c33e2c9d91f007112110c0267d5eaa2b7c 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
index bb0442c6ad1ade7a35c9ac3f3ce3921f7a790fc4..7019a664a5874cf9378232fbbd8f784d81987369 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
@@ -50,17 +50,22 @@ AC_DEFUN([ATF_MODULE_FS], [
                   [Define to 1 if dirname takes a constant pointer]),
         AC_MSG_RESULT(no))
 
-    AC_MSG_CHECKING(whether getcwd(NULL, 0) works)
-    AC_RUN_IFELSE(
-        [AC_LANG_PROGRAM([#include <stdlib.h>
+    AC_CACHE_CHECK(
+        [whether getcwd(NULL, 0) works],
+        [kyua_cv_getcwd_works], [
+        AC_RUN_IFELSE(
+            [AC_LANG_PROGRAM([#include <stdlib.h>
 #include <unistd.h>], [
          char *cwd = getcwd(NULL, 0);
          return (cwd != NULL) ? EXIT_SUCCESS : EXIT_FAILURE;
          ])],
-        AC_MSG_RESULT(yes)
+         [kyua_cv_getcwd_works=yes],
+         [kyua_cv_getcwd_works=no])
+    ])
+    if test x"${kyua_cv_getcwd_works}" = xyes; then
         AC_DEFINE([HAVE_GETCWD_DYN], [1],
-                  [Define to 1 if getcwd(NULL, 0) works]),
-        AC_MSG_RESULT(no))
+                  [Define to 1 if getcwd(NULL, 0) works])
+    fi
 
     AC_CHECK_FUNCS([unmount])
 ])
index 369c921b731e66275088bb8a54c7314f1e7c5b2d..9d146c1c7f1b948ed6e27d6ea14c32c1402711e1 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Automated Testing Framework (atf)
 dnl
-dnl Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
+dnl Copyright (c) 2007 The NetBSD Foundation, Inc.
 dnl All rights reserved.
 dnl
 dnl Redistribution and use in source and binary forms, with or without
index 5f0049c0215efc600afffe25d37f5215d309ff19..6580eb6e1068df1ba5cd0128eeee40ef2bcd8ec8 100644 (file)
@@ -28,8 +28,10 @@ dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 dnl
 
 AC_DEFUN([ATF_MODULE_SIGNALS], [
-    AC_MSG_CHECKING(for the last valid signal)
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <err.h>
+    AC_CACHE_CHECK(
+        [for the last valid signal],
+        [kyua_cv_signal_lastno], [
+        AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <err.h>
 #include <errno.h>
 #include <signal.h>
 #include <stdio.h>
@@ -71,16 +73,14 @@ AC_DEFUN([ATF_MODULE_SIGNALS], [
 
     return EXIT_SUCCESS;
 ])],
-    [if test ! -f conftest.cnt; then
-         last_signo=15
-         AC_MSG_RESULT(failed; assuming ${last_signo})
-     else
-         last_signo=$(cat conftest.cnt)
-         rm -f conftest.cnt
-         AC_MSG_RESULT(${last_signo})
-     fi],
-    [last_signo=15
-     AC_MSG_RESULT(failed; assuming ${last_signo})])
-    AC_DEFINE_UNQUOTED([LAST_SIGNO], [${last_signo}],
+        [if test ! -f conftest.cnt; then
+             kyua_cv_signal_lastno=15
+         else
+             kyua_cv_signal_lastno=$(cat conftest.cnt)
+             rm -f conftest.cnt
+         fi],
+        [kyua_cv_signal_lastno=15])
+    ])
+    AC_DEFINE_UNQUOTED([LAST_SIGNO], [${kyua_cv_signal_lastno}],
                        [Define to the last valid signal number])
 ])
index 253d3e8ab55f7ac69ab030c5f2fb58576c595691..6a67a8ffbdb832f8e61130c73ca9fb38c3f4093b 100644 (file)
@@ -4,7 +4,6 @@ prop: test-suite = atf
 
 tp: config_test
 tp: expect_test
-tp: fork_test
 tp: meta_data_test
 tp: srcdir_test
 tp: result_test
diff --git a/unit/atf-src/test-programs/Kyuafile b/unit/atf-src/test-programs/Kyuafile
new file mode 100644 (file)
index 0000000..e525282
--- /dev/null
@@ -0,0 +1,9 @@
+syntax("kyuafile", 1)
+
+test_suite("atf")
+
+atf_test_program{name="config_test"}
+atf_test_program{name="expect_test"}
+atf_test_program{name="meta_data_test"}
+atf_test_program{name="srcdir_test"}
+atf_test_program{name="result_test"}
index 59bffa6dce1a3a5a89afeb4910bd11a3fd8fb251..9e8cdb5e21f38b70adcf23f178e6e25f3535b989 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,8 @@
 # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
-tests_test_programs_DATA = test-programs/Atffile
+tests_test_programs_DATA = test-programs/Atffile \
+                           test-programs/Kyuafile
 tests_test_programsdir = $(pkgtestsdir)/test-programs
 EXTRA_DIST += $(tests_test_programs_DATA)
 
@@ -37,7 +38,7 @@ test_programs_c_helpers_LDADD = libatf-c.la
 
 tests_test_programs_PROGRAMS += test-programs/cpp_helpers
 test_programs_cpp_helpers_SOURCES = test-programs/cpp_helpers.cpp
-test_programs_cpp_helpers_LDADD = libatf-c++.la
+test_programs_cpp_helpers_LDADD = $(ATF_CXX_LIBS)
 
 common_sh = $(srcdir)/test-programs/common.sh
 EXTRA_DIST += test-programs/common.sh
@@ -66,14 +67,6 @@ test-programs/expect_test: $(srcdir)/test-programs/expect_test.sh
        @src="$(srcdir)/test-programs/expect_test.sh $(common_sh)"; \
        dst="test-programs/expect_test"; $(BUILD_SH_TP)
 
-tests_test_programs_SCRIPTS += test-programs/fork_test
-CLEANFILES += test-programs/fork_test
-EXTRA_DIST += test-programs/fork_test.sh
-test-programs/fork_test: $(srcdir)/test-programs/fork_test.sh
-       test -d test-programs || mkdir -p test-programs
-       @src="$(srcdir)/test-programs/fork_test.sh $(common_sh)"; \
-       dst="test-programs/fork_test"; $(BUILD_SH_TP)
-
 tests_test_programs_SCRIPTS += test-programs/meta_data_test
 CLEANFILES += test-programs/meta_data_test
 EXTRA_DIST += test-programs/meta_data_test.sh
index b6fb91825440601d610e78e69fd5dc4140741ea9..ac9bcc33629e43b718fcf2a735ed9a45a335aac9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Automated Testing Framework (atf)
  *
- * Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -177,22 +177,6 @@ ATF_TC_CLEANUP(cleanup_sigterm, tc)
     safe_remove(atf_tc_get_config_var(tc, "tmpfile"));
 }
 
-ATF_TC_WITH_CLEANUP(cleanup_fork);
-ATF_TC_HEAD(cleanup_fork, tc)
-{
-    atf_tc_set_md_var(tc, "descr", "Helper test case for the t_cleanup test "
-                      "program");
-}
-ATF_TC_BODY(cleanup_fork, tc)
-{
-}
-ATF_TC_CLEANUP(cleanup_fork, tc)
-{
-    close(STDOUT_FILENO);
-    close(STDERR_FILENO);
-    close(3);
-}
-
 /* ---------------------------------------------------------------------
  * Helper tests for "t_config".
  * --------------------------------------------------------------------- */
@@ -385,45 +369,11 @@ ATF_TC_BODY(expect_timeout_but_pass, tc)
     atf_tc_expect_timeout("Will just exit");
 }
 
-/* ---------------------------------------------------------------------
- * Helper tests for "t_fork".
- * --------------------------------------------------------------------- */
-
-ATF_TC(fork_stop);
-ATF_TC_HEAD(fork_stop, tc)
-{
-    atf_tc_set_md_var(tc, "descr", "Helper test case for the t_fork test "
-                      "program");
-}
-ATF_TC_BODY(fork_stop, tc)
-{
-    FILE *f;
-    const char *dfstr, *pfstr;
-
-    dfstr = atf_tc_get_config_var(tc, "donefile");
-    pfstr = atf_tc_get_config_var(tc, "pidfile");
-
-    f = fopen(pfstr, "w");
-    if (f == NULL)
-        atf_tc_fail("Failed to create pidfile %s", pfstr);
-    fprintf(f, "%d", (int)getpid());
-    fclose(f);
-    printf("Wrote pid file\n");
-
-    printf("Waiting for done file\n");
-    while (access(dfstr, F_OK) != 0)
-        usleep(10000);
-    printf("Exiting\n");
-}
-
 /* ---------------------------------------------------------------------
  * Helper tests for "t_meta_data".
  * --------------------------------------------------------------------- */
 
-ATF_TC(metadata_no_descr);
-ATF_TC_HEAD(metadata_no_descr, tc)
-{
-}
+ATF_TC_WITHOUT_HEAD(metadata_no_descr);
 ATF_TC_BODY(metadata_no_descr, tc)
 {
 }
@@ -460,23 +410,20 @@ ATF_TC_BODY(srcdir_exists, tc)
  * Helper tests for "t_result".
  * --------------------------------------------------------------------- */
 
-ATF_TC(result_pass);
-ATF_TC_HEAD(result_pass, tc) { }
+ATF_TC_WITHOUT_HEAD(result_pass);
 ATF_TC_BODY(result_pass, tc)
 {
     printf("msg\n");
 }
 
-ATF_TC(result_fail);
-ATF_TC_HEAD(result_fail, tc) { }
+ATF_TC_WITHOUT_HEAD(result_fail);
 ATF_TC_BODY(result_fail, tc)
 {
     printf("msg\n");
     atf_tc_fail("Failure reason");
 }
 
-ATF_TC(result_skip);
-ATF_TC_HEAD(result_skip, tc) { }
+ATF_TC_WITHOUT_HEAD(result_skip);
 ATF_TC_BODY(result_skip, tc)
 {
     printf("msg\n");
@@ -517,7 +464,6 @@ ATF_TP_ADD_TCS(tp)
     ATF_TP_ADD_TC(tp, cleanup_skip);
     ATF_TP_ADD_TC(tp, cleanup_curdir);
     ATF_TP_ADD_TC(tp, cleanup_sigterm);
-    ATF_TP_ADD_TC(tp, cleanup_fork);
 
     /* Add helper tests for t_config. */
     ATF_TP_ADD_TC(tp, config_unset);
@@ -544,9 +490,6 @@ ATF_TP_ADD_TCS(tp)
     ATF_TP_ADD_TC(tp, expect_timeout_and_hang);
     ATF_TP_ADD_TC(tp, expect_timeout_but_pass);
 
-    /* Add helper tests for t_fork. */
-    ATF_TP_ADD_TC(tp, fork_stop);
-
     /* Add helper tests for t_meta_data. */
     ATF_TP_ADD_TC(tp, metadata_no_descr);
     ATF_TP_ADD_TC(tp, metadata_no_head);
index 5927c3948607c9353bfa615734376b97e0309ac5..a697bee2b6c1a3287397254d48dbabbf67b7b00d 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
index 075ed96064aaf84129a6d22939af683338e1b89d..d8a495e7c67e3419512fb6dd4851a8827a915c48 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Automated Testing Framework (atf)
 //
-// Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@ extern "C" {
 #include <fstream>
 #include <iostream>
 
-#include "atf-c++/macros.hpp"
+#include <atf-c++.hpp>
 
 #include "atf-c++/detail/fs.hpp"
 
@@ -224,27 +224,6 @@ ATF_TEST_CASE_BODY(expect_timeout_but_pass)
     expect_timeout("Will just exit");
 }
 
-// ------------------------------------------------------------------------
-// Helper tests for "t_fork".
-// ------------------------------------------------------------------------
-
-ATF_TEST_CASE(fork_stop);
-ATF_TEST_CASE_HEAD(fork_stop)
-{
-    set_md_var("descr", "Helper test case for the t_fork test program");
-}
-ATF_TEST_CASE_BODY(fork_stop)
-{
-    std::ofstream os(get_config_var("pidfile").c_str());
-    os << ::getpid() << "\n";
-    os.close();
-    std::cout << "Wrote pid file\n";
-    std::cout << "Waiting for done file\n";
-    while (::access(get_config_var("donefile").c_str(), F_OK) != 0)
-        ::usleep(10000);
-    std::cout << "Exiting\n";
-}
-
 // ------------------------------------------------------------------------
 // Helper tests for "t_meta_data".
 // ------------------------------------------------------------------------
@@ -363,9 +342,6 @@ ATF_INIT_TEST_CASES(tcs)
     ATF_ADD_TEST_CASE(tcs, expect_timeout_and_hang);
     ATF_ADD_TEST_CASE(tcs, expect_timeout_but_pass);
 
-    // Add helper tests for t_fork.
-    ATF_ADD_TEST_CASE(tcs, fork_stop);
-
     // Add helper tests for t_meta_data.
     ATF_ADD_TEST_CASE(tcs, metadata_no_descr);
     ATF_ADD_TEST_CASE(tcs, metadata_no_head);
index e7aa69f3934a4535cfa7fe0a2eb4f838ad1fe8dc..46293507db70acca31cd90caffbee5942b5a3ab7 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -37,10 +37,11 @@ check_result() {
 atf_test_case expect_pass
 expect_pass_body() {
     for h in $(get_helpers); do
-        atf_check -s eq:0 "${h}" -r result expect_pass_and_pass
+        atf_check -s eq:0 -e ignore "${h}" -r result expect_pass_and_pass
         check_result result "passed"
 
-        atf_check -s eq:1 "${h}" -r result expect_pass_but_fail_requirement
+        atf_check -s eq:1 -e ignore "${h}" -r result \
+            expect_pass_but_fail_requirement
         check_result result "failed: Some reason"
 
         # atf-sh does not support non-fatal failures yet; skip checks for
@@ -77,10 +78,11 @@ expect_fail_body() {
     # atf-sh does not support non-fatal failures yet; skip checks for
     # such conditions.
     for h in $(get_helpers sh_helpers); do
-        atf_check -s eq:0 "${h}" -r result expect_fail_and_fail_requirement
+        atf_check -s eq:0 -e ignore "${h}" -r result \
+            expect_fail_and_fail_requirement
         check_result result "expected_failure: Fail reason: The failure"
 
-        atf_check -s eq:1 "${h}" -r result expect_fail_but_pass
+        atf_check -s eq:1 -e ignore "${h}" -r result expect_fail_but_pass
         check_result result "failed: .*expecting a failure"
     done
 }
@@ -88,13 +90,13 @@ expect_fail_body() {
 atf_test_case expect_exit
 expect_exit_body() {
     for h in $(get_helpers); do
-        atf_check -s eq:0 "${h}" -r result expect_exit_any_and_exit
+        atf_check -s eq:0 -e ignore "${h}" -r result expect_exit_any_and_exit
         check_result result "expected_exit: Call will exit"
 
-        atf_check -s eq:123 "${h}" -r result expect_exit_code_and_exit
+        atf_check -s eq:123 -e ignore "${h}" -r result expect_exit_code_and_exit
         check_result result "expected_exit\(123\): Call will exit"
 
-        atf_check -s eq:1 "${h}" -r result expect_exit_but_pass
+        atf_check -s eq:1 -e ignore "${h}" -r result expect_exit_but_pass
         check_result result "failed: .*expected to exit"
     done
 }
@@ -102,13 +104,16 @@ expect_exit_body() {
 atf_test_case expect_signal
 expect_signal_body() {
     for h in $(get_helpers); do
-        atf_check -s signal:9 "${h}" -r result expect_signal_any_and_signal
+        atf_check -s signal:9 -e ignore "${h}" -r result \
+            expect_signal_any_and_signal
         check_result result "expected_signal: Call will signal"
 
-        atf_check -s signal:hup "${h}" -r result expect_signal_no_and_signal
+        atf_check -s signal:hup -e ignore "${h}" -r result \
+            expect_signal_no_and_signal
         check_result result "expected_signal\(1\): Call will signal"
 
-        atf_check -s eq:1 "${h}" -r result expect_signal_but_pass
+        atf_check -s eq:1 -e ignore "${h}" -r result \
+            expect_signal_but_pass
         check_result result "failed: .*termination signal"
     done
 }
@@ -116,13 +121,14 @@ expect_signal_body() {
 atf_test_case expect_death
 expect_death_body() {
     for h in $(get_helpers); do
-        atf_check -s eq:123 "${h}" -r result expect_death_and_exit
+        atf_check -s eq:123 -e ignore "${h}" -r result expect_death_and_exit
         check_result result "expected_death: Exit case"
 
-        atf_check -s signal:kill "${h}" -r result expect_death_and_signal
+        atf_check -s signal:kill -e ignore "${h}" -r result \
+            expect_death_and_signal
         check_result result "expected_death: Signal case"
 
-        atf_check -s eq:1 "${h}" -r result expect_death_but_pass
+        atf_check -s eq:1 -e ignore "${h}" -r result expect_death_but_pass
         check_result result "failed: .*terminate abruptly"
     done
 }
@@ -130,7 +136,7 @@ expect_death_body() {
 atf_test_case expect_timeout
 expect_timeout_body() {
     for h in $(get_helpers); do
-        atf_check -s eq:1 "${h}" -r result expect_timeout_but_pass
+        atf_check -s eq:1 -e ignore "${h}" -r result expect_timeout_but_pass
         check_result result "failed: Test case was expected to hang but it" \
             "continued execution"
     done
diff --git a/unit/atf-src/test-programs/fork_test.sh b/unit/atf-src/test-programs/fork_test.sh
deleted file mode 100644 (file)
index 6f66cf0..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# Automated Testing Framework (atf)
-#
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, 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:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. 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.
-#
-# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
-#
-
-# TODO: This test program is about checking the test case's "environment"
-# (not the variables).  Should be named something else than t_fork.
-
-atf_test_case stop
-stop_head()
-{
-    atf_set "descr" "Tests that sending a stop signal to a test case does" \
-                    "not report it as failed"
-}
-stop_body()
-{
-    for h in $(get_helpers); do
-        ${h} -s $(atf_get_srcdir) -v pidfile=$(pwd)/pid \
-             -v donefile=$(pwd)/done -r resfile fork_stop &
-        ppid=${!}
-        echo "Waiting for pid file for test program ${ppid}"
-        while test ! -f pid; do sleep 1; done
-        pid=$(cat pid)
-        echo "Test case's pid is ${pid}"
-        kill -STOP ${pid}
-        touch done
-        echo "Wrote done file"
-        kill -CONT ${pid}
-        wait ${ppid}
-        atf_check -s eq:0 -o ignore -e empty grep '^passed$' resfile
-        rm -f pid done
-    done
-}
-
-atf_init_test_cases()
-{
-    atf_add_test_case stop
-}
-
-# vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4
index 6f11fadd12b7e8bd8855a2584e3f0482d434e4d0..35b008647390df3b1a3a39c65fd75435c4f2f233 100644 (file)
@@ -35,8 +35,8 @@ no_descr_head()
 no_descr_body()
 {
     for h in $(get_helpers); do
-        atf_check -s eq:0 -o ignore -e empty ${h} -s $(atf_get_srcdir) -l
-        atf_check -s eq:0 -o match:passed -e empty ${h} -s $(atf_get_srcdir) \
+        atf_check -s eq:0 -o ignore -e ignore ${h} -s $(atf_get_srcdir) -l
+        atf_check -s eq:0 -o match:passed -e ignore ${h} -s $(atf_get_srcdir) \
             metadata_no_descr
     done
 }
@@ -49,8 +49,8 @@ no_head_head()
 no_head_body()
 {
     for h in $(get_helpers); do
-        atf_check -s eq:0 -o ignore -e empty ${h} -s $(atf_get_srcdir) -l
-        atf_check -s eq:0 -o match:passed -e empty ${h} -s $(atf_get_srcdir) \
+        atf_check -s eq:0 -o ignore -e ignore ${h} -s $(atf_get_srcdir) -l
+        atf_check -s eq:0 -o match:passed -e ignore ${h} -s $(atf_get_srcdir) \
             metadata_no_head
     done
 }
index ec866fe2587205a856f10769721b7569b2fe7ce0..b2b325c4daeef79d0197f3a5fde109ed367fa082 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
+atf_test_case atf_run_warnings
+atf_run_warnings_head()
+{
+    # The fact that this test case is in this test program is an abuse.
+    atf_set "descr" "Tests that the test case prints a warning because" \
+                    "it is not being run by atf-run"
+}
+atf_run_warnings_body()
+{
+    unset __RUNNING_INSIDE_ATF_RUN
+    srcdir="$(atf_get_srcdir)"
+    for h in $(get_helpers); do
+        atf_check -s eq:0 -o match:"passed" -e match:"WARNING.*atf-run" \
+            "${h}" -s "${srcdir}" result_pass
+    done
+}
+
 atf_test_case result_on_stdout
 result_on_stdout_head()
 {
@@ -38,11 +55,11 @@ result_on_stdout_body()
     srcdir="$(atf_get_srcdir)"
     for h in $(get_helpers); do
         atf_check -s eq:0 -o match:"passed" -o match:"msg" \
-            -e empty "${h}" -s "${srcdir}" result_pass
+            -e ignore "${h}" -s "${srcdir}" result_pass
         atf_check -s eq:1 -o match:"failed: Failure reason" -o match:"msg" \
-            -e empty "${h}" -s "${srcdir}" result_fail
+            -e ignore "${h}" -s "${srcdir}" result_fail
         atf_check -s eq:0 -o match:"skipped: Skipped reason" -o match:"msg" \
-            -e empty "${h}" -s "${srcdir}" result_skip
+            -e ignore "${h}" -s "${srcdir}" result_skip
     done
 }
 
@@ -56,15 +73,15 @@ result_to_file_body()
 {
     srcdir="$(atf_get_srcdir)"
     for h in $(get_helpers); do
-        atf_check -s eq:0 -o inline:"msg\n" -e empty "${h}" -s "${srcdir}" \
+        atf_check -s eq:0 -o inline:"msg\n" -e ignore "${h}" -s "${srcdir}" \
             -r resfile result_pass
         atf_check -o inline:"passed\n" cat resfile
 
-        atf_check -s eq:1 -o inline:"msg\n" -e empty "${h}" -s "${srcdir}" \
+        atf_check -s eq:1 -o inline:"msg\n" -e ignore "${h}" -s "${srcdir}" \
             -r resfile result_fail
         atf_check -o inline:"failed: Failure reason\n" cat resfile
 
-        atf_check -s eq:0 -o inline:"msg\n" -e empty "${h}" -s "${srcdir}" \
+        atf_check -s eq:0 -o inline:"msg\n" -e ignore "${h}" -s "${srcdir}" \
             -r resfile result_skip
         atf_check -o inline:"skipped: Skipped reason\n" cat resfile
     done
@@ -112,6 +129,7 @@ result_exception_body()
 
 atf_init_test_cases()
 {
+    atf_add_test_case atf_run_warnings
     atf_add_test_case result_on_stdout
     atf_add_test_case result_to_file
     atf_add_test_case result_to_file_fail
index 31f0d2f470c6db8d1ed5863df7e03bc468094ba4..eb55102dfeed73aeb7ba995f5f2ac5e303c1df92 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -111,23 +111,6 @@ cleanup_sigterm_cleanup()
     rm $(atf_config_get tmpfile)
 }
 
-atf_test_case cleanup_fork cleanup
-cleanup_fork_head()
-{
-    atf_set "descr" "Helper test case for the t_cleanup test program"
-}
-cleanup_fork_body()
-{
-    :
-}
-cleanup_fork_cleanup()
-{
-    exec 1>out
-    exec 2>err
-    exec 3>res
-    rm -f out err res
-}
-
 # -------------------------------------------------------------------------
 # Helper tests for "t_config".
 # -------------------------------------------------------------------------
@@ -174,24 +157,6 @@ config_multi_value_body()
     atf_check_equal "$(atf_config_get 'test')" "foo bar"
 }
 
-# -------------------------------------------------------------------------
-# Helper tests for "t_fork".
-# -------------------------------------------------------------------------
-
-atf_test_case fork_stop
-fork_stop_head()
-{
-    atf_set "descr" "Helper test case for the t_fork test program"
-}
-fork_stop_body()
-{
-    echo ${$} >$(atf_config_get pidfile)
-    echo "Wrote pid file"
-    echo "Waiting for done file"
-    while ! test -f $(atf_config_get donefile); do sleep 1; done
-    echo "Exiting"
-}
-
 # -------------------------------------------------------------------------
 # Helper tests for "t_expect".
 # -------------------------------------------------------------------------
@@ -387,7 +352,6 @@ atf_init_test_cases()
     atf_add_test_case cleanup_skip
     atf_add_test_case cleanup_curdir
     atf_add_test_case cleanup_sigterm
-    atf_add_test_case cleanup_fork
 
     # Add helper tests for t_config.
     atf_add_test_case config_unset
@@ -414,9 +378,6 @@ atf_init_test_cases()
     atf_add_test_case expect_timeout_and_hang
     atf_add_test_case expect_timeout_but_pass
 
-    # Add helper tests for t_fork.
-    atf_add_test_case fork_stop
-
     # Add helper tests for t_meta_data.
     atf_add_test_case metadata_no_descr
     atf_add_test_case metadata_no_head
index 6a6371cb552ac579fc1d21d5847c5ed6da10d2b9..11d6831f88686aa7ff479d8e3de1a05f1b1044b6 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automated Testing Framework (atf)
 #
-# Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2007 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -48,7 +48,7 @@ default_body()
         cp ${hp} tmp
         atf_check -s eq:0 -o ignore -e ignore -x \
                   "cd tmp && ./${h} srcdir_exists"
-        atf_check -s eq:1 -o empty -e empty "${hp}" -r res srcdir_exists
+        atf_check -s eq:1 -o empty -e ignore "${hp}" -r res srcdir_exists
         atf_check -s eq:0 -o ignore -e empty grep "Cannot find datafile" res
     done
 }
@@ -71,7 +71,7 @@ libtool_body()
         cp ${hp} tmp/.libs
         atf_check -s eq:0 -o ignore -e ignore -x \
                   "cd tmp && ./.libs/${h} srcdir_exists"
-        atf_check -s eq:1 -o empty -e empty "${hp}" -r res srcdir_exists
+        atf_check -s eq:1 -o empty -e ignore "${hp}" -r res srcdir_exists
         atf_check -s eq:0 -o ignore -e empty grep "Cannot find datafile" res
     done
 
@@ -81,7 +81,7 @@ libtool_body()
         cp ${hp} tmp/.libs/lt-${h}
         atf_check -s eq:0 -o ignore -e ignore -x \
                   "cd tmp && ./.libs/lt-${h} srcdir_exists"
-        atf_check -s eq:1 -o empty -e empty "${hp}" -r res srcdir_exists
+        atf_check -s eq:1 -o empty -e ignore "${hp}" -r res srcdir_exists
         atf_check -s eq:0 -o ignore -e empty grep "Cannot find datafile" res
     done
 }