From owner-svn-src-head@FreeBSD.ORG Fri Jan 10 23:41:02 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D267C25; Fri, 10 Jan 2014 23:41:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E22571B4E; Fri, 10 Jan 2014 23:41:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0ANf1hn048479; Fri, 10 Jan 2014 23:41:01 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0ANf1Bi048476; Fri, 10 Jan 2014 23:41:01 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201401102341.s0ANf1Bi048476@svn.freebsd.org> From: Julio Merino Date: Fri, 10 Jan 2014 23:41:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260526 - in head: contrib/atf/atf-c++/detail lib/atf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jan 2014 23:41:02 -0000 Author: jmmv Date: Fri Jan 10 23:41:01 2014 New Revision: 260526 URL: http://svnweb.freebsd.org/changeset/base/260526 Log: Fix path to the process_helpers for the libatf-c++ tests. Because we respect the FreeBSD src tree layout under /usr/tests, and because the layout of the tests in the atf distfile does not match the former, the tests for atf-c++ were not able to find the process_helper binary. Fix this by explicitly hardcoding the right path in the FreeBSD test suite. Obtained from: atf (git 1f0e878f7f127741a3762883ef24aef317e239d5) MFC after: 1 week Modified: head/contrib/atf/atf-c++/detail/test_helpers.cpp head/lib/atf/Makefile.inc Modified: head/contrib/atf/atf-c++/detail/test_helpers.cpp ============================================================================== --- head/contrib/atf/atf-c++/detail/test_helpers.cpp Fri Jan 10 23:38:33 2014 (r260525) +++ head/contrib/atf/atf-c++/detail/test_helpers.cpp Fri Jan 10 23:41:01 2014 (r260526) @@ -40,6 +40,18 @@ #include "process.hpp" #include "test_helpers.hpp" +// Path to the directory containing the libatf-c tests, used to locate the +// process_helpers program. If NULL (the default), the code will use a +// relative path. Otherwise, the provided path will be used; this is so +// that we can locate the helpers binary if the installation uses a +// different layout than the one we provide (as is the case in FreeBSD). +#if defined(ATF_C_TESTS_BASE) +static const char* atf_c_tests_base = ATF_C_TESTS_BASE; +#else +static const char* atf_c_tests_base = NULL; +#endif +#undef ATF_C_TESTS_BASE + void build_check_cxx_o_aux(const atf::fs::path& sfile, const char* failmsg, const bool expect_pass) @@ -80,12 +92,17 @@ header_check(const char *hdrname) atf::fs::path get_process_helpers_path(const atf::tests::tc& tc, bool is_detail) { - 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"; + const char* helper = "detail/process_helpers"; + if (atf_c_tests_base == NULL) { + if (is_detail) + return atf::fs::path(tc.get_config_var("srcdir")) / + ".." / ".." / "atf-c" / helper; + else + return atf::fs::path(tc.get_config_var("srcdir")) / + ".." / "atf-c" / helper; + } else { + return atf::fs::path(atf_c_tests_base) / helper; + } } void Modified: head/lib/atf/Makefile.inc ============================================================================== --- head/lib/atf/Makefile.inc Fri Jan 10 23:38:33 2014 (r260525) +++ head/lib/atf/Makefile.inc Fri Jan 10 23:41:01 2014 (r260526) @@ -38,6 +38,7 @@ CFLAGS+= -DATF_BUILD_CPPFLAGS='"${_CPPFL CFLAGS+= -DATF_BUILD_CXX='"${CXX}"' CFLAGS+= -DATF_BUILD_CXXFLAGS='"${_CXXFLAGS}"' CFLAGS+= -DATF_CONFDIR='"${CONFDIR}/atf"' +CFLAGS+= -DATF_C_TESTS_BASE='"${TESTSBASE}/lib/atf/libatf-c"' CFLAGS+= -DATF_INCLUDEDIR='"${INCLUDEDIR}"' CFLAGS+= -DATF_LIBDIR='"${LIBDIR}"' CFLAGS+= -DATF_LIBEXECDIR='"${LIBEXECDIR}"'