Index: tools/telemetry/telemetry/core/platform/linux_platform_backend_unittest.py |
diff --git a/tools/telemetry/telemetry/core/platform/linux_platform_backend_unittest.py b/tools/telemetry/telemetry/core/platform/linux_platform_backend_unittest.py |
index bc7465f7d1854ffca59bcf6e6473397f65d4921c..12e59b5d14be09be96cca3c3a8d6d900c164f5e2 100644 |
--- a/tools/telemetry/telemetry/core/platform/linux_platform_backend_unittest.py |
+++ b/tools/telemetry/telemetry/core/platform/linux_platform_backend_unittest.py |
@@ -6,6 +6,7 @@ import os |
import unittest |
from telemetry import decorators |
+from telemetry.core import platform |
from telemetry.core import util |
from telemetry.core.platform import linux_platform_backend |
@@ -70,3 +71,15 @@ class LinuxPlatformBackendTest(unittest.TestCase): |
# a distribution may not have a codename or a release number. We just check |
# that GetOSVersionName doesn't raise an exception |
backend.GetOSVersionName() |
+ |
+ @decorators.Enabled('linux') |
+ def testOpenCVDependency(self): |
+ try: |
+ import cv2 |
+ if (cv2.__version__ != '2.4.10'): |
+ raise ImportError() |
+ except ImportError: |
+ platform.GetHostPlatform().InstallPythonModule('cv2') |
+ import cv2 |
+ self.assertEqual('2.4.10', cv2.__version__, 'Wrong OpenCV version found. ' |
+ 'Expected 2.4.10, but newer versions may be okay.') |