mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Check that just including <guestfs.h> on its own works.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,6 +25,7 @@ capitests/test-add-libvirt-dom
|
||||
capitests/test-command
|
||||
capitests/test-config
|
||||
capitests/test-create-handle
|
||||
capitests/test-just-header
|
||||
capitests/test-last-errno
|
||||
capitests/test*.img
|
||||
capitests/tests
|
||||
|
||||
@@ -26,6 +26,7 @@ EXTRA_DIST = $(BUILT_SOURCES)
|
||||
check_PROGRAMS = \
|
||||
tests \
|
||||
test-command \
|
||||
test-just-header \
|
||||
test-create-handle \
|
||||
test-config \
|
||||
test-add-drive-opts \
|
||||
@@ -33,6 +34,7 @@ check_PROGRAMS = \
|
||||
|
||||
TESTS = \
|
||||
tests \
|
||||
test-just-header \
|
||||
test-create-handle \
|
||||
test-config \
|
||||
test-add-drive-opts \
|
||||
@@ -65,6 +67,13 @@ test_command_LDFLAGS = -all-static
|
||||
|
||||
# Hand-written C API tests.
|
||||
|
||||
test_just_header_SOURCES = test-just-header.c
|
||||
test_just_header_CFLAGS = \
|
||||
-I$(top_srcdir)/src -I$(top_builddir)/src \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
test_just_header_LDADD = \
|
||||
$(top_builddir)/src/libguestfs.la
|
||||
|
||||
test_create_handle_SOURCES = test-create-handle.c
|
||||
test_create_handle_CFLAGS = \
|
||||
-I$(top_srcdir)/src -I$(top_builddir)/src \
|
||||
|
||||
30
capitests/test-just-header.c
Normal file
30
capitests/test-just-header.c
Normal file
@@ -0,0 +1,30 @@
|
||||
/* libguestfs
|
||||
* Copyright (C) 2010 Red Hat Inc.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* Check that just including the header and nothing else works, ie.
|
||||
* that there are no implicit dependencies in the header file.
|
||||
*/
|
||||
|
||||
#include "guestfs.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
guestfs_h *g = guestfs_create ();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user