/freebsd/lib/atf/libatf-c/ |
H A D | Makefile | 31 LIB= atf-c 35 ATF= ${SRCTOP}/contrib/atf 37 .PATH: ${ATF}/atf-c 38 .PATH: ${ATF}/atf-c/detail 70 INCSDIR= ${INCLUDEDIR}/atf-c 72 INCS+= atf-c.h 75 MAN= atf-c.3 76 MLINKS+= atf-c.3 ATF_CHECK.3 \ 77 atf-c.3 ATF_CHECK_MSG.3 \ 78 atf-c.3 ATF_CHECK_EQ.3 \ [all …]
|
/freebsd/contrib/atf/atf-c++/ |
H A D | macros_test.cpp | 105 bool condition = atf::text::to_bool(get_config_var("condition")); in ATF_TEST_CASE_BODY() 119 long v1 = atf::text::to_type< long >(get_config_var("v1")); in ATF_TEST_CASE_BODY() 120 long v2 = atf::text::to_type< long >(get_config_var("v2")); in ATF_TEST_CASE_BODY() 293 ATF_REQUIRE(atf::utils::grep_file("^passed", "result")); in ATF_TEST_CASE_BODY() 294 ATF_REQUIRE(atf::fs::exists(atf::fs::path("before"))); in ATF_TEST_CASE_BODY() 295 ATF_REQUIRE(!atf::fs::exists(atf::fs::path("after"))); in ATF_TEST_CASE_BODY() 307 ATF_REQUIRE(atf::utils::grep_file("^failed: Failed on purpose", "result")); in ATF_TEST_CASE_BODY() 308 ATF_REQUIRE(atf::fs::exists(atf::fs::path("before"))); in ATF_TEST_CASE_BODY() 309 ATF_REQUIRE(!atf::fs::exists(atf::fs::path("after"))); in ATF_TEST_CASE_BODY() 321 ATF_REQUIRE(atf::utils::grep_file("^skipped: Skipped on purpose", in ATF_TEST_CASE_BODY() [all …]
|
H A D | utils_test.cpp | 70 atf::utils::create_file("file.txt", ""); in ATF_TEST_CASE_BODY() 71 atf::utils::redirect(STDOUT_FILENO, "captured.txt"); in ATF_TEST_CASE_BODY() 72 atf::utils::cat_file("file.txt", "PREFIX"); in ATF_TEST_CASE_BODY() 82 atf::utils::create_file("file.txt", "This is a single line\n"); in ATF_TEST_CASE_BODY() 83 atf::utils::redirect(STDOUT_FILENO, "captured.txt"); in ATF_TEST_CASE_BODY() 84 atf::utils::cat_file("file.txt", "PREFIX"); in ATF_TEST_CASE_BODY() 94 atf::utils::create_file("file.txt", "First\nSecond line\nAnd third\n"); in ATF_TEST_CASE_BODY() 95 atf::utils::redirect(STDOUT_FILENO, "captured.txt"); in ATF_TEST_CASE_BODY() 96 atf::utils::cat_file("file.txt", ">"); in ATF_TEST_CASE_BODY() 107 atf::utils::create_file("file.txt", "Foo\n bar baz"); in ATF_TEST_CASE_BODY() [all …]
|
H A D | check_test.cpp | 55 std::auto_ptr< atf::check::check_result > 56 do_exec(const atf::tests::tc* tc, const char* helper_name) in do_exec() 63 atf::process::argv_array argva(argv); in do_exec() 64 return atf::check::exec(argva); in do_exec() 68 std::auto_ptr< atf::check::check_result > 69 do_exec(const atf::tests::tc* tc, const char* helper_name, const char *carg2) in do_exec() 78 atf::process::argv_array argva(argv); in do_exec() 79 return atf::check::exec(argva); in do_exec() 97 ATF_REQUIRE(atf::check::build_c_o("test.c", "test.o", in ATF_TEST_CASE_BODY() 98 atf::process::argv_array())); in ATF_TEST_CASE_BODY() [all …]
|
H A D | macros.hpp | 41 class atfu_tc_ ## name : public atf::tests::tc { \ 47 atfu_tc_ ## name::atfu_tc_ ## name(void) : atf::tests::tc(#name, false) {} \ 52 class atfu_tc_ ## name : public atf::tests::tc { \ 59 atfu_tc_ ## name::atfu_tc_ ## name(void) : atf::tests::tc(#name, false) {} \ 64 class atfu_tc_ ## name : public atf::tests::tc { \ 72 atfu_tc_ ## name::atfu_tc_ ## name(void) : atf::tests::tc(#name, true) {} \ 92 #define ATF_FAIL(reason) atf::tests::tc::fail(reason) 94 #define ATF_SKIP(reason) atf::tests::tc::skip(reason) 96 #define ATF_PASS() atf::tests::tc::pass() 104 atf::tests::tc::fail(atfu_ss.str()); \ [all …]
|
H A D | build_test.cpp | 70 atf::env::set(var, val); in verbose_set_env() 75 equal_argvs(const atf::process::argv_array& aa, const char* const* array) in equal_argvs() 79 atf::process::argv_array::size_type i = 0; in equal_argvs() 95 check_equal_argvs(const atf::process::argv_array& aa, const char* const* array) in check_equal_argvs() 119 ATF_REQUIRE(equal_argvs(atf::process::argv_array(argv), array)); in ATF_TEST_CASE_BODY() 126 ATF_REQUIRE(!equal_argvs(atf::process::argv_array(argv), array)); in ATF_TEST_CASE_BODY() 133 ATF_REQUIRE(!equal_argvs(atf::process::argv_array(argv), array)); in ATF_TEST_CASE_BODY() 140 ATF_REQUIRE(equal_argvs(atf::process::argv_array(argv), array)); in ATF_TEST_CASE_BODY() 163 atf::process::argv_array argv = in ATF_TEST_CASE_BODY() 164 atf::build::c_o(test->sfile, test->ofile, in ATF_TEST_CASE_BODY() [all …]
|
H A D | build.cpp | 37 namespace impl = atf::build; 45 atf::process::argv_array 54 return atf::process::argv_array(aux); in cargv_to_argv() 58 atf::process::argv_array 62 atf::process::argv_array argv((const char* const*)l); in cargv_to_argv_and_free() 75 atf::process::argv_array 77 const atf::process::argv_array& optargs) in c_o() 89 atf::process::argv_array 91 const atf::process::argv_array& optargs) in cpp() 103 atf::process::argv_array [all …]
|
H A D | utils.cpp | 36 atf::utils::cat_file(const std::string& path, const std::string& prefix) in cat_file() 42 atf::utils::copy_file(const std::string& source, const std::string& destination) in copy_file() 48 atf::utils::compare_file(const std::string& path, const std::string& contents) in compare_file() 54 atf::utils::create_file(const std::string& path, const std::string& contents) in create_file() 60 atf::utils::file_exists(const std::string& path) in file_exists() 66 atf::utils::fork(void) in fork() 74 atf::utils::reset_resultsfile(void) in reset_resultsfile() 81 atf::utils::grep_file(const std::string& regex, const std::string& path) in grep_file() 87 atf::utils::grep_string(const std::string& regex, const std::string& str) in grep_string() 93 atf::utils::redirect(const int fd, const std::string& path) in redirect() [all …]
|
/freebsd/libexec/atf/atf-sh/ |
H A D | Makefile | 30 ATF= ${SRCTOP}/contrib/atf 31 .PATH: ${ATF}/atf-sh 34 PROG_CXX= atf-sh 35 SRCS= atf-sh.cpp 36 MAN= atf-sh.1 atf-sh.3 38 MLINKS+= atf-sh.3 atf-sh-api.3 41 atf-sh.3 atf_add_test_case.3 \ 42 atf-sh.3 atf_check.3 \ 43 atf-sh.3 atf_check_equal.3 \ 44 atf-sh.3 atf_config_get.3 \ [all …]
|
/freebsd/contrib/kyua/cli/ |
H A D | cmd_about_test.cpp | 62 atf::utils::create_file("fake-docs/AUTHORS", in ATF_TEST_CASE_BODY() 67 atf::utils::create_file("fake-docs/CONTRIBUTORS", in ATF_TEST_CASE_BODY() 72 atf::utils::create_file("fake-docs/LICENSE", "Content of LICENSE\n"); in ATF_TEST_CASE_BODY() 79 ATF_REQUIRE(atf::utils::grep_string(PACKAGE_NAME, ui.out_log()[0])); in ATF_TEST_CASE_BODY() 80 ATF_REQUIRE(atf::utils::grep_string(PACKAGE_VERSION, ui.out_log()[0])); in ATF_TEST_CASE_BODY() 82 ATF_REQUIRE(!atf::utils::grep_collection("Content of AUTHORS", in ATF_TEST_CASE_BODY() 84 ATF_REQUIRE(atf::utils::grep_collection("\\* First author", ui.out_log())); in ATF_TEST_CASE_BODY() 85 ATF_REQUIRE(!atf::utils::grep_collection("garbage", ui.out_log())); in ATF_TEST_CASE_BODY() 86 ATF_REQUIRE(atf::utils::grep_collection("\\* Second author", ui.out_log())); in ATF_TEST_CASE_BODY() 88 ATF_REQUIRE(!atf::utils::grep_collection("Content of CONTRIBUTORS", in ATF_TEST_CASE_BODY() [all …]
|
H A D | main_test.cpp | 215 ATF_REQUIRE(atf::utils::grep_collection("Usage error: No command provided", in ATF_TEST_CASE_BODY() 217 ATF_REQUIRE(atf::utils::grep_collection("Type.*progname help", in ATF_TEST_CASE_BODY() 234 ATF_REQUIRE(atf::utils::grep_collection("Usage error: Unknown command.*foo", in ATF_TEST_CASE_BODY() 236 ATF_REQUIRE(atf::utils::grep_collection("Type.*progname help", in ATF_TEST_CASE_BODY() 295 ATF_REQUIRE(!atf::utils::grep_file("Mock debug message", "test.log")); in ATF_TEST_CASE_BODY() 296 ATF_REQUIRE(atf::utils::grep_file("Mock error message", "test.log")); in ATF_TEST_CASE_BODY() 297 ATF_REQUIRE(atf::utils::grep_file("Mock info message", "test.log")); in ATF_TEST_CASE_BODY() 298 ATF_REQUIRE(atf::utils::grep_file("Mock warning message", "test.log")); in ATF_TEST_CASE_BODY() 319 ATF_REQUIRE(atf::utils::grep_file("Mock debug message", "test.log")); in ATF_TEST_CASE_BODY() 320 ATF_REQUIRE(atf::utils::grep_file("Mock error message", "test.log")); in ATF_TEST_CASE_BODY() [all …]
|
/freebsd/contrib/atf/atf-c++/detail/ |
H A D | env_test.cpp | 41 ATF_REQUIRE(atf::env::has("PATH")); in ATF_TEST_CASE_BODY() 42 ATF_REQUIRE(!atf::env::get("PATH").empty()); in ATF_TEST_CASE_BODY() 44 ATF_REQUIRE(!atf::env::has("_UNDEFINED_VARIABLE_")); in ATF_TEST_CASE_BODY() 54 ATF_REQUIRE(atf::env::has("PATH")); in ATF_TEST_CASE_BODY() 55 ATF_REQUIRE(atf::env::get("PATH", "default value") != "default value"); in ATF_TEST_CASE_BODY() 57 ATF_REQUIRE_EQ(atf::env::get("_UNDEFINED_VARIABLE_", "foo bar"), "foo bar"); in ATF_TEST_CASE_BODY() 67 ATF_REQUIRE(atf::env::has("PATH")); in ATF_TEST_CASE_BODY() 68 const std::string& oldval = atf::env::get("PATH"); in ATF_TEST_CASE_BODY() 69 atf::env::set("PATH", "foo-bar"); in ATF_TEST_CASE_BODY() 70 ATF_REQUIRE(atf::env::get("PATH") != oldval); in ATF_TEST_CASE_BODY() [all …]
|
H A D | test_helpers.hpp | 48 const std::string cxx = atf::env::get("ATF_BUILD_CXX", ATF_BUILD_CXX); \ 61 const std::string cxx = atf::env::get("ATF_BUILD_CXX", ATF_BUILD_CXX); \ 70 namespace atf { namespace 78 bool build_check_cxx_o_srcdir(const atf::tests::tc&, const char*); 79 atf::fs::path get_process_helpers_path(const atf::tests::tc&, bool); 82 const atf::tests::vars_map& m_config; 84 run_h_tc_data(const atf::tests::vars_map& config) : in run_h_tc_data() 102 run_h_tc(atf::tests::vars_map config = atf::tests::vars_map()) in run_h_tc() 105 atf::process::child c = atf::process::fork( in run_h_tc() 107 atf::process::stream_redirect_path(atf::fs::path("stdout")), in run_h_tc() [all …]
|
H A D | test_helpers.cpp | 56 optargs.push_back("-I" + atf::env::get("ATF_INCLUDEDIR", ATF_INCLUDEDIR)); in build_check_cxx_o() 60 return atf::check::build_cxx_o(sfile, "test.o", in build_check_cxx_o() 61 atf::process::argv_array(optargs)); in build_check_cxx_o() 65 build_check_cxx_o_srcdir(const atf::tests::tc& tc, const char* sfile) in build_check_cxx_o_srcdir() 67 const atf::fs::path sfilepath = in build_check_cxx_o_srcdir() 68 atf::fs::path(tc.get_config_var("srcdir")) / sfile; in build_check_cxx_o_srcdir() 86 atf::fs::path 87 get_process_helpers_path(const atf::tests::tc& tc, bool is_detail) in get_process_helpers_path() 92 return atf::fs::path(tc.get_config_var("srcdir")) / in get_process_helpers_path() 95 return atf::fs::path(tc.get_config_var("srcdir")) / in get_process_helpers_path() [all …]
|
H A D | fs_test.cpp | 73 using atf::fs::path; in ATF_TEST_CASE_BODY() 98 using atf::fs::path; in ATF_TEST_CASE_BODY() 115 using atf::fs::path; in ATF_TEST_CASE_BODY() 132 using atf::fs::path; in ATF_TEST_CASE_BODY() 148 using atf::fs::path; in ATF_TEST_CASE_BODY() 164 using atf::fs::path; in ATF_TEST_CASE_BODY() 181 using atf::fs::path; in ATF_TEST_CASE_BODY() 199 using atf::fs::path; in ATF_TEST_CASE_BODY() 215 using atf::fs::file_info; in ATF_TEST_CASE_BODY() 216 using atf::fs::path; in ATF_TEST_CASE_BODY() [all …]
|
H A D | process_test.cpp | 58 atf::process::status 59 exec_process_helpers(const atf::tests::tc& tc, const char* helper_name) in exec_process_helpers() 61 using atf::process::exec; in exec_process_helpers() 68 atf::process::argv_array(argv), in exec_process_helpers() 69 atf::process::stream_inherit(), in exec_process_helpers() 70 atf::process::stream_inherit()); in exec_process_helpers() 87 atf::process::argv_array argv(carray); in ATF_TEST_CASE_BODY() 94 atf::process::argv_array argv(carray); in ATF_TEST_CASE_BODY() 102 atf::process::argv_array argv(carray); in ATF_TEST_CASE_BODY() 121 atf::process::argv_array argv(col); in ATF_TEST_CASE_BODY() [all …]
|
/freebsd/contrib/atf/atf-sh/ |
H A D | atf-check.cpp | 111 std::auto_ptr< atf::fs::path > m_path; 119 const atf::fs::path file = atf::fs::path( in temp_file() 120 atf::env::get("TMPDIR", "/tmp")) / pattern; in temp_file() 122 atf::auto_array< char > buf(new char[file.str().length() + 1]); in temp_file() 127 throw atf::system_error("atf_check::temp_file::temp_file(" + in temp_file() 131 m_path.reset(new atf::fs::path(buf.get())); in temp_file() 139 } catch (const atf::system_error&) { in ~temp_file() 144 const atf::fs::path& 154 throw atf::system_error("atf_check", "write(2) failed", errno); in write() 201 const int value = atf::text::to_type< int >(str); in parse_exit_code() [all …]
|
H A D | atf-sh.cpp | 50 const atf::fs::path filepath(filename); in fix_plain_name() 61 const std::string libexecdir = atf::env::get( in construct_script() 63 const std::string pkgdatadir = atf::env::get( in construct_script() 65 const std::string shell = atf::env::get("ATF_SHELL", ATF_SHELL); in construct_script() 108 class atf_sh : public atf::application::app { 111 atf::fs::path m_shell; 128 m_shell(atf::fs::path(atf::env::get("ATF_SHELL", ATF_SHELL))) in atf_sh() 136 using atf::application::option; in specific_options() 139 INV(m_shell == atf::fs::path(atf::env::get("ATF_SHELL", ATF_SHELL))); in specific_options() 151 m_shell = atf::fs::path(arg); in process_option() [all …]
|
/freebsd/contrib/kyua/engine/ |
H A D | kyuafile_test.cpp | 70 atf::utils::create_file("config", "syntax(2)\n"); in ATF_TEST_CASE_BODY() 87 atf::utils::create_file( in ATF_TEST_CASE_BODY() 98 atf::utils::create_file( in ATF_TEST_CASE_BODY() 105 atf::utils::create_file( in ATF_TEST_CASE_BODY() 110 atf::utils::create_file("1st", ""); in ATF_TEST_CASE_BODY() 111 atf::utils::create_file("2nd", ""); in ATF_TEST_CASE_BODY() 112 atf::utils::create_file("3rd", ""); in ATF_TEST_CASE_BODY() 113 atf::utils::create_file("4th", ""); in ATF_TEST_CASE_BODY() 114 atf::utils::create_file("dir/1st", ""); in ATF_TEST_CASE_BODY() 115 atf::utils::create_file("dir/subdir/5th", ""); in ATF_TEST_CASE_BODY() [all …]
|
/freebsd/lib/atf/ |
H A D | common.mk | 12 atf-version: atf-version-real 13 @cmp -s atf-version atf-version-real \ 14 || cp atf-version-real atf-version 15 atf-version-real: .PHONY 17 | cut -d '"' -f 2 >atf-version-real 18 CLEANFILES+= atf-version atf-version-real
|
/freebsd/contrib/atf/ |
H A D | README.md | 21 * [atf 0.20](../../releases/tag/atf-0.20), released on February 7th, 2014. 28 * Fedora 20 and above: install the `atf` package with `yum install atf`. 30 * FreeBSD 10.0 and above: install the `atf` package with `pkg install atf`. 32 * NetBSD with pkgsrc: install the `pkgsrc/devel/atf` package. 34 * OpenBSD: install the `devel/atf` package with `pkg_add atf`. 42 [atf-discuss mailing list](https://groups.google.com/forum/#!forum/atf-discuss) 43 for any support inquiries related to `atf-c`, `atf-c++` or `atf-sh`.
|
H A D | NEWS | 18 * Added the atf_check_not_equal function to atf-sh to check for 27 * Restored the atf(7) manual page to serve as a reference to all the other 30 * Added the -s flag to atf-sh to support specifying the shell interpreter 39 relevant manual pages. This information was lost with the atf-config(1) 46 * Renamed the atf-{c,c++,sh}-api(3) manual pages to atf-{c,c++,sh}(3) for 53 * Issue #7: Stopped catching unhandled exceptions in atf-c++ tests. This 58 * Issue #8: Fixed atf-c/macros_test:use test failures spotted by the clang 61 * Issue #12: Improved documentation of atf-sh(3) and atf-check(1) by better 64 * Issue #14: Stopped setting 'set -e' in atf-sh. This setting was 76 * Issue #19: Removed stale references to atf-config and atf-run. [all …]
|
/freebsd/contrib/kyua/utils/ |
H A D | stacktrace_test.cpp | 99 atf::utils::copy_file(_binary.str(), _copy_name.str()); in operator ()() 158 generate_core(const atf::tests::tc* test_case, const char* base_name) in generate_core() 191 generate_core(const atf::tests::tc* test_case, const char* base_name, in generate_core() 221 atf::utils::create_file(script, "#! /bin/sh\n\n" + contents); in create_script() 289 atf::utils::create_file("custom-name", ""); in ATF_TEST_CASE_BODY() 381 ATF_REQUIRE(!atf::utils::grep_file("#0", exit_handle.stdout_file().str())); in ATF_TEST_CASE_BODY() 382 ATF_REQUIRE( atf::utils::grep_file("#0", exit_handle.stderr_file().str())); in ATF_TEST_CASE_BODY() 383 ATF_REQUIRE(!atf::utils::grep_file("#1", exit_handle.stdout_file().str())); in ATF_TEST_CASE_BODY() 384 ATF_REQUIRE( atf::utils::grep_file("#1", exit_handle.stderr_file().str())); in ATF_TEST_CASE_BODY() 408 ATF_REQUIRE(atf::utils::grep_file("exited with signal [0-9]* and dumped", in ATF_TEST_CASE_BODY() [all …]
|
/freebsd/lib/atf/libatf-c++/ |
H A D | Makefile | 31 LIB_CXX= atf-c++ 40 ATF= ${SRCTOP}/contrib/atf 42 .PATH: ${ATF}/atf-c++ 43 .PATH: ${ATF}/atf-c++/detail 70 INCSDIR= ${INCLUDEDIR}/atf-c++ 72 INCS+= atf-c++.hpp 75 MAN= atf-c++.3 76 MLINKS+= atf-c++.3 atf-c-api++.3 # Backwards compatibility.
|
/freebsd/contrib/kyua/utils/config/ |
H A D | parser_test.cpp | 87 atf::utils::create_file( in ATF_TEST_CASE_BODY() 102 atf::utils::create_file( in ATF_TEST_CASE_BODY() 116 atf::utils::create_file( in ATF_TEST_CASE_BODY() 138 atf::utils::create_file( in ATF_TEST_CASE_BODY() 155 atf::utils::create_file( in ATF_TEST_CASE_BODY() 164 atf::utils::create_file( in ATF_TEST_CASE_BODY() 180 atf::utils::create_file("output.lua", "syntax(56)\n"); in ATF_TEST_CASE_BODY() 192 atf::utils::create_file("output.lua", "syntax('config', 1)\n"); in ATF_TEST_CASE_BODY() 195 atf::utils::create_file("output.lua", "syntax('foo', 1)\n"); in ATF_TEST_CASE_BODY() 199 atf::utils::create_file("output.lua", "syntax('config', 2)\n"); in ATF_TEST_CASE_BODY() [all …]
|