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")); 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_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(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(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_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")); 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")); }