[gnome-logs/wip/test: 35/43] Build gnome-logs-behave-test during make-check
- From: Rashi Aswani <aswanirashi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-logs/wip/test: 35/43] Build gnome-logs-behave-test during make-check
- Date: Fri, 21 Aug 2015 16:23:35 +0000 (UTC)
commit cd6e13d4f85adedf604dd10c40fcc66f37f223cc
Author: Rashi Aswani <aswanirashi19 gmail com>
Date: Mon Jul 27 11:34:50 2015 +0530
Build gnome-logs-behave-test during make-check
Makefile.am | 66 ++++++++++++++++++++++++++++++++++++++--
tests/environment.py | 2 +-
tests/gnome-logs-behave-test.c | 53 ++++++++++++++++++++++++++++++++
3 files changed, 117 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 7564e06..4150d6e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -203,12 +203,72 @@ nodist_tests_gnome_logs_test_headers = \
src/gl-enums.h \
src/gl-resource.h
+tests_gnome_logs_behave_test_CPPFLAGS = -DTEST \
+ -DLOCALEDIR=\""$(localedir)"\" \
+ -I$(top_builddir) \
+ -I$(top_srcdir)/src \
+ $(WARN_CFLAGS)
+
+tests_gnome_logs_behave_test_CFLAGS = \
+ $(LOGS_CFLAGS)
+
+tests_gnome_logs_behave_test_LDADD = \
+ $(LOGS_LIBS)
+
+tests_gnome_logs_behave_test_SOURCES = \
+ tests/gnome-logs-behave-test.c \
+ src/gl-application.c \
+ src/gl-categorylist.c \
+ src/gl-eventtoolbar.c \
+ src/gl-eventview.c \
+ src/gl-eventviewdetail.c \
+ src/gl-eventviewlist.c \
+ src/gl-eventviewrow.c \
+ tests/gl-mock-journal.c \
+ src/gl-journal-model.c \
+ src/gl-util.c \
+ src/gl-window.c
+
+nodist_tests_gnome_logs_behave_test_SOURCES = \
+ src/gl-enums.c \
+ src/gl-resource.c
+
+enum_data = \
+ src/gl-enums.c \
+ src/gl-enums.h
+
+tests_gnome_logs_behave_test_enum_headers = \
+ $(srcdir)/src/gl-categorylist.h \
+ $(srcdir)/src/gl-eventtoolbar.h \
+ $(srcdir)/src/gl-eventview.h \
+ $(srcdir)/src/gl-eventviewrow.h \
+ $(srcdir)/src/gl-util.h
+
+noinst_tests_gnome_logs_behave_test_headers = \
+ src/gl-application.h \
+ src/gl-categorylist.h \
+ src/gl-eventtoolbar.h \
+ src/gl-eventview.h \
+ src/gl-eventviewdetail.h \
+ src/gl-eventviewlist.h \
+ src/gl-eventviewrow.h \
+ tests/gl-mock-journal.h \
+ src/gl-journal-model.h \
+ src/gl-util.h \
+ src/gl-window.h
+
+nodist_tests_gnome_logs_behave_test_headers = \
+ src/gl-enums.h \
+ src/gl-resource.h
+
check_PROGRAMS = \
- tests/test-gl-util \
- tests/gnome-logs-test
+ tests/gnome-logs-behave-test \
+ tests/test-gl-util \
+ tests/gnome-logs-test
TESTS = \
- $(check_PROGRAMS) \
+ tests/test-gl-util \
+ tests/gnome-logs-test \
$(check_SCRIPTS)
endif
diff --git a/tests/environment.py b/tests/environment.py
index f0f7bdb..c8965b4 100644
--- a/tests/environment.py
+++ b/tests/environment.py
@@ -31,7 +31,7 @@ def before_all(context):
# Store scenario start time for session logs
context.log_start_time = strftime("%Y-%m-%d %H:%M:%S", localtime())
- context.app_class = App('./gnome-logs-test')
+ context.app_class = App('./gnome-logs-behave-test')
except Exception as e:
print("Error in before_all: %s" % e.message)
diff --git a/tests/gnome-logs-behave-test.c b/tests/gnome-logs-behave-test.c
new file mode 100644
index 0000000..2030b73
--- /dev/null
+++ b/tests/gnome-logs-behave-test.c
@@ -0,0 +1,53 @@
+/*
+ * GNOME Logs - View and search logs
+ * Copyright (C) 2015 Rashi Aswani
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+
+#include "gl-mock-journal.h"
+#include "../src/gl-application.h"
+#include "../src/gl-eventviewdetail.h"
+#include "../src/gl-journal-model.h"
+#include "../src/gl-categorylist.h"
+#include "../src/gl-eventview.h"
+#include "../src/gl-enums.h"
+#include "../src/gl-eventtoolbar.h"
+#include "../src/gl-eventviewlist.h"
+#include "../src/gl-eventviewrow.h"
+#include "../src/gl-util.h"
+#include "../src/gl-window.h"
+
+int
+main (int argc, char** argv)
+{
+ GtkApplication *application;
+ int status;
+
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+ bind_textdomain_codeset (PACKAGE_TARNAME, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+
+ g_set_prgname (PACKAGE_TARNAME);
+ application = gl_application_new ();
+ status = g_application_run (G_APPLICATION (application), argc, argv);
+ g_application_quit (G_APPLICATION (application));
+ g_object_unref (application);
+ return status;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]