svn commit: r251108 - in head/contrib/atf/atf-c++: . detail
Garrett Cooper
yaneurabeya at gmail.com
Wed May 29 19:51:43 UTC 2013
Thanks for this! Please don't commit the change I attached earlier to share/atf/Makefile though--it makes an integration test pass but it causes runtime to go to a crawl when running atf-run; that's why my demo at BSDCan didn't work ;(..
Sent from my iPhone
On May 29, 2013, at 12:41 PM, Marcel Moolenaar <marcel at FreeBSD.org> wrote:
> Author: marcel
> Date: Wed May 29 19:41:36 2013
> New Revision: 251108
> URL: http://svnweb.freebsd.org/changeset/base/251108
>
> Log:
> Modify atf::fs::path::get_process_helpers_path API to properly
> handle pathing with detail/ tests. Based on patch pushed upstream to
> ATF project.
>
> Obtained from: Garrett Cooper <yaneurabeya at gmail.com>
>
> Modified:
> head/contrib/atf/atf-c++/check_test.cpp
> head/contrib/atf/atf-c++/detail/process_test.cpp
> head/contrib/atf/atf-c++/detail/test_helpers.cpp
> head/contrib/atf/atf-c++/detail/test_helpers.hpp
>
> Modified: head/contrib/atf/atf-c++/check_test.cpp
> ==============================================================================
> --- head/contrib/atf/atf-c++/check_test.cpp Wed May 29 19:16:59 2013 (r251107)
> +++ head/contrib/atf/atf-c++/check_test.cpp Wed May 29 19:41:36 2013 (r251108)
> @@ -61,7 +61,7 @@ std::auto_ptr< atf::check::check_result
> do_exec(const atf::tests::tc* tc, const char* helper_name)
> {
> std::vector< std::string > argv;
> - argv.push_back(get_process_helpers_path(*tc).str());
> + argv.push_back(get_process_helpers_path(*tc, false).str());
> argv.push_back(helper_name);
> std::cout << "Executing " << argv[0] << " " << argv[1] << "\n";
>
> @@ -74,7 +74,7 @@ std::auto_ptr< atf::check::check_result
> do_exec(const atf::tests::tc* tc, const char* helper_name, const char *carg2)
> {
> std::vector< std::string > argv;
> - argv.push_back(get_process_helpers_path(*tc).str());
> + argv.push_back(get_process_helpers_path(*tc, false).str());
> argv.push_back(helper_name);
> argv.push_back(carg2);
> std::cout << "Executing " << argv[0] << " " << argv[1] << " "
>
> Modified: head/contrib/atf/atf-c++/detail/process_test.cpp
> ==============================================================================
> --- head/contrib/atf/atf-c++/detail/process_test.cpp Wed May 29 19:16:59 2013 (r251107)
> +++ head/contrib/atf/atf-c++/detail/process_test.cpp Wed May 29 19:41:36 2013 (r251108)
> @@ -64,10 +64,10 @@ exec_process_helpers(const atf::tests::t
> using atf::process::exec;
>
> std::vector< std::string > argv;
> - argv.push_back(get_process_helpers_path(tc).leaf_name());
> + argv.push_back(get_process_helpers_path(tc, true).leaf_name());
> argv.push_back(helper_name);
>
> - return exec(get_process_helpers_path(tc),
> + return exec(get_process_helpers_path(tc, true),
> atf::process::argv_array(argv),
> atf::process::stream_inherit(),
> atf::process::stream_inherit());
>
> Modified: head/contrib/atf/atf-c++/detail/test_helpers.cpp
> ==============================================================================
> --- head/contrib/atf/atf-c++/detail/test_helpers.cpp Wed May 29 19:16:59 2013 (r251107)
> +++ head/contrib/atf/atf-c++/detail/test_helpers.cpp Wed May 29 19:41:36 2013 (r251108)
> @@ -82,10 +82,14 @@ header_check(const char *hdrname)
> }
>
> atf::fs::path
> -get_process_helpers_path(const atf::tests::tc& tc)
> +get_process_helpers_path(const atf::tests::tc& tc, bool is_detail)
> {
> - return atf::fs::path(tc.get_config_var("srcdir")) /
> - ".." / "atf-c" / "detail" / "process_helpers";
> + if (is_detail)
> + return atf::fs::path(tc.get_config_var("srcdir")) /
> + ".." / ".." / "atf-c" / "detail" / "process_helpers";
> + else
> + return atf::fs::path(tc.get_config_var("srcdir")) /
> + ".." / "atf-c" / "detail" / "process_helpers";
> }
>
> bool
>
> Modified: head/contrib/atf/atf-c++/detail/test_helpers.hpp
> ==============================================================================
> --- head/contrib/atf/atf-c++/detail/test_helpers.hpp Wed May 29 19:16:59 2013 (r251107)
> +++ head/contrib/atf/atf-c++/detail/test_helpers.hpp Wed May 29 19:41:36 2013 (r251108)
> @@ -86,7 +86,7 @@ class tc;
>
> 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&);
> +atf::fs::path get_process_helpers_path(const atf::tests::tc&, bool);
> bool grep_file(const char*, const char*);
> bool grep_string(const std::string&, const char*);
>
> _______________________________________________
> svn-src-head at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe at freebsd.org"
More information about the svn-src-all
mailing list