mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-04 22:20:30 +01:00
test: Move auth, credentials tests from libdbus-internal into test/
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
b4b0e1b3f5
commit
9feeeaea9a
11 changed files with 71 additions and 27 deletions
|
|
@ -152,9 +152,6 @@ set (DBUS_SHARED_HEADERS
|
|||
### to be unless they move to DBUS_SHARED_SOURCES later)
|
||||
set (DBUS_UTIL_SOURCES
|
||||
${DBUS_DIR}/dbus-asv-util.c
|
||||
${DBUS_DIR}/dbus-auth-script.c
|
||||
${DBUS_DIR}/dbus-auth-util.c
|
||||
${DBUS_DIR}/dbus-credentials-util.c
|
||||
${DBUS_DIR}/dbus-mainloop.c
|
||||
${DBUS_DIR}/dbus-marshal-byteswap-util.c
|
||||
${DBUS_DIR}/dbus-marshal-recursive-util.c
|
||||
|
|
@ -170,7 +167,6 @@ set (DBUS_UTIL_SOURCES
|
|||
|
||||
set (DBUS_UTIL_HEADERS
|
||||
${DBUS_DIR}/dbus-asv-util.h
|
||||
${DBUS_DIR}/dbus-auth-script.h
|
||||
${DBUS_DIR}/dbus-mainloop.h
|
||||
${DBUS_DIR}/dbus-message-factory.h
|
||||
${DBUS_DIR}/dbus-shell.h
|
||||
|
|
|
|||
|
|
@ -102,7 +102,13 @@ if(DBUS_ENABLE_EMBEDDED_TESTS)
|
|||
add_test_executable(test-message-internals ${TEST_DIR}/internals/message-internals.c dbus-testutils)
|
||||
set_target_properties(test-message-internals PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
|
||||
|
||||
add_test_executable(test-misc-internals ${TEST_DIR}/internals/misc-internals.c dbus-testutils)
|
||||
set(SOURCES ${TEST_DIR}/internals/dbus-auth-script.c
|
||||
${TEST_DIR}/internals/dbus-auth-script.h
|
||||
${TEST_DIR}/internals/dbus-auth-util.c
|
||||
${TEST_DIR}/internals/dbus-credentials-util.c
|
||||
${TEST_DIR}/internals/misc-internals.c
|
||||
${TEST_DIR}/internals/misc-internals.h)
|
||||
add_test_executable(test-misc-internals "${SOURCES}" dbus-testutils)
|
||||
set_target_properties(test-misc-internals PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
|
||||
|
||||
set(SOURCES ${TEST_DIR}/bus/main.c)
|
||||
|
|
|
|||
|
|
@ -245,10 +245,6 @@ DBUS_SHARED_SOURCES= \
|
|||
DBUS_UTIL_SOURCES= \
|
||||
dbus-asv-util.c \
|
||||
dbus-asv-util.h \
|
||||
dbus-auth-script.c \
|
||||
dbus-auth-script.h \
|
||||
dbus-auth-util.c \
|
||||
dbus-credentials-util.c \
|
||||
dbus-mainloop.c \
|
||||
dbus-mainloop.h \
|
||||
dbus-marshal-byteswap-util.c \
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ DBUS_PRIVATE_EXPORT
|
|||
dbus_bool_t _dbus_server_test (const char *test_data_dir);
|
||||
|
||||
dbus_bool_t _dbus_message_test (const char *test_data_dir);
|
||||
dbus_bool_t _dbus_auth_test (const char *test_data_dir);
|
||||
|
||||
DBUS_PRIVATE_EXPORT
|
||||
dbus_bool_t _dbus_sha_test (const char *test_data_dir);
|
||||
|
|
@ -90,8 +89,6 @@ dbus_bool_t _dbus_memory_test (const char *test_data_dir);
|
|||
DBUS_PRIVATE_EXPORT
|
||||
dbus_bool_t _dbus_object_tree_test (const char *test_data_dir);
|
||||
|
||||
dbus_bool_t _dbus_credentials_test (const char *test_data_dir);
|
||||
|
||||
dbus_bool_t _dbus_test_generate_bodies (int sequence,
|
||||
int byte_order,
|
||||
DBusString *signature,
|
||||
|
|
|
|||
|
|
@ -209,7 +209,14 @@ test_marshal_recursive_LDADD = libdbus-testutils.la
|
|||
test_message_internals_SOURCES = internals/message-internals.c
|
||||
test_message_internals_LDADD = libdbus-testutils.la
|
||||
|
||||
test_misc_internals_SOURCES = internals/misc-internals.c
|
||||
test_misc_internals_SOURCES = \
|
||||
internals/dbus-auth-script.c \
|
||||
internals/dbus-auth-script.h \
|
||||
internals/dbus-auth-util.c \
|
||||
internals/dbus-credentials-util.c \
|
||||
internals/misc-internals.c \
|
||||
internals/misc-internals.h \
|
||||
$(NULL)
|
||||
test_misc_internals_LDADD = libdbus-testutils.la
|
||||
|
||||
EXTRA_DIST += dbus-test-runner
|
||||
|
|
|
|||
|
|
@ -24,16 +24,18 @@
|
|||
|
||||
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
|
||||
|
||||
#include "misc-internals.h"
|
||||
|
||||
#include "dbus-auth-script.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "dbus-auth.h"
|
||||
#include "dbus-string.h"
|
||||
#include "dbus-hash.h"
|
||||
#include "dbus-credentials.h"
|
||||
#include "dbus-internals.h"
|
||||
#include <dbus/dbus-test-tap.h>
|
||||
#include "dbus/dbus-auth.h"
|
||||
#include "dbus/dbus-credentials.h"
|
||||
#include "dbus/dbus-hash.h"
|
||||
#include "dbus/dbus-internals.h"
|
||||
#include "dbus/dbus-string.h"
|
||||
#include "dbus/dbus-test-tap.h"
|
||||
|
||||
#ifdef DBUS_UNIX
|
||||
# include "dbus/dbus-userdb.h"
|
||||
|
|
@ -22,10 +22,13 @@
|
|||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "dbus-internals.h"
|
||||
#include "dbus-test.h"
|
||||
#include "dbus-auth.h"
|
||||
#include <dbus/dbus-test-tap.h>
|
||||
|
||||
#include "misc-internals.h"
|
||||
|
||||
#include "dbus/dbus-auth.h"
|
||||
#include "dbus/dbus-internals.h"
|
||||
#include "dbus/dbus-test-tap.h"
|
||||
#include "dbus/dbus-test.h"
|
||||
|
||||
/**
|
||||
* @addtogroup DBusAuth
|
||||
|
|
@ -22,10 +22,13 @@
|
|||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "dbus-internals.h"
|
||||
#include "dbus-test.h"
|
||||
#include "dbus-credentials.h"
|
||||
#include <dbus/dbus-test-tap.h>
|
||||
|
||||
#include "misc-internals.h"
|
||||
|
||||
#include "dbus/dbus-credentials.h"
|
||||
#include "dbus/dbus-internals.h"
|
||||
#include "dbus/dbus-test-tap.h"
|
||||
#include "dbus/dbus-test.h"
|
||||
|
||||
/**
|
||||
* @addtogroup DBusCredentials
|
||||
|
|
@ -27,6 +27,8 @@
|
|||
#include "dbus/dbus-test.h"
|
||||
#include "test/test-utils.h"
|
||||
|
||||
#include "misc-internals.h"
|
||||
|
||||
static DBusTestCase tests[] =
|
||||
{
|
||||
{ "string", _dbus_string_test },
|
||||
|
|
|
|||
32
test/internals/misc-internals.h
Normal file
32
test/internals/misc-internals.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* Copyright 2002-2009 Red Hat, Inc.
|
||||
* Copyright 2011-2018 Collabora Ltd.
|
||||
*
|
||||
* Licensed under the Academic Free License version 2.1
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TEST_INTERNALS_MISC_INTERNALS_H
|
||||
#define TEST_INTERNALS_MISC_INTERNALS_H
|
||||
|
||||
#include <dbus/dbus-types.h>
|
||||
|
||||
dbus_bool_t _dbus_auth_test (const char *test_data_dir);
|
||||
dbus_bool_t _dbus_credentials_test (const char *test_data_dir);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Reference in a new issue