Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/atf/dist Merge atf-0.19.



details:   https://anonhg.NetBSD.org/src/rev/a9b910783be1
branches:  trunk
changeset: 793373:a9b910783be1
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Sat Feb 08 19:13:43 2014 +0000

description:
Merge atf-0.19.

diffstat:

 external/bsd/atf/dist/atf-c++/detail/expand.cpp        |    81 -
 external/bsd/atf/dist/atf-c++/detail/expand.hpp        |    82 -
 external/bsd/atf/dist/atf-c++/detail/expand_test.cpp   |   272 ---
 external/bsd/atf/dist/atf-c++/detail/parser.cpp        |   384 -----
 external/bsd/atf/dist/atf-c++/detail/parser.hpp        |   607 --------
 external/bsd/atf/dist/atf-c++/detail/parser_test.cpp   |  1043 --------------
 external/bsd/atf/dist/atf-c++/detail/ui.cpp            |   173 --
 external/bsd/atf/dist/atf-c++/detail/ui.hpp            |   105 -
 external/bsd/atf/dist/atf-c++/detail/ui_test.cpp       |   462 ------
 external/bsd/atf/dist/atf-c++/noncopyable.hpp          |    56 -
 external/bsd/atf/dist/atf-c++/pkg_config_test.sh       |     6 +-
 external/bsd/atf/dist/atf-c++/tests.cpp                |    19 +-
 external/bsd/atf/dist/atf-c++/tests.hpp                |     8 +-
 external/bsd/atf/dist/atf-c/atf-c-api.3                |    31 +-
 external/bsd/atf/dist/atf-c/detail/test_helpers.c      |    20 +-
 external/bsd/atf/dist/atf-c/macros_test.c              |    29 +-
 external/bsd/atf/dist/atf-c/pkg_config_test.sh         |     6 +-
 external/bsd/atf/dist/atf-config/Atffile               |     5 -
 external/bsd/atf/dist/atf-config/Kyuafile              |     5 -
 external/bsd/atf/dist/atf-config/atf-config.1          |   184 --
 external/bsd/atf/dist/atf-config/atf-config.cpp        |   145 --
 external/bsd/atf/dist/atf-config/integration_test.sh   |   180 --
 external/bsd/atf/dist/atf-report/Atffile               |     5 -
 external/bsd/atf/dist/atf-report/Kyuafile              |     6 -
 external/bsd/atf/dist/atf-report/atf-report.1          |   168 --
 external/bsd/atf/dist/atf-report/atf-report.cpp        |   713 ----------
 external/bsd/atf/dist/atf-report/fail_helper.cpp       |    45 -
 external/bsd/atf/dist/atf-report/integration_test.sh   |   448 ------
 external/bsd/atf/dist/atf-report/misc_helpers.cpp      |    68 -
 external/bsd/atf/dist/atf-report/pass_helper.cpp       |    44 -
 external/bsd/atf/dist/atf-report/reader.cpp            |   440 ------
 external/bsd/atf/dist/atf-report/reader.hpp            |    91 -
 external/bsd/atf/dist/atf-report/reader_test.cpp       |   989 -------------
 external/bsd/atf/dist/atf-report/tests-results.css     |   199 --
 external/bsd/atf/dist/atf-report/tests-results.dtd     |    61 -
 external/bsd/atf/dist/atf-report/tests-results.xsl     |   564 -------
 external/bsd/atf/dist/atf-run/Atffile                  |     5 -
 external/bsd/atf/dist/atf-run/Kyuafile                 |    13 -
 external/bsd/atf/dist/atf-run/atf-run.1                |   202 --
 external/bsd/atf/dist/atf-run/atf-run.cpp              |   563 -------
 external/bsd/atf/dist/atf-run/atffile.cpp              |   343 ----
 external/bsd/atf/dist/atf-run/atffile.hpp              |    95 -
 external/bsd/atf/dist/atf-run/atffile_test.cpp         |   636 --------
 external/bsd/atf/dist/atf-run/bad_metadata_helper.c    |    38 -
 external/bsd/atf/dist/atf-run/config.cpp               |   224 ---
 external/bsd/atf/dist/atf-run/config.hpp               |    61 -
 external/bsd/atf/dist/atf-run/config_test.cpp          |   391 -----
 external/bsd/atf/dist/atf-run/expect_helpers.c         |   193 --
 external/bsd/atf/dist/atf-run/fs.cpp                   |   265 ---
 external/bsd/atf/dist/atf-run/fs.hpp                   |    57 -
 external/bsd/atf/dist/atf-run/fs_test.cpp              |   260 ---
 external/bsd/atf/dist/atf-run/integration_test.sh      |  1134 ----------------
 external/bsd/atf/dist/atf-run/io.cpp                   |   361 -----
 external/bsd/atf/dist/atf-run/io.hpp                   |   426 ------
 external/bsd/atf/dist/atf-run/io_test.cpp              |   471 ------
 external/bsd/atf/dist/atf-run/misc_helpers.cpp         |   419 -----
 external/bsd/atf/dist/atf-run/pass_helper.cpp          |    44 -
 external/bsd/atf/dist/atf-run/requirements.cpp         |   319 ----
 external/bsd/atf/dist/atf-run/requirements.hpp         |    44 -
 external/bsd/atf/dist/atf-run/requirements_test.cpp    |   398 -----
 external/bsd/atf/dist/atf-run/sample/atf-run.hooks     |    23 -
 external/bsd/atf/dist/atf-run/sample/common.conf       |    11 -
 external/bsd/atf/dist/atf-run/several_tcs_helper.c     |    67 -
 external/bsd/atf/dist/atf-run/share/atf-run.hooks      |    94 -
 external/bsd/atf/dist/atf-run/signals.cpp              |   147 --
 external/bsd/atf/dist/atf-run/signals.hpp              |    92 -
 external/bsd/atf/dist/atf-run/signals_test.cpp         |   277 ---
 external/bsd/atf/dist/atf-run/test-program.cpp         |   790 -----------
 external/bsd/atf/dist/atf-run/test-program.hpp         |   150 --
 external/bsd/atf/dist/atf-run/test_program_test.cpp    |  1020 --------------
 external/bsd/atf/dist/atf-run/timer.cpp                |   215 ---
 external/bsd/atf/dist/atf-run/timer.hpp                |    81 -
 external/bsd/atf/dist/atf-run/user.cpp                 |    89 -
 external/bsd/atf/dist/atf-run/user.hpp                 |    52 -
 external/bsd/atf/dist/atf-run/user_test.cpp            |   148 --
 external/bsd/atf/dist/atf-run/zero_tcs_helper.c        |    36 -
 external/bsd/atf/dist/atf-sh/atf-check.cpp             |     5 +-
 external/bsd/atf/dist/atf-version/atf-version.1        |    56 -
 external/bsd/atf/dist/atf-version/atf-version.cpp      |    92 -
 external/bsd/atf/dist/atf-version/generate-revision.sh |   142 --
 external/bsd/atf/dist/doc/atf-formats.5                |   231 ---
 external/bsd/atf/dist/doc/atf-test-case.4              |     5 +-
 external/bsd/atf/dist/doc/atf.7.in                     |   192 --
 external/bsd/atf/dist/tools/atf-config.1               |   184 ++
 external/bsd/atf/dist/tools/atf-config.cpp             |   140 +
 external/bsd/atf/dist/tools/atf-report.1               |   168 ++
 external/bsd/atf/dist/tools/atf-report.cpp             |   710 ++++++++++
 external/bsd/atf/dist/tools/atf-run.1                  |   202 ++
 external/bsd/atf/dist/tools/atf-run.cpp                |   567 ++++++++
 external/bsd/atf/dist/tools/atf-version.1              |    56 +
 external/bsd/atf/dist/tools/atf-version.cpp            |    91 +
 91 files changed, 2191 insertions(+), 18648 deletions(-)

