tests: on Windows the plugin object extension is 'dll' not 'so'
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 11 Jul 2019 21:48:02 +0000 (17:48 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 12 Jul 2019 16:24:52 +0000 (12:24 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: I48eea5cb3ba8ea11d9994b56ec4b98e9cc577c6b
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1695
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/bindings/python/bt2/test_plugin.py

index d9b0523b19bc0d012f811078b0f7c53aa2e45742..2096d84b2301e49d88a00c0cab443fea05e5ed85 100644 (file)
@@ -23,6 +23,7 @@ import os
 
 
 _TEST_PLUGIN_PLUGINS_PATH = os.environ['BT_PLUGINS_PATH']
+_TEST_PLUGIN_PLUGIN_EXTENSION_BY_OS = {'cygwin': 'dll', 'mingw': 'dll'}
 
 
 class PluginSetTestCase(unittest.TestCase):
@@ -60,7 +61,9 @@ class FindPluginsTestCase(unittest.TestCase):
         self.assertTrue(len(pset) >= 3)
 
     def test_find_file(self):
-        path = os.path.join(_TEST_PLUGIN_PLUGINS_PATH, 'utils', '.libs', 'babeltrace-plugin-utils.so')
+        extension = _TEST_PLUGIN_PLUGIN_EXTENSION_BY_OS.get(os.environ['BT_OS_TYPE'], 'so')
+        plugin_name = 'babeltrace-plugin-utils.{}'.format(extension)
+        path = os.path.join(_TEST_PLUGIN_PLUGINS_PATH, 'utils', '.libs', plugin_name)
         pset = bt2.find_plugins(path)
         self.assertTrue(len(pset) == 1)
 
This page took 0.027558 seconds and 4 git commands to generate.