aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am14
-rw-r--r--tests/test-service.cc15
2 files changed, 7 insertions, 22 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c03af4c..628056b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,20 +1,18 @@
+
AM_CPPFLAGS = $(GTEST_CPPFLAGS) $(INDICATOR_CFLAGS) -I${top_srcdir}/src -Wall -Werror
AM_CXXFLAGS = $(GTEST_CXXFLAGS)
+TESTS = test-service
check_PROGRAMS = test-service
test_service_SOURCES = test-service.cc
test_service_LDADD = $(TEST_SERVICE_LIBS) libgtest.a
-test_service_CPPFLAGS = $(TEST_SERVICE_CFLAGS) $(AM_CPPFLAGS)
+test_service_CPPFLAGS = \
+ $(TEST_SERVICE_CFLAGS) \
+ $(AM_CPPFLAGS) \
+ -DINDICATOR_SERVICE_PATH="\"$(top_builddir)/src/indicator-session-service\""
check_LIBRARIES = libgtest.a
nodist_libgtest_a_SOURCES = \
$(GTEST_SOURCE)/src/gtest-all.cc \
$(GTEST_SOURCE)/src/gtest_main.cc
-check_SCRIPTS = test-service-runner.sh
-test-service-runner.sh: Makefile.am
- @echo "#!/bin/sh" > $@
- @echo $(top_builddir)/tests/test-service $(top_builddir)/src/indicator-session-service$(EXEEXT) 2\>/dev/null >> $@
- @chmod +x $@
-
-TESTS = ${check_SCRIPTS}
diff --git a/tests/test-service.cc b/tests/test-service.cc
index c3d2471..cb10070 100644
--- a/tests/test-service.cc
+++ b/tests/test-service.cc
@@ -36,7 +36,7 @@ class SessionServiceTest: public IndicatorServiceTest
virtual ~SessionServiceTest() {}
SessionServiceTest(): IndicatorServiceTest(INDICATOR_SESSION_DBUS_NAME,
INDICATOR_SESSION_DBUS_OBJECT,
- the_executable) { }
+ INDICATOR_SERVICE_PATH) { }
public:
virtual void SetUp() {
wait_seconds(1);
@@ -56,16 +56,3 @@ TEST_F(SessionServiceTest, HelloWorld)
ASSERT_TRUE(true);
}
-
-int
-main (int argc, char *argv[])
-{
- if (argc < 2) {
- fprintf (stderr, "Usage: appname /path/to/indicator-session-service");
- return -1;
- }
- the_executable = argv[1];
- fprintf (stdout, "executable is '%s'\n", the_executable);
- ::testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}