diffs (truncated from 21416 to 300 lines):

diff -r a11c4bceff60 -r a9b910783be1 external/bsd/atf/dist/atf-c++/detail/expand.cpp
--- a/external/bsd/atf/dist/atf-c++/detail/expand.cpp   Sat Feb 08 19:11:29 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-//
-// 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.
-//
-
-#include <stdexcept>
-
-#include "expand.hpp"
-#include "text.hpp"
-
-namespace impl = atf::expand;
-#define IMPL_NAME "atf::expand"
-
-// ------------------------------------------------------------------------
-// Auxiliary functions.
-// ------------------------------------------------------------------------
-
-namespace {
-
-std::string
-glob_to_regex(const std::string& glob)
-{
-    std::string regex;
-    regex.reserve(glob.length() * 2);
-
-    regex += '^';
-    for (std::string::const_iterator iter = glob.begin(); iter != glob.end();
-         iter++) {
-        switch (*iter) {
-        case '*': regex += ".*"; break;
-        case '?': regex += "."; break;
-        default: regex += *iter;
-        }
-    }
-    regex += '$';
-
-    return regex;
-}
-
-} // anonymous namespace
-
-// ------------------------------------------------------------------------
-// Free functions.
-// ------------------------------------------------------------------------
-
-bool
-impl::is_glob(const std::string& glob)
-{
-    // NOTE: Keep this in sync with glob_to_regex!
-    return glob.find_first_of("*?") != std::string::npos;
-}
-
-bool
-impl::matches_glob(const std::string& glob, const std::string& candidate)
-{
-    return atf::text::match(candidate, glob_to_regex(glob));
-}
diff -r a11c4bceff60 -r a9b910783be1 external/bsd/atf/dist/atf-c++/detail/expand.hpp
--- a/external/bsd/atf/dist/atf-c++/detail/expand.hpp   Sat Feb 08 19:11:29 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-//
-// 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_EXPAND_HPP_)
-#define _ATF_CXX_EXPAND_HPP_
-
-#include <string>
-#include <vector>
-
-namespace atf {
-namespace expand {
-
-// ------------------------------------------------------------------------
-// Free functions.
-// ------------------------------------------------------------------------
-
-//!
-//! \brief Checks if the given string is a glob pattern.
-//!
-//! Returns true if the given string is a glob pattern; i.e. if it contains
-//! any character that will be expanded by expand_glob.
-//!
-bool is_glob(const std::string&);
-
-//!
-//! \brief Checks if a given string matches a glob pattern.
-//!
-//! Given a glob pattern and a string, checks whether the former matches
-//! the latter.  Returns a boolean indicating this condition.
-//!
-bool matches_glob(const std::string&, const std::string&);
-
-//!
-//! \brief Expands a glob pattern among multiple candidates.
-//!
-//! Given a glob pattern and a set of candidate strings, checks which of
-//! those strings match the glob pattern and returns them.
-//!
-template< class T >
-std::vector< std::string > expand_glob(const std::string& glob,
-                                       const T& candidates)
-{
-    std::vector< std::string > exps;
-
-    for (typename T::const_iterator iter = candidates.begin();
-         iter != candidates.end(); iter++)
-        if (matches_glob(glob, *iter))
-            exps.push_back(*iter);
-
-    return exps;
-}
-
-} // namespace expand
-} // namespace atf
-
-#endif // !defined(_ATF_CXX_EXPAND_HPP_)
diff -r a11c4bceff60 -r a9b910783be1 external/bsd/atf/dist/atf-c++/detail/expand_test.cpp
--- a/external/bsd/atf/dist/atf-c++/detail/expand_test.cpp      Sat Feb 08 19:11:29 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +0,0 @@
-//
-// 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.
-//
-
-#include <cstring>
-
-#include "../macros.hpp"
-
-#include "expand.hpp"
-
-// XXX Many of the tests here are duplicated in atf-c/t_expand.  Should
-// find a way to easily share them, or maybe remove the ones here.
-
-// ------------------------------------------------------------------------
-// Test cases for the free functions.
-// ------------------------------------------------------------------------
-
-ATF_TEST_CASE(is_glob);
-ATF_TEST_CASE_HEAD(is_glob)
-{
-    set_md_var("descr", "Tests the is_glob function.");
-}
-ATF_TEST_CASE_BODY(is_glob)
-{
-    using atf::expand::is_glob;
-
-    ATF_REQUIRE(!is_glob(""));
-    ATF_REQUIRE(!is_glob("a"));
-    ATF_REQUIRE(!is_glob("foo"));
-
-    ATF_REQUIRE( is_glob("*"));
-    ATF_REQUIRE( is_glob("a*"));
-    ATF_REQUIRE( is_glob("*a"));
-    ATF_REQUIRE( is_glob("a*b"));
-
-    ATF_REQUIRE( is_glob("?"));
-    ATF_REQUIRE( is_glob("a?"));
-    ATF_REQUIRE( is_glob("?a"));
-    ATF_REQUIRE( is_glob("a?b"));
-}
-
-ATF_TEST_CASE(matches_glob_plain);
-ATF_TEST_CASE_HEAD(matches_glob_plain)
-{
-    set_md_var("descr", "Tests the matches_glob function by using plain "
-               "text strings as patterns only.");
-}
-ATF_TEST_CASE_BODY(matches_glob_plain)
-{
-    using atf::expand::matches_glob;
-
-    ATF_REQUIRE( matches_glob("", ""));
-    ATF_REQUIRE(!matches_glob("a", ""));
-    ATF_REQUIRE(!matches_glob("", "a"));
-
-    ATF_REQUIRE( matches_glob("ab", "ab"));
-    ATF_REQUIRE(!matches_glob("abc", "ab"));
-    ATF_REQUIRE(!matches_glob("ab", "abc"));
-}
-
-ATF_TEST_CASE(matches_glob_star);
-ATF_TEST_CASE_HEAD(matches_glob_star)
-{
-    set_md_var("descr", "Tests the matches_glob function by using the '*' "
-               "meta-character as part of the pattern.");
-}
-ATF_TEST_CASE_BODY(matches_glob_star)
-{
-    using atf::expand::matches_glob;
-
-    ATF_REQUIRE( matches_glob("*", ""));
-    ATF_REQUIRE( matches_glob("*", "a"));
-    ATF_REQUIRE( matches_glob("*", "ab"));
-
-    ATF_REQUIRE(!matches_glob("a*", ""));
-    ATF_REQUIRE( matches_glob("a*", "a"));
-    ATF_REQUIRE( matches_glob("a*", "aa"));
-    ATF_REQUIRE( matches_glob("a*", "ab"));
-    ATF_REQUIRE( matches_glob("a*", "abc"));
-    ATF_REQUIRE(!matches_glob("a*", "ba"));
-
-    ATF_REQUIRE( matches_glob("*a", "a"));
-    ATF_REQUIRE( matches_glob("*a", "ba"));
-    ATF_REQUIRE(!matches_glob("*a", "bc"));
-    ATF_REQUIRE(!matches_glob("*a", "bac"));
-
-    ATF_REQUIRE( matches_glob("*ab", "ab"));
-    ATF_REQUIRE( matches_glob("*ab", "aab"));
-    ATF_REQUIRE( matches_glob("*ab", "aaab"));
-    ATF_REQUIRE( matches_glob("*ab", "bab"));
-    ATF_REQUIRE(!matches_glob("*ab", "bcb"));
-    ATF_REQUIRE(!matches_glob("*ab", "bacb"));
-
-    ATF_REQUIRE( matches_glob("a*b", "ab"));
-    ATF_REQUIRE( matches_glob("a*b", "acb"));
-    ATF_REQUIRE( matches_glob("a*b", "acdeb"));
-    ATF_REQUIRE(!matches_glob("a*b", "acdebz"));
-    ATF_REQUIRE(!matches_glob("a*b", "zacdeb"));
-}
-



Home | Main Index | Thread Index | Old Index