summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk/buildtools-cases/sanity.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/sdk/buildtools-cases/sanity.py')
-rw-r--r--meta/lib/oeqa/sdk/buildtools-cases/sanity.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/lib/oeqa/sdk/buildtools-cases/sanity.py b/meta/lib/oeqa/sdk/buildtools-cases/sanity.py
new file mode 100644
index 0000000000..a55d456656
--- /dev/null
+++ b/meta/lib/oeqa/sdk/buildtools-cases/sanity.py
@@ -0,0 +1,24 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7import shutil
8import os.path
9from oeqa.sdk.case import OESDKTestCase
10
11class SanityTests(OESDKTestCase):
12 def test_tools(self):
13 """
14 Test that wget and tar come from the buildtools, not the host. This
15 verifies that the buildtools have installed correctly. We can't check
16 for gcc as that is only installed by buildtools-extended.
17 """
18 for command in ("tar", "wget"):
19 # Canonicalise the SDK root
20 sdk_base = os.path.realpath(self.tc.sdk_dir)
21 # Canonicalise the location of this command
22 tool_path = os.path.realpath(self._run("command -v %s" % command).strip())
23 # Assert that the tool was found inside the SDK root
24 self.assertEqual(os.path.commonprefix((sdk_base, tool_path)), sdk_base)