[gnome-control-center/gbsneto/timezone-tests] WIP
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gbsneto/timezone-tests] WIP
- Date: Wed, 9 May 2018 21:18:35 +0000 (UTC)
commit e8df29a1da392426f83ca6f47cf10cf27ab874ba
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed May 9 18:17:27 2018 -0300
WIP
tests/datetime/meson.build | 11 +++++++---
tests/datetime/test-endianess.py | 44 +++++++++++++++++++++++++++++++++++++
tests/datetime/test-timezone-gfx.py | 44 +++++++++++++++++++++++++++++++++++++
tests/datetime/test-timezone.py | 44 +++++++++++++++++++++++++++++++++++++
4 files changed, 140 insertions(+), 3 deletions(-)
---
diff --git a/tests/datetime/meson.build b/tests/datetime/meson.build
index 4b2b03b36..c7c0777ed 100644
--- a/tests/datetime/meson.build
+++ b/tests/datetime/meson.build
@@ -8,6 +8,8 @@ test_units = [
includes = [top_inc, include_directories('../../panels/datetime')]
env = [
'G_MESSAGES_DEBUG=all',
+ 'BUILDDIR=' + meson.current_build_dir(),
+ 'TOP_BUILDDIR=' + meson.build_root()
]
cflags = [
'-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir()),
@@ -24,6 +26,9 @@ foreach unit: test_units
c_args : cflags
)
- test(unit, exe, env: env)
-endforeach
-
+ test(
+ unit,
+ find_program(unit + '.py'),
+ env : env,
+ timeout : 10)
+endforeach
\ No newline at end of file
diff --git a/tests/datetime/test-endianess.py b/tests/datetime/test-endianess.py
new file mode 100644
index 000000000..55f011884
--- /dev/null
+++ b/tests/datetime/test-endianess.py
@@ -0,0 +1,44 @@
+#!/usr/bin/python3
+# Copyright © 2018 Red Hat, Inc
+#
+# 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 2 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/>.
+#
+# Authors: Benjamin Berg <bberg redhat com>
+
+import os
+import sys
+import unittest
+
+try:
+ import dbusmock
+except ImportError:
+ sys.stderr.write('You need python-dbusmock (http://pypi.python.org/pypi/python-dbusmock) for this test
suite.\n')
+ sys.exit(1)
+
+# Add the shared directory to the search path
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'shared'))
+
+from gtest import GTest
+from x11session import X11SessionTestCase
+
+BUILDDIR = os.environ.get('BUILDDIR', os.path.join(os.path.dirname(__file__)))
+
+
+class EndianessTestCase(X11SessionTestCase, GTest):
+ g_test_exe = os.path.join(BUILDDIR, 'test-endianess')
+
+
+if __name__ == '__main__':
+ _test = unittest.TextTestRunner(stream=sys.stdout, verbosity=2)
+ unittest.main(testRunner=_test)
diff --git a/tests/datetime/test-timezone-gfx.py b/tests/datetime/test-timezone-gfx.py
new file mode 100644
index 000000000..7ba5318c1
--- /dev/null
+++ b/tests/datetime/test-timezone-gfx.py
@@ -0,0 +1,44 @@
+#!/usr/bin/python3
+# Copyright © 2018 Red Hat, Inc
+#
+# 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 2 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/>.
+#
+# Authors: Benjamin Berg <bberg redhat com>
+
+import os
+import sys
+import unittest
+
+try:
+ import dbusmock
+except ImportError:
+ sys.stderr.write('You need python-dbusmock (http://pypi.python.org/pypi/python-dbusmock) for this test
suite.\n')
+ sys.exit(1)
+
+# Add the shared directory to the search path
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'shared'))
+
+from gtest import GTest
+from x11session import X11SessionTestCase
+
+BUILDDIR = os.environ.get('BUILDDIR', os.path.join(os.path.dirname(__file__)))
+
+
+class TimezoneGfxTestCase(X11SessionTestCase, GTest):
+ g_test_exe = os.path.join(BUILDDIR, 'test-timezone-gfx')
+
+
+if __name__ == '__main__':
+ _test = unittest.TextTestRunner(stream=sys.stdout, verbosity=2)
+ unittest.main(testRunner=_test)
diff --git a/tests/datetime/test-timezone.py b/tests/datetime/test-timezone.py
new file mode 100644
index 000000000..18d2cda90
--- /dev/null
+++ b/tests/datetime/test-timezone.py
@@ -0,0 +1,44 @@
+#!/usr/bin/python3
+# Copyright © 2018 Red Hat, Inc
+#
+# 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 2 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/>.
+#
+# Authors: Benjamin Berg <bberg redhat com>
+
+import os
+import sys
+import unittest
+
+try:
+ import dbusmock
+except ImportError:
+ sys.stderr.write('You need python-dbusmock (http://pypi.python.org/pypi/python-dbusmock) for this test
suite.\n')
+ sys.exit(1)
+
+# Add the shared directory to the search path
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'shared'))
+
+from gtest import GTest
+from x11session import X11SessionTestCase
+
+BUILDDIR = os.environ.get('BUILDDIR', os.path.join(os.path.dirname(__file__)))
+
+
+class TimezoneTestCase(X11SessionTestCase, GTest):
+ g_test_exe = os.path.join(BUILDDIR, 'test-timezone')
+
+
+if __name__ == '__main__':
+ _test = unittest.TextTestRunner(stream=sys.stdout, verbosity=2)
+ unittest.main(testRunner=_test)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]