2005-12-07 17:36:44 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2005 Wim Taymans <wim@fluendo.com>
|
|
|
|
*
|
|
|
|
* gstabi.c: Unit test for ABI compatibility
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2005-12-07 17:36:44 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
#include <gst/check/gstcheck.h>
|
|
|
|
|
|
|
|
#ifdef HAVE_CPU_I386
|
|
|
|
#include "struct_i386.h"
|
2006-06-06 13:48:20 +00:00
|
|
|
#define HAVE_ABI_SIZES TRUE
|
|
|
|
#else
|
2008-01-07 09:47:49 +00:00
|
|
|
#ifdef __powerpc64__
|
|
|
|
#include "struct_ppc64.h"
|
2013-01-16 11:29:47 +00:00
|
|
|
#define HAVE_ABI_SIZES FALSE
|
2007-02-09 13:59:32 +00:00
|
|
|
#else
|
2008-01-07 09:47:49 +00:00
|
|
|
#ifdef __powerpc__
|
|
|
|
#include "struct_ppc32.h"
|
2006-06-06 14:10:09 +00:00
|
|
|
#define HAVE_ABI_SIZES TRUE
|
|
|
|
#else
|
2006-06-06 13:48:20 +00:00
|
|
|
#ifdef HAVE_CPU_X86_64
|
|
|
|
#include "struct_x86_64.h"
|
2006-06-06 13:59:10 +00:00
|
|
|
#define HAVE_ABI_SIZES TRUE
|
2005-12-07 17:36:44 +00:00
|
|
|
#else
|
2007-01-17 12:31:01 +00:00
|
|
|
#ifdef HAVE_CPU_HPPA
|
|
|
|
#include "struct_hppa.h"
|
2013-01-16 11:29:47 +00:00
|
|
|
#define HAVE_ABI_SIZES FALSE
|
2007-01-17 12:31:01 +00:00
|
|
|
#else
|
2008-10-07 15:12:21 +00:00
|
|
|
#ifdef HAVE_CPU_SPARC
|
|
|
|
#include "struct_sparc.h"
|
2013-01-16 11:29:47 +00:00
|
|
|
#define HAVE_ABI_SIZES FALSE
|
2008-10-07 15:12:21 +00:00
|
|
|
#else
|
2011-02-24 13:02:37 +00:00
|
|
|
#ifdef HAVE_CPU_ARM
|
|
|
|
#include "struct_arm.h"
|
2013-01-17 06:38:14 +00:00
|
|
|
#define HAVE_ABI_SIZES TRUE
|
2011-02-24 13:02:37 +00:00
|
|
|
#else
|
2005-12-07 17:36:44 +00:00
|
|
|
/* in case someone wants to generate a new arch */
|
|
|
|
#include "struct_i386.h"
|
2006-06-06 13:48:20 +00:00
|
|
|
#define HAVE_ABI_SIZES FALSE
|
|
|
|
#endif
|
2005-12-07 17:36:44 +00:00
|
|
|
#endif
|
2006-06-06 14:10:09 +00:00
|
|
|
#endif
|
2007-01-17 12:31:01 +00:00
|
|
|
#endif
|
2007-02-09 13:59:32 +00:00
|
|
|
#endif
|
2008-10-07 15:12:21 +00:00
|
|
|
#endif
|
2011-02-24 14:20:01 +00:00
|
|
|
#endif
|
2005-12-07 17:36:44 +00:00
|
|
|
|
|
|
|
GST_START_TEST (test_ABI)
|
|
|
|
{
|
2006-06-06 13:48:20 +00:00
|
|
|
gst_check_abi_list (list, HAVE_ABI_SIZES);
|
2005-12-07 17:36:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2008-02-29 13:59:24 +00:00
|
|
|
static Suite *
|
2005-12-07 17:36:44 +00:00
|
|
|
gstabi_suite (void)
|
|
|
|
{
|
|
|
|
Suite *s = suite_create ("GstABI");
|
|
|
|
TCase *tc_chain = tcase_create ("size check");
|
|
|
|
|
|
|
|
tcase_set_timeout (tc_chain, 0);
|
|
|
|
|
|
|
|
suite_add_tcase (s, tc_chain);
|
|
|
|
tcase_add_test (tc_chain, test_ABI);
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
2006-07-01 20:56:56 +00:00
|
|
|
GST_CHECK_MAIN (gstabi);
|