summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Metzler <ametzler@downhill.at.eu.org>2011-12-23 14:25:58 +0100
committerStef Walter <stefw@collabora.co.uk>2011-12-23 19:46:15 +0100
commit83dcc15d1d97218004137769ff68e2e8119f1d80 (patch)
treeb0c7920b783d68d9bee414cc4a75c0076c3259b2
parent2da833b0ca9539c12745d2f9fef1e7be7c7792dc (diff)
Compile CuTest.c separately.
Use regular compile and link instead of having #include "CuTest.c" in every test. Works around gcc optimization issue.
-rw-r--r--tests/Makefile.am10
-rw-r--r--tests/conf-test.c2
-rw-r--r--tests/hash-test.c2
-rw-r--r--tests/pin-test.c2
-rw-r--r--tests/ptr-array-test.c2
-rw-r--r--tests/test-init.c2
-rw-r--r--tests/uri-test.c2
7 files changed, 9 insertions, 13 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6015c1e..819b74a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -22,9 +22,17 @@ noinst_PROGRAMS = \
print-messages \
$(CHECK_PROGS)
+cutestfiles = cutest/CuTest.c cutest/CuTest.h
+
+conf_test_SOURCES = conf-test.c $(cutestfiles)
+hash_test_SOURCES = hash-test.c $(cutestfiles)
+pin_test_SOURCES = pin-test.c $(cutestfiles)
+ptr_array_test_SOURCES = ptr-array-test.c $(cutestfiles)
test_init_SOURCES = \
test-init.c \
- mock-module.c mock-module.h
+ mock-module.c mock-module.h $(cutestfiles)
+
+uri_test_SOURCES = uri-test.c $(cutestfiles)
TESTS = $(CHECK_PROGS:=$(EXEEXT))
diff --git a/tests/conf-test.c b/tests/conf-test.c
index b86ffa7..df44fae 100644
--- a/tests/conf-test.c
+++ b/tests/conf-test.c
@@ -403,5 +403,3 @@ main (void)
CuStringDelete (output);
return ret;
}
-
-#include "CuTest.c"
diff --git a/tests/hash-test.c b/tests/hash-test.c
index c1040cd..876088b 100644
--- a/tests/hash-test.c
+++ b/tests/hash-test.c
@@ -407,5 +407,3 @@ main (void)
return ret;
}
-
-#include "CuTest.c"
diff --git a/tests/pin-test.c b/tests/pin-test.c
index f4cfd8d..0f6261f 100644
--- a/tests/pin-test.c
+++ b/tests/pin-test.c
@@ -295,5 +295,3 @@ main (void)
return ret;
}
-
-#include "CuTest.c"
diff --git a/tests/ptr-array-test.c b/tests/ptr-array-test.c
index 4eca468..b75614f 100644
--- a/tests/ptr-array-test.c
+++ b/tests/ptr-array-test.c
@@ -255,5 +255,3 @@ main (void)
return ret;
}
-
-#include "CuTest.c"
diff --git a/tests/test-init.c b/tests/test-init.c
index af07860..10790a8 100644
--- a/tests/test-init.c
+++ b/tests/test-init.c
@@ -251,5 +251,3 @@ main (void)
return ret;
}
-
-#include "CuTest.c"
diff --git a/tests/uri-test.c b/tests/uri-test.c
index 0d57835..2012c0f 100644
--- a/tests/uri-test.c
+++ b/tests/uri-test.c
@@ -1211,5 +1211,3 @@ main (void)
CuStringDelete (output);
return ret;
}
-
-#include "CuTest.c"