Lines Matching +full:stdout +full:- +full:path

42 #include <atf-c++.hpp>
46 #include "utils/fs/path.hpp"
61 typedef void (*exec_function)(const fs::path&, const process::args_vector&);
64 /// Calculates the path to the test helpers binary.
69 /// \return The path to the helpers binary.
70 static fs::path
73 return fs::path(tc->get_config_var("srcdir")) / "helpers"; in get_helpers()
82 /// Path to the binary to exec.
83 const fs::path& _program;
92 /// \param program Path to the binary to exec.
94 child_exec(const exec_function do_exec, const fs::path& program, in child_exec()
166 fs::path("stdout"), fs::path("stderr")); in check_exec_no_args()
167 const process::status status = child->wait(); in check_exec_no_args()
182 args.push_back("print-args"); in check_exec_some_args()
188 fs::path("stdout"), fs::path("stderr")); in check_exec_some_args()
189 const process::status status = child->wait(); in check_exec_some_args()
192 ATF_REQUIRE(atf::utils::grep_file("argv\\[1\\] = print-args", "stdout")); in check_exec_some_args()
193 ATF_REQUIRE(atf::utils::grep_file("argv\\[2\\] = foo", "stdout")); in check_exec_some_args()
194 ATF_REQUIRE(atf::utils::grep_file("argv\\[3\\] = bar", "stdout")); in check_exec_some_args()
218 child_exec(process::exec, fs::path("non-existent"), in ATF_TEST_CASE_BODY()
220 fs::path("stdout"), fs::path("stderr")); in ATF_TEST_CASE_BODY()
221 const process::status status = child->wait(); in ATF_TEST_CASE_BODY()
224 ATF_REQUIRE(atf::utils::grep_file("Failed to execute non-existent", in ATF_TEST_CASE_BODY()
247 process::system_error, "Failed to execute missing-program", in ATF_TEST_CASE_BODY()
248 process::exec_unsafe(fs::path("missing-program"), in ATF_TEST_CASE_BODY()
257 ATF_REQUIRE(::pipe(first_fds) != -1); in ATF_TEST_CASE_BODY()
258 ATF_REQUIRE(::pipe(second_fds) != -1); in ATF_TEST_CASE_BODY()
261 ATF_REQUIRE(pid != -1); in ATF_TEST_CASE_BODY()
265 if (pid2 == -1) { in ATF_TEST_CASE_BODY()
297 ATF_REQUIRE(::wait(&status) != -1); in ATF_TEST_CASE_BODY()
307 ATF_REQUIRE(pid != -1); in ATF_TEST_CASE_BODY()
318 ATF_REQUIRE(::wait(&status) != -1); in ATF_TEST_CASE_BODY()
328 ATF_REQUIRE(pid != -1); in ATF_TEST_CASE_BODY()
335 ATF_REQUIRE(::wait(&status) != -1); in ATF_TEST_CASE_BODY()
345 ATF_REQUIRE(pid != -1); in ATF_TEST_CASE_BODY()
353 ATF_REQUIRE(::wait(&status) != -1); in ATF_TEST_CASE_BODY()
366 ATF_REQUIRE(pid != -1); in ATF_TEST_CASE_BODY()
374 ATF_REQUIRE(::wait(&status) != -1); in ATF_TEST_CASE_BODY()
386 const pid_t pid = child->pid(); in ATF_TEST_CASE_BODY()