summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/sdk/cases/maturin.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/meta/lib/oeqa/sdk/cases/maturin.py b/meta/lib/oeqa/sdk/cases/maturin.py
index 83d13c4ec5..e3e8edc781 100644
--- a/meta/lib/oeqa/sdk/cases/maturin.py
+++ b/meta/lib/oeqa/sdk/cases/maturin.py
@@ -30,17 +30,6 @@ class MaturinTest(OESDKTestCase):
30 self.assertIn(expected, output) 30 self.assertIn(expected, output)
31 31
32class MaturinDevelopTest(OESDKTestCase): 32class MaturinDevelopTest(OESDKTestCase):
33 @classmethod
34 def setUpClass(self):
35 targetdir = os.path.join(self.tc.sdk_dir, "guessing-game")
36 try:
37 shutil.rmtree(targetdir)
38 except FileNotFoundError:
39 pass
40 shutil.copytree(
41 os.path.join(self.tc.files_dir, "maturin/guessing-game"), targetdir
42 )
43
44 def setUp(self): 33 def setUp(self):
45 machine = self.td.get("MACHINE") 34 machine = self.td.get("MACHINE")
46 self.ensure_host_package("python3-maturin") 35 self.ensure_host_package("python3-maturin")
@@ -58,9 +47,17 @@ class MaturinDevelopTest(OESDKTestCase):
58 (1) that a .venv can been created. 47 (1) that a .venv can been created.
59 (2) a functional 'rustc' and 'cargo' 48 (2) a functional 'rustc' and 'cargo'
60 """ 49 """
61 self._run("cd %s/guessing-game; python3 -m venv .venv" % self.tc.sdk_dir) 50 targetdir = os.path.join(self.tc.sdk_dir, "guessing-game")
62 cmd = "cd %s/guessing-game; maturin develop" % self.tc.sdk_dir 51 try:
63 output = self._run(cmd) 52 shutil.rmtree(targetdir)
53 except FileNotFoundError:
54 pass
55 shutil.copytree(
56 os.path.join(self.tc.files_dir, "maturin/guessing-game"), targetdir
57 )
58
59 self._run("cd %s; python3 -m venv .venv" % targetdir)
60 output = self._run("cd %s; maturin develop" % targetdir)
64 self.assertRegex(output, r"🔗 Found pyo3 bindings with abi3 support for Python ≥ 3.8") 61 self.assertRegex(output, r"🔗 Found pyo3 bindings with abi3 support for Python ≥ 3.8")
65 self.assertRegex(output, r"🐍 Not using a specific python interpreter") 62 self.assertRegex(output, r"🐍 Not using a specific python interpreter")
66 self.assertRegex(output, r"📡 Using build options features from pyproject.toml") 63 self.assertRegex(output, r"📡 Using build options features from pyproject.toml")