summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2017-04-24 13:36:46 +0930
committerAndrew Jeffery <andrew@aj.id.au>2017-04-26 07:45:48 +0000
commit62af1ba6d0d19dcd8146dbdb4f8adcf55af6a19f (patch)
treee85c1106a37a38712a6e2cfc3706c3f23c7c3041
parent56b2aa3dfa8fa6c5f457bb5a28e88c4ef8d7f58f (diff)
downloadphosphor-mboxd-62af1ba6d0d19dcd8146dbdb4f8adcf55af6a19f.tar.gz
phosphor-mboxd-62af1ba6d0d19dcd8146dbdb4f8adcf55af6a19f.zip
test: Add NDEBUG sanity check
Hopefully stops people tripping over themselves if NDEBUG gets defined. Change-Id: Iafb81d01f6451619f49a5030e5154c8f30ffebdb Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
-rw-r--r--Makefile.am6
-rw-r--r--test/sanity.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 050de35..dea382f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,3 +14,9 @@ mboxctl_CFLAGS = $(LIBSYSTEMD_CFLAGS)
AM_LIBS = $(CODE_COVERAGE_LIBS)
AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
+
+test_sanity_SOURCES = test/sanity.c
+
+check_PROGRAMS = test/sanity
+
+TESTS = $(check_PROGRAMS)
diff --git a/test/sanity.c b/test/sanity.c
new file mode 100644
index 0000000..b4989f8
--- /dev/null
+++ b/test/sanity.c
@@ -0,0 +1,8 @@
+int main(void)
+{
+#ifdef NDEBUG
+ return 1;
+#else
+ return 0;
+#endif
+}
OpenPOWER on IntegriCloud