1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 13:09:50 +00:00

oeqa/sdk: Updates sanity tests for minimal eSDK

Updates sanity tests to cope with minimal eSDK installer
1. Skips the validation of sanity if packagegroup-cross-canadian is in
host package.
2. Skips if SDK does not include toolchain at cases/devtool.py

This should fix [YOCTO #10794]

(From OE-Core rev: 59a99cd8661af594ee0c33e086578d29d50a6268)

Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Francisco Pedraza
2017-01-25 11:07:34 -06:00
committed by Richard Purdie
parent 2e77eff6cc
commit aca3afcb59
3 changed files with 19 additions and 0 deletions
+5
View File
@@ -1,3 +1,4 @@
import unittest
from oeqa.sdk.case import OESDKTestCase from oeqa.sdk.case import OESDKTestCase
from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
@@ -13,6 +14,10 @@ class BuildCvsTest(OESDKTestCase):
self.tc.sdk_dir, self.td['DATETIME'], dl_dir=dl_dir) self.tc.sdk_dir, self.td['DATETIME'], dl_dir=dl_dir)
self.project.download_archive() self.project.download_archive()
machine = self.td.get("MACHINE")
if not self.tc.hasHostPackage("packagegroup-cross-canadian-%s" % machine):
raise unittest.SkipTest("SDK doesn't contain a cross-canadian toolchain")
def test_cvs(self): def test_cvs(self):
self.assertEqual(self.project.run_configure(), 0, self.assertEqual(self.project.run_configure(), 0,
msg="Running configure failed") msg="Running configure failed")
+7
View File
@@ -1,6 +1,8 @@
import unittest
from oeqa.sdk.case import OESDKTestCase from oeqa.sdk.case import OESDKTestCase
from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
class BuildIptablesTest(OESDKTestCase): class BuildIptablesTest(OESDKTestCase):
td_vars = ['DATETIME'] td_vars = ['DATETIME']
@@ -13,6 +15,11 @@ class BuildIptablesTest(OESDKTestCase):
self.tc.sdk_dir, self.td['DATETIME'], dl_dir=dl_dir) self.tc.sdk_dir, self.td['DATETIME'], dl_dir=dl_dir)
self.project.download_archive() self.project.download_archive()
machine = self.td.get("MACHINE")
if not self.tc.hasHostPackage("packagegroup-cross-canadian-%s" % machine):
raise unittest.SkipTest("SDK doesn't contain a cross-canadian toolchain")
def test_iptables(self): def test_iptables(self):
self.assertEqual(self.project.run_configure(), 0, self.assertEqual(self.project.run_configure(), 0,
msg="Running configure failed") msg="Running configure failed")
+7
View File
@@ -7,6 +7,7 @@ import subprocess
from oeqa.sdkext.case import OESDKExtTestCase from oeqa.sdkext.case import OESDKExtTestCase
from oeqa.core.decorator.depends import OETestDepends from oeqa.core.decorator.depends import OETestDepends
from oeqa.core.decorator.oeid import OETestID from oeqa.core.decorator.oeid import OETestID
from oeqa.core.decorator.data import skipIfNotDataVar
class DevtoolTest(OESDKExtTestCase): class DevtoolTest(OESDKExtTestCase):
@classmethod @classmethod
@@ -51,21 +52,25 @@ class DevtoolTest(OESDKExtTestCase):
@OETestID(1473) @OETestID(1473)
@OETestDepends(['test_devtool_location']) @OETestDepends(['test_devtool_location'])
@skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain')
def test_devtool_build_make(self): def test_devtool_build_make(self):
self._test_devtool_build(self.myapp_dst) self._test_devtool_build(self.myapp_dst)
@OETestID(1474) @OETestID(1474)
@OETestDepends(['test_devtool_location']) @OETestDepends(['test_devtool_location'])
@skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain')
def test_devtool_build_esdk_package(self): def test_devtool_build_esdk_package(self):
self._test_devtool_build_package(self.myapp_dst) self._test_devtool_build_package(self.myapp_dst)
@OETestID(1479) @OETestID(1479)
@OETestDepends(['test_devtool_location']) @OETestDepends(['test_devtool_location'])
@skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain')
def test_devtool_build_cmake(self): def test_devtool_build_cmake(self):
self._test_devtool_build(self.myapp_cmake_dst) self._test_devtool_build(self.myapp_cmake_dst)
@OETestID(1482) @OETestID(1482)
@OETestDepends(['test_devtool_location']) @OETestDepends(['test_devtool_location'])
@skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain')
def test_extend_autotools_recipe_creation(self): def test_extend_autotools_recipe_creation(self):
req = 'https://github.com/rdfa/librdfa' req = 'https://github.com/rdfa/librdfa'
recipe = "bbexample" recipe = "bbexample"
@@ -80,6 +85,7 @@ class DevtoolTest(OESDKExtTestCase):
@OETestID(1484) @OETestID(1484)
@OETestDepends(['test_devtool_location']) @OETestDepends(['test_devtool_location'])
@skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain')
def test_devtool_kernelmodule(self): def test_devtool_kernelmodule(self):
docfile = 'https://github.com/umlaeute/v4l2loopback.git' docfile = 'https://github.com/umlaeute/v4l2loopback.git'
recipe = 'v4l2loopback-driver' recipe = 'v4l2loopback-driver'
@@ -94,6 +100,7 @@ class DevtoolTest(OESDKExtTestCase):
@OETestID(1478) @OETestID(1478)
@OETestDepends(['test_devtool_location']) @OETestDepends(['test_devtool_location'])
@skipIfNotDataVar('SDK_INCLUDE_TOOLCHAIN', '1', 'SDK does not include toolchain')
def test_recipes_for_nodejs(self): def test_recipes_for_nodejs(self):
package_nodejs = "npm://registry.npmjs.org;name=winston;version=2.2.0" package_nodejs = "npm://registry.npmjs.org;name=winston;version=2.2.0"
self._run('devtool add %s ' % package_nodejs) self._run('devtool add %s ' % package_nodejs)