Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2013 12:51:35 -0700
From:      Garrett Cooper <yaneurabeya@gmail.com>
To:        Marcel Moolenaar <marcel@FreeBSD.org>
Cc:        "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>
Subject:   Re: svn commit: r251108 - in head/contrib/atf/atf-c++: . detail
Message-ID:  <27261F76-9F6D-4A1A-AB35-50E2F8DC9311@gmail.com>
In-Reply-To: <201305291941.r4TJfaWN022025@svn.freebsd.org>
References:  <201305291941.r4TJfaWN022025@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 w=
ork ;(..

Sent from my iPhone

On May 29, 2013, at 12:41 PM, Marcel Moolenaar <marcel@FreeBSD.org> wrote:

> Author: marcel
> Date: Wed May 29 19:41:36 2013
> New Revision: 251108
> URL: http://svnweb.freebsd.org/changeset/base/251108
>=20
> 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.
>=20
>  Obtained from:    Garrett Cooper <yaneurabeya@gmail.com>
>=20
> 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
>=20
> Modified: head/contrib/atf/atf-c++/check_test.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> --- 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=20
> 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";
>=20
> @@ -74,7 +74,7 @@ std::auto_ptr< atf::check::check_result=20
> do_exec(const atf::tests::tc* tc, const char* helper_name, const char *car=
g2)
> {
>     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] << " "
>=20
> Modified: head/contrib/atf/atf-c++/detail/process_test.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> --- head/contrib/atf/atf-c++/detail/process_test.cpp    Wed May 29 19:16:5=
9 2013    (r251107)
> +++ head/contrib/atf/atf-c++/detail/process_test.cpp    Wed May 29 19:41:3=
6 2013    (r251108)
> @@ -64,10 +64,10 @@ exec_process_helpers(const atf::tests::t
>     using atf::process::exec;
>=20
>     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);
>=20
> -    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());
>=20
> Modified: head/contrib/atf/atf-c++/detail/test_helpers.cpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> --- head/contrib/atf/atf-c++/detail/test_helpers.cpp    Wed May 29 19:16:5=
9 2013    (r251107)
> +++ head/contrib/atf/atf-c++/detail/test_helpers.cpp    Wed May 29 19:41:3=
6 2013    (r251108)
> @@ -82,10 +82,14 @@ header_check(const char *hdrname)
> }
>=20
> 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";
> }
>=20
> bool
>=20
> Modified: head/contrib/atf/atf-c++/detail/test_helpers.hpp
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> --- head/contrib/atf/atf-c++/detail/test_helpers.hpp    Wed May 29 19:16:5=
9 2013    (r251107)
> +++ head/contrib/atf/atf-c++/detail/test_helpers.hpp    Wed May 29 19:41:3=
6 2013    (r251108)
> @@ -86,7 +86,7 @@ class tc;
>=20
> void header_check(const char*);
> void build_check_cxx_o(const atf::tests::tc&, const char*, const char*, bo=
ol);
> -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*);
>=20
> _______________________________________________
> svn-src-head@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?27261F76-9F6D-4A1A-AB35-50E2F8DC9311>