syslog-ng/syslog-ng-3.2.5-tests-functional-sql-test.patch
Jose Pedro Oliveira 56892a2396 Improve test coverage: remove a couple of errors and really run the SQL test.
Patches: syslog-ng-3.2.5-tests-functional-control.py.patch and
syslog-ng-3.2.5-tests-functional-sql-test.patch.
2012-01-15 18:59:22 +00:00

34 lines
1.5 KiB
Diff

diff -ruN syslog-ng-3.2.5/tests/functional/globals.py syslog-ng-3.2.5-modified/tests/functional/globals.py
--- syslog-ng-3.2.5/tests/functional/globals.py 2011-10-08 11:34:21.000000000 +0100
+++ syslog-ng-3.2.5-modified/tests/functional/globals.py 2012-01-15 05:34:12.641744234 +0000
@@ -7,7 +7,7 @@
return False
def has_module(module):
- avail_mods = os.popen('../../syslog-ng/syslog-ng -V | grep ^Available-Modules: ', 'r').read()
+ avail_mods = os.popen('../../syslog-ng/syslog-ng -V | grep ^Enable-', 'r').read()
if avail_mods.find(module) != -1:
return True
return False
diff -ruN syslog-ng-3.2.5/tests/functional/test_sql.py syslog-ng-3.2.5-modified/tests/functional/test_sql.py
--- syslog-ng-3.2.5/tests/functional/test_sql.py 2011-10-08 11:34:21.000000000 +0100
+++ syslog-ng-3.2.5-modified/tests/functional/test_sql.py 2012-01-15 05:37:56.699303941 +0000
@@ -28,7 +28,7 @@
def check_env():
- if not has_module('afsql'):
+ if not has_module('SQL'):
print 'afsql module is not available, skipping SQL test'
return False
paths=('/opt/syslog-ng/bin', '/usr/bin', '/usr/local/bin')
@@ -45,7 +45,7 @@
soext='.sl'
found = False
- paths = (os.environ.get('dbd_dir', None), '/usr/local/lib/dbd', '/usr/lib/dbd', '/opt/syslog-ng/lib/dbd')
+ paths = (os.environ.get('dbd_dir', None), '/usr/local/lib/dbd', '/usr/lib/dbd', '/usr/lib64/dbd', '/opt/syslog-ng/lib/dbd')
for pth in paths:
if pth and os.path.isfile('%s/libdbdsqlite3%s' % (pth, soext)):
found = True