diff options
author | Jim Meyering <meyering@redhat.com> | 2008-06-08 23:06:49 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-06-08 23:40:18 +0200 |
commit | 1179e95b2133861c4841b14b76c2076e80cef4d6 (patch) | |
tree | c645efae081f7f8a05dd992b4dbfc589e77523f2 | |
parent | a36e8de0efd3e9356b221bca1b316fb23cd4ecf3 (diff) | |
download | parted-1179e95b2133861c4841b14b76c2076e80cef4d6.tar.gz |
fix compile/link problems in libparted/tests
Since I didn't have check-devel installed where I'd been testing,
nothing was built in libparted/tests/.
* libparted/tests/label.c (main): Add argc and argv declarations.
* libparted/tests/disk.c (main): Likewise.
Reported by Frodo Baggins <frodo.drogo@gmail.com>.
* libparted/tests/Makefile.am (LDADD, AM_CPPFLAGS): Define, to compile
and link against gnulib-provided functions.
(label_CFLAGS, label_LDADD, disk_LDADD, etc.): Adjust.
(TESTS_ENVIRONMENT): Define, to propagate top_srcdir to test scripts.
-rw-r--r-- | libparted/tests/Makefile.am | 25 | ||||
-rw-r--r-- | libparted/tests/disk.c | 2 | ||||
-rw-r--r-- | libparted/tests/label.c | 2 |
3 files changed, 19 insertions, 10 deletions
diff --git a/libparted/tests/Makefile.am b/libparted/tests/Makefile.am index d526207..fc42a43 100644 --- a/libparted/tests/Makefile.am +++ b/libparted/tests/Makefile.am @@ -1,18 +1,24 @@ # This file is part of GNU Parted -# Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc. +# Copyright (C) 1999-2001, 2007-2008 Free Software Foundation, Inc. # # This file may be modified and/or distributed without restriction. TESTS = t1000-label.sh t2000-disk.sh EXTRA_DIST = $(TESTS) -bin_PROGRAMS = label disk -label_CFLAGS = $(CHECK_CFLAGS) -I$(top_srcdir)/include -label_LDADD = $(CHECK_LIBS) $(top_builddir)/libparted/libparted.la -label_SOURCES = common.h common.c label.c +bin_PROGRAMS = label disk -disk_CFLAGS = $(CHECK_CFLAGS) -I$(top_srcdir)/include -disk_LDADD = $(CHECK_LIBS) $(top_builddir)/libparted/libparted.la -disk_SOURCES = common.h common.c disk.c +LDADD = \ + $(top_builddir)/libparted/libparted.la \ + $(top_builddir)/lib/libparted.la \ + $(CHECK_LIBS) + +AM_CPPFLAGS = \ + $(CHECK_CFLAGS) \ + -I$(top_srcdir)/lib \ + -I$(top_srcdir)/include + +label_SOURCES = common.h common.c label.c +disk_SOURCES = common.h common.c disk.c MAINTAINERCLEANFILES = Makefile.in @@ -26,3 +32,6 @@ init.sh: Makefile.in echo 'PATH=$(abs_builddir)$(PATH_SEPARATOR)$$PATH; export PATH' >> $@-t chmod a-w $@-t mv $@-t $@ + +TESTS_ENVIRONMENT = \ + top_srcdir='$(top_srcdir)' diff --git a/libparted/tests/disk.c b/libparted/tests/disk.c index cf69b00..6e6d483 100644 --- a/libparted/tests/disk.c +++ b/libparted/tests/disk.c @@ -86,7 +86,7 @@ START_TEST (test_duplicate) END_TEST int -main (void) +main (int argc, char **argv) { set_program_name (argv[0]); int number_failed; diff --git a/libparted/tests/label.c b/libparted/tests/label.c index aa825f9..2871c2c 100644 --- a/libparted/tests/label.c +++ b/libparted/tests/label.c @@ -148,7 +148,7 @@ START_TEST (test_clone_label) END_TEST int -main (void) +main (int argc, char **argv) { set_program_name (argv[0]); int number_failed; |