mirror of
https://git.yoctoproject.org/poky
synced 2026-04-27 03:32:12 +02:00
These two tests are designed to exercise the buildtools-tarball. SanityTests simply verifies that inside the SDK, some commands are used from the SDK. BuildTests creates a new OE build directory and builds virtual/libc to verify that a basic build works correctly. DL_DIR is reused to avoid needless downloading, but sstate is not shared to ensure a build does happen. (From OE-Core rev: 6157d6ffa32d6df383c29d4b6de07feb9d619913) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
23 lines
840 B
Python
23 lines
840 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.assertEquals(os.path.commonprefix((sdk_base, tool_path)), sdk_base)
|