2013-07-16 19:58:43 +00:00
|
|
|
// -*- Mode: C++ -*-
|
|
|
|
//
|
2019-01-07 13:54:47 +00:00
|
|
|
// Copyright (C) 2013-2019 Red Hat, Inc.
|
2013-04-09 02:25:40 +00:00
|
|
|
//
|
|
|
|
// This file is part of the GNU Application Binary Interface Generic
|
|
|
|
// Analysis and Instrumentation Library (libabigail). This library is
|
|
|
|
// free software; you can redistribute it and/or modify it under the
|
2013-07-16 19:58:43 +00:00
|
|
|
// terms of the GNU Lesser General Public License as published by the
|
|
|
|
// Free Software Foundation; either version 3, or (at your option) any
|
2013-04-09 02:25:40 +00:00
|
|
|
// later version.
|
|
|
|
|
|
|
|
// This library is distributed in the hope that it will be useful, but
|
|
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2013-07-16 19:58:43 +00:00
|
|
|
// General Lesser Public License for more details.
|
2013-04-09 02:25:40 +00:00
|
|
|
|
2013-07-16 19:58:43 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this program; see the file COPYING-LGPLV3. If
|
|
|
|
// not, see <http://www.gnu.org/licenses/>.
|
2013-03-21 22:42:41 +00:00
|
|
|
|
2013-08-29 15:08:47 +00:00
|
|
|
|
2013-03-21 22:42:41 +00:00
|
|
|
#include "test-utils.h"
|
|
|
|
|
|
|
|
using std::string;
|
|
|
|
|
|
|
|
namespace abigail
|
|
|
|
{
|
|
|
|
namespace tests
|
|
|
|
{
|
|
|
|
|
2013-03-22 15:53:26 +00:00
|
|
|
/// Returns the absolute path to the source directory.
|
|
|
|
///
|
|
|
|
/// \return the absolute path tho the source directory.
|
2016-01-15 12:34:16 +00:00
|
|
|
const char*
|
2013-03-21 22:42:41 +00:00
|
|
|
get_src_dir()
|
|
|
|
{
|
|
|
|
#ifndef ABIGAIL_SRC_DIR
|
|
|
|
#error the macro ABIGAIL_SRC_DIR must be set at compile time
|
|
|
|
#endif
|
|
|
|
|
2016-01-15 12:34:16 +00:00
|
|
|
static __thread const char* s(ABIGAIL_SRC_DIR);
|
2013-03-21 22:42:41 +00:00
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
2013-03-22 15:53:26 +00:00
|
|
|
/// Returns the absolute path to the build directory.
|
|
|
|
///
|
|
|
|
/// \return the absolute path the build directory.
|
2016-01-15 12:34:16 +00:00
|
|
|
const char*
|
2013-03-21 22:42:41 +00:00
|
|
|
get_build_dir()
|
|
|
|
{
|
|
|
|
#ifndef ABIGAIL_BUILD_DIR
|
|
|
|
#error the macro ABIGAIL_BUILD_DIR must be set at compile time
|
|
|
|
#endif
|
|
|
|
|
2016-01-15 12:34:16 +00:00
|
|
|
static __thread const char* s(ABIGAIL_BUILD_DIR);
|
2013-03-21 22:42:41 +00:00
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
|
|
|
}//end namespace tests
|
|
|
|
}//end namespace abigail
|