summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 090e054)
raw | patch | inline | side by side (parent: 090e054)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 6 Dec 2015 14:24:16 +0000 (15:24 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 6 Dec 2015 14:35:40 +0000 (15:35 +0100) |
We need the defines from config.h before
we include <testing.h>, or we get the following error on OmniOS:
make test_common test_meta_data test_utils_avltree test_utils_heap test_utils_time test_utils_subst
gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DPREFIX='"/opt/collectd"' -DCONFIGFILE='"/opt/collectd/etc/collectd.conf"' -DLOCALSTATEDIR='"/opt/collectd/var"' -DPKGLOCALSTATEDIR='"/opt/collectd/var/lib/collectd"' -DPIDFILE='"/opt/collectd/var/run/collectd.pid"' -DPLUGINDIR='"/opt/collectd/lib/collectd"' -DPKGDATADIR='"/opt/collectd/share/collectd"' -Wall -Werror -g -O2 -c -o common_test.o common_test.c
In file included from collectd.h:31:0,
from common.h:31,
from common_test.c:28:
../../src/config.h:1631:0: error: "_FILE_OFFSET_BITS" redefined [-Werror]
#define _FILE_OFFSET_BITS 64
^
In file included from /usr/include/inttypes.h:41:0,
from ../../src/testing.h:30,
from common_test.c:27:
/opt/gcc-5.1.0/lib/gcc/i386-pc-solaris2.11/5.1.0/include-fixed/sys/feature_tests.h:231:0: note: this is the location of the previous definition
#define _FILE_OFFSET_BITS 32
^
cc1: all warnings being treated as errors
*** Error code 1
make: Fatal error: Command failed for target `common_test.o'
we include <testing.h>, or we get the following error on OmniOS:
make test_common test_meta_data test_utils_avltree test_utils_heap test_utils_time test_utils_subst
gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DPREFIX='"/opt/collectd"' -DCONFIGFILE='"/opt/collectd/etc/collectd.conf"' -DLOCALSTATEDIR='"/opt/collectd/var"' -DPKGLOCALSTATEDIR='"/opt/collectd/var/lib/collectd"' -DPIDFILE='"/opt/collectd/var/run/collectd.pid"' -DPLUGINDIR='"/opt/collectd/lib/collectd"' -DPKGDATADIR='"/opt/collectd/share/collectd"' -Wall -Werror -g -O2 -c -o common_test.o common_test.c
In file included from collectd.h:31:0,
from common.h:31,
from common_test.c:28:
../../src/config.h:1631:0: error: "_FILE_OFFSET_BITS" redefined [-Werror]
#define _FILE_OFFSET_BITS 64
^
In file included from /usr/include/inttypes.h:41:0,
from ../../src/testing.h:30,
from common_test.c:27:
/opt/gcc-5.1.0/lib/gcc/i386-pc-solaris2.11/5.1.0/include-fixed/sys/feature_tests.h:231:0: note: this is the location of the previous definition
#define _FILE_OFFSET_BITS 32
^
cc1: all warnings being treated as errors
*** Error code 1
make: Fatal error: Command failed for target `common_test.o'
index 399f8b533b2bcfdce28afa6b9c3a9f7573a89a75..ca8f15a35fd793d9799016ae594d2544ad5b67d7 100644 (file)
--- a/src/daemon/common_test.c
+++ b/src/daemon/common_test.c
* Florian octo Forster <octo at collectd.org>
*/
-#include "testing.h"
#include "common.h"
+#include "testing.h"
#if HAVE_LIBKSTAT
kstat_ctl_t *kc;
index b4c0e27690ebb09b4edbf66e60a58d830661aa6b..48760d648645811c875071b69c01f29e8fb859f7 100644 (file)
* Florian octo Forster <octo at collectd.org>
*/
-#include "testing.h"
-#include "collectd.h"
#include "common.h" /* for STATIC_ARRAY_SIZE */
+#include "collectd.h"
+#include "testing.h"
#include "meta_data.h"
DEF_TEST(base)
index 6dbafe18a4bcfd3712af89bb3812ab3fc7e833bb..489d60faa2b0cd3602857d8d2b543c4c61bf7b07 100644 (file)
* Florian octo Forster <octo at collectd.org>
*/
-#include "testing.h"
+#include "common.h" /* STATIC_ARRAY_SIZE */
#include "collectd.h"
+#include "testing.h"
#include "utils_avltree.h"
-#include "common.h" /* STATIC_ARRAY_SIZE */
static int compare_total_count = 0;
#define RESET_COUNTS() do { compare_total_count = 0; } while (0)
index 53d0fba863f3b7cb6a117e5224107d9dc98cfb8c..6ef80475c0bde77931173b0d50231561a84934af 100644 (file)
* Florian octo Forster <octo at collectd.org>
*/
-#include "testing.h"
#include "collectd.h"
+#include "testing.h"
#include "utils_heap.h"
static int compare (void const *v0, void const *v1)
index c12aa1057fe3d91022c67983d6a4e338c3b7f6ea..ec2e3514f2d11f4d14c1ff246478281b0da17db7 100644 (file)
* Florian octo Forster <octo at collectd.org>
*/
-#include "testing.h"
-#include "collectd.h"
#include "common.h" /* for STATIC_ARRAY_SIZE */
+#include "collectd.h"
+#include "testing.h"
#include "utils_subst.h"
#if HAVE_LIBKSTAT
index 8eac0b62525c8ad3500679f7568cd0c3c3859f24..736294698ea8d37017a979598e781de25559c619 100644 (file)
#define DBL_PRECISION 1e-3
-#include "testing.h"
#include "collectd.h"
+#include "testing.h"
#include "utils_time.h"
DEF_TEST(conversion)
index 5769ec9546ed0a85af234d3bf739471955380d57..f275813d59c121fbd44a5be35e6203893c6bb079 100644 (file)
--- a/src/utils_latency_test.c
+++ b/src/utils_latency_test.c
#define DBL_PRECISION 1e-9
-#include "testing.h"
-#include "collectd.h"
#include "common.h" /* for STATIC_ARRAY_SIZE */
+#include "collectd.h"
+#include "testing.h"
#include "utils_time.h"
#include "utils_latency.h"
diff --git a/src/utils_mount_test.c b/src/utils_mount_test.c
index b4cb43219a0e63b1ff8200ee79c3e2953704ca9c..d9d685ae7bf09fafca10fb1278a97d0fb84a6d87 100644 (file)
--- a/src/utils_mount_test.c
+++ b/src/utils_mount_test.c
* Florian octo Forster <octo at collectd.org>
*/
-#include "testing.h"
#include "collectd.h"
+#include "testing.h"
#include "utils_mount.h"
#if HAVE_LIBKSTAT
index 41cc0a41af3a26c2ac7841178ca88289cd284f01..6d23c8c5e32ea3e0dc66137edd1ef591f0c8b016 100644 (file)
* Florian Forster <octo at collectd.org>
**/
-#include "testing.h"
#include "collectd.h"
+#include "testing.h"
#include "utils_vl_lookup.h"
static _Bool expect_new_obj = 0;