From 51a24efff2f858b154d656ace765286aed440ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Wed, 9 Jun 2010 13:10:47 +0000 Subject: [PATCH] - assert that provided software is runable git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36163 20353a03-c40f-0410-a6d1-a30d3c3de9de --- buildout/tests/assertSoftware.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/buildout/tests/assertSoftware.py b/buildout/tests/assertSoftware.py index 929267a0cc..6aa825e90d 100644 --- a/buildout/tests/assertSoftware.py +++ b/buildout/tests/assertSoftware.py @@ -115,6 +115,25 @@ class AssertLddLibs(unittest.TestCase): result = os.system("ldd parts/memcached/bin/memcached | grep -q 'parts/li" "bevent/lib/libevent'") +class AssertSoftwareRunable(unittest.TestCase): + def test_HaProxy(self): + stdout, stderr = subprocess.Popen(["parts/haproxy/sbin/haproxy", "-v"], + stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + self.assertEqual(stderr, '') + self.assertTrue(stdout.startswith('HA-Proxy')) + + def test_Apache(self): + stdout, stderr = subprocess.Popen(["parts/apache/bin/httpd", "-v"], + stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + self.assertEqual(stderr, '') + self.assertTrue(stdout.startswith('Server version: Apache')) + + def test_Ocropus(self): + stdout, stderr = subprocess.Popen(["parts/ocropus/bin/ocropus"], + stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + self.assertEqual(stdout, '') + self.assertTrue('splitting books' in stderr) + class AssertApache(unittest.TestCase): """Tests for built apache""" -- 2.30.9