summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQC <qball@gmpclient.org>2014-08-29 13:06:40 +0200
committerQC <qball@gmpclient.org>2014-08-29 13:06:40 +0200
commit79e729bd370528547dfe9c06cf7cb0bca9f0339d (patch)
tree17581bf95b1473d2654b0f8fa482b0bae4daf8d9
parentb7f6799af998bd9c27df9489e3ca23769df89cae (diff)
Update the test to integrate in build.
* TODO: fix make distcheck.
-rw-r--r--.travis.yml2
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac2
-rw-r--r--test/Makefile13
-rw-r--r--test/Makefile.am31
5 files changed, 35 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml
index 512e03aa..c4f960a6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,6 +8,6 @@ before_install:
- sudo apt-get install -y libxinerama-dev autoconf automake make libxft-dev libx11-dev libpango1.0-dev
- sudo pip install cpp-coveralls
-script: autoreconf -i && ./configure && make && make -C test/ test
+script: autoreconf -i && ./configure --enable-gcov && make && make -C test/ test
after_success:
- coveralls --exclude lib --gcov-options '\-lp'
diff --git a/Makefile.am b/Makefile.am
index ab195361..78e06a10 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS=test
+
##
# Rofi the program
##
diff --git a/configure.ac b/configure.ac
index 2d261341..1e6eeb3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,5 +44,5 @@ PKG_CHECK_MODULES([xinerama], [xinerama])
PKG_CHECK_MODULES([pango], [pango pangoxft])
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile test/Makefile])
AC_OUTPUT
diff --git a/test/Makefile b/test/Makefile
deleted file mode 100644
index 26bb0aea..00000000
--- a/test/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-CC=gcc
-CFLAGS=-I../include/ -I../ -std=c99 -fprofile-arcs -ftest-coverage -g3
-SOURCES=\
- history-test.c\
- ../config/config.c\
- ../source/history.c
-
-history-test: $(SOURCES)
- $(CC) -o $@ $^ `pkg-config --libs --cflags glib-2.0` $(CFLAGS)
-
-
-test: history-test
- ./$^
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 00000000..0b4be914
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,31 @@
+##
+# Rofi the program
+##
+bin_PROGRAMS=rofi_test
+
+LIBS=\
+ @xft_LIBS@\
+ @x11_LIBS@\
+ @xinerama_LIBS@\
+ @pango_LIBS@
+
+AM_CFLAGS=\
+ @xft_CFLAGS@\
+ @x11_CFLAGS@\
+ @xinerama_CFLAGS@\
+ @pango_CFLAGS@\
+ -DMANPAGE_PATH="\"$(mandir)/man1/rofi.1\""\
+ -I$(top_srcdir)/include/\
+ -I$(top_srcdir)/config/\
+ -I$(top_builddir)/
+
+rofi_test_SOURCES=\
+ ../source/history.c\
+ ../config/config.c\
+ ../include/rofi.h\
+ ../include/history.h\
+ history-test.c
+
+.PHONY: test
+test: rofi_test
+ ./$^