|
23 | 23 | sys.path.append('..') |
24 | 24 | import idf_tools |
25 | 25 |
|
26 | | -IDF_PATH = os.environ.get('IDF_PATH', '../..') |
| 26 | +IDF_PATH = os.path.abspath(os.environ.get('IDF_PATH', '../..')) |
27 | 27 | TOOLS_DIR = os.environ.get('IDF_TOOLS_PATH') or os.path.expanduser(idf_tools.IDF_TOOLS_PATH_DEFAULT) |
28 | 28 | PYTHON_DIR = os.path.join(TOOLS_DIR, 'python_env') |
29 | 29 | PYTHON_DIR_BACKUP = tempfile.mkdtemp() |
|
32 | 32 | # Python 3.8 and 3.9 has a different error message that does not include the "No package metadata was found for" part |
33 | 33 | REQ_MISSING = r'Package was not found and is required by the application: (No package metadata was found for )?{}' |
34 | 34 | REQ_CORE = '- {}'.format(os.path.join(IDF_PATH, 'tools', 'requirements', 'requirements.core.txt')) |
35 | | -REQ_GDBGUI = '- {}'.format(os.path.join(IDF_PATH, 'tools', 'requirements', 'requirements.gdbgui.txt')) |
| 35 | +REQ_DOCS = '- {}'.format(os.path.join(IDF_PATH, 'tools', 'requirements', 'requirements.docs.txt')) |
36 | 36 | CONSTR = 'Constraint file: {}'.format(os.path.join(TOOLS_DIR, 'espidf.constraints')) |
37 | 37 |
|
38 | 38 | # Set default global paths for idf_tools. If some test needs to |
@@ -191,29 +191,29 @@ def test_default_arguments(self): # type: () -> None |
191 | 191 | output = self.run_idf_tools(['install-python-env']) |
192 | 192 | self.assertIn(CONSTR, output) |
193 | 193 | self.assertIn(REQ_CORE, output) |
194 | | - self.assertNotIn(REQ_GDBGUI, output) |
| 194 | + self.assertNotIn(REQ_DOCS, output) |
195 | 195 |
|
196 | 196 | output = self.run_idf_tools(['check-python-dependencies']) |
197 | 197 | self.assertIn(REQ_SATISFIED, output) |
198 | 198 |
|
199 | 199 | def test_opt_argument(self): # type: () -> None |
200 | | - output = self.run_idf_tools(['install-python-env', '--features', 'gdbgui']) |
| 200 | + output = self.run_idf_tools(['install-python-env', '--features', 'docs']) |
201 | 201 | self.assertIn(CONSTR, output) |
202 | 202 | self.assertIn(REQ_CORE, output) |
203 | | - self.assertIn(REQ_GDBGUI, output) |
| 203 | + self.assertIn(REQ_DOCS, output) |
204 | 204 |
|
205 | 205 | output = self.run_idf_tools(['install-python-env']) |
206 | | - # The gdbgui should be installed as well because the feature is is stored in the JSON file |
| 206 | + # The docs should be installed as well because the feature is is stored in the JSON file |
207 | 207 | self.assertIn(CONSTR, output) |
208 | 208 | self.assertIn(REQ_CORE, output) |
209 | | - self.assertIn(REQ_GDBGUI, output) |
| 209 | + self.assertIn(REQ_DOCS, output) |
210 | 210 |
|
211 | 211 | # Argument that begins with '-' can't stand alone to be parsed as value |
212 | | - output = self.run_idf_tools(['install-python-env', '--features=-gdbgui']) |
213 | | - # After removing the gdbgui should not be present |
| 212 | + output = self.run_idf_tools(['install-python-env', '--features=-docs']) |
| 213 | + # After removing the docs should not be present |
214 | 214 | self.assertIn(CONSTR, output) |
215 | 215 | self.assertIn(REQ_CORE, output) |
216 | | - self.assertNotIn(REQ_GDBGUI, output) |
| 216 | + self.assertNotIn(REQ_DOCS, output) |
217 | 217 |
|
218 | 218 | def test_no_constraints(self): # type: () -> None |
219 | 219 | output = self.run_idf_tools(['install-python-env', '--no-constraints']) |
|
0 commit comments