mirror of
https://git.yoctoproject.org/poky
synced 2026-03-10 01:09:40 +01:00
assertEquals is deprecated since Python 2.7: https://docs.python.org/2/library/unittest.html#deprecated-aliases It throws errors at least on Python 3.12. Replace it by assertEqual. (From OE-Core rev: a20325690a057aa7f71e5a176bfbdc03baac405c) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 68286d0b70cf09a0d2950b48945c9192fb8c8769 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
23 lines
839 B
Python
23 lines
839 B
Python
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
import shutil
|
|
import os.path
|
|
from oeqa.sdk.case import OESDKTestCase
|
|
|
|
class SanityTests(OESDKTestCase):
|
|
def test_tools(self):
|
|
"""
|
|
Test that wget and tar come from the buildtools, not the host. This
|
|
verifies that the buildtools have installed correctly. We can't check
|
|
for gcc as that is only installed by buildtools-extended.
|
|
"""
|
|
for command in ("tar", "wget"):
|
|
# Canonicalise the SDK root
|
|
sdk_base = os.path.realpath(self.tc.sdk_dir)
|
|
# Canonicalise the location of this command
|
|
tool_path = os.path.realpath(self._run("command -v %s" % command).strip())
|
|
# Assert that the tool was found inside the SDK root
|
|
self.assertEqual(os.path.commonprefix((sdk_base, tool_path)), sdk_base)
|