summaryrefslogtreecommitdiff
path: root/poky/meta/lib/oeqa/sdk
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/lib/oeqa/sdk')
-rw-r--r--poky/meta/lib/oeqa/sdk/buildtools-cases/build.py9
-rw-r--r--poky/meta/lib/oeqa/sdk/buildtools-cases/gcc.py29
-rw-r--r--poky/meta/lib/oeqa/sdk/buildtools-cases/https.py20
3 files changed, 57 insertions, 1 deletions
diff --git a/poky/meta/lib/oeqa/sdk/buildtools-cases/build.py b/poky/meta/lib/oeqa/sdk/buildtools-cases/build.py
index 5a17ab98c..9c9a84bf8 100644
--- a/poky/meta/lib/oeqa/sdk/buildtools-cases/build.py
+++ b/poky/meta/lib/oeqa/sdk/buildtools-cases/build.py
@@ -3,6 +3,7 @@
#
import os, tempfile
+import time
from oeqa.sdk.case import OESDKTestCase
from oeqa.utils.subprocesstweak import errors_have_output
errors_have_output()
@@ -20,4 +21,10 @@ class BuildTests(OESDKTestCase):
conf.write('\n')
conf.write('DL_DIR = "%s"\n' % self.td['DL_DIR'])
- self._run('. %s/oe-init-build-env %s && bitbake virtual/libc' % (corebase, testdir))
+ try:
+ self._run('. %s/oe-init-build-env %s && bitbake virtual/libc' % (corebase, testdir))
+ finally:
+ delay = 10
+ while delay and os.path.exists(testdir + "/bitbake.lock"):
+ time.sleep(1)
+ delay = delay - 1
diff --git a/poky/meta/lib/oeqa/sdk/buildtools-cases/gcc.py b/poky/meta/lib/oeqa/sdk/buildtools-cases/gcc.py
new file mode 100644
index 000000000..36ba15b13
--- /dev/null
+++ b/poky/meta/lib/oeqa/sdk/buildtools-cases/gcc.py
@@ -0,0 +1,29 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+import os.path
+from oeqa.sdk.case import OESDKTestCase
+
+class GccTests(OESDKTestCase):
+ def test_verify_specs(self):
+ """
+ Verify that the compiler has been relocated successfully and isn't
+ looking in the hard-coded prefix.
+ """
+ # Canonicalise the SDK root
+ sdk_base = os.path.realpath(self.tc.sdk_dir)
+ # Canonicalise the location of GCC
+ gcc_path = os.path.realpath(self._run("command -v gcc").strip())
+ # Skip the test if the GCC didn't come from the buildtools, as it only
+ # comes with buildtools-extended-tarball.
+ if os.path.commonprefix((sdk_base, gcc_path)) != sdk_base:
+ self.skipTest("Buildtools does not provide GCC")
+
+ # This is the prefix that GCC is build with, and should be replaced at
+ # installation time.
+ sdkpath = self.td.get("SDKPATH")
+ self.assertTrue(sdkpath)
+
+ for line in self._run('gcc -dumpspecs').splitlines():
+ self.assertNotIn(sdkpath, line)
diff --git a/poky/meta/lib/oeqa/sdk/buildtools-cases/https.py b/poky/meta/lib/oeqa/sdk/buildtools-cases/https.py
new file mode 100644
index 000000000..134879aab
--- /dev/null
+++ b/poky/meta/lib/oeqa/sdk/buildtools-cases/https.py
@@ -0,0 +1,20 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.sdk.case import OESDKTestCase
+from oeqa.utils.subprocesstweak import errors_have_output
+errors_have_output()
+
+class HTTPTests(OESDKTestCase):
+ """
+ Verify that HTTPS certificates are working correctly, as this depends on
+ environment variables being set correctly.
+ """
+
+ def test_wget(self):
+ self._run('env -i wget --debug --output-document /dev/null https://www.example.com')
+
+ def test_python(self):
+ # urlopen() returns a file-like object on success and throws an exception otherwise
+ self._run('python3 -c \'import urllib.request; urllib.request.urlopen("https://www.example.com/")\'')