g.extension: fix getting addon directories names without Py/C source code
Fixes #4761.
Looks good. You may consider adding a test for this case!?! Test is included
Looks good. You may consider adding a test for this case!?!
Test is included (I extended it with commit https://github.com/OSGeo/grass/pull/4900/commits/bc19b1f2db7abce629e339fe5164ea9e4588d6bd):
https://github.com/OSGeo/grass/blob/46d2bac400521473ce4afc04077914f2a4aeca17/scripts/g.extension/testsuite/test_addons_download.py#L218-L234
At one point we'll need to think about what to do when html man pages might not be the only thing. When using markdown as source, will the addon install a "compiled" page that will HTML (processed from the markdown), or only the source file?
Looks like the test failed:
======================================================================
FAIL: test_github_download_official_module_src_code_only (__main__.TestModuleDownloadFromDifferentSources)
Test download extension source code only from official addons
----------------------------------------------------------------------
Traceback (most recent call last):
File "scripts/g.extension/testsuite/test_addons_download.py", line 193, in test_github_download_official_module_src_code_only
self.assertTrue(ext_path.exists())
AssertionError: False is not true
----------------------------------------------------------------------
Ran 9 tests in 36.965s
FAILED (failures=1)
========================================================================
FAILED ./scripts/g.extension/testsuite/test_addons_download.py (1 test failed)
I don't know what's wrong in the CI. Locally it doesn't show problems:
cd scripts/g.extension/testsuite/
grass --tmp-project XY --exec python test_addons_download.py
[...]
Ran 9 tests in 64.323s
OK
I don't know what's wrong in the CI. Locally it doesn't show problems:
cd scripts/g.extension/testsuite/ grass --tmp-project XY --exec python test_addons_download.py [...] Ran 9 tests in 64.323s OK
On the local emulator terminal (during tests especially g.extension module) is printed to the stderr GRASS GIS command g.extension module output and debug info too. I enable debug mode beacuse I'm checking some debug variable value f"Addon name <{extension}> which install only HTML man page.", (line 240) https://github.com/OSGeo/grass/pull/4900/commits/bc19b1f2db7abce629e339fe5164ea9e4588d6bd.
Under CI is printed only debug info (not g.extension module output) and therefore this 'test_github_download_official_module_src_code_only' test fails.
On the local emulator terminal (during tests especially g.extension module) is printed to the stderr GRASS GIS command g.extension module output and debug info too. I enable debug mode beacuse I'm checking some debug variable value
f"Addon name <{extension}> which install only HTML man page.",(line 240) bc19b1f.Under CI is printed only debug info (not g.extension module output) and therefore this 'test_github_download_official_module_src_code_only' test fails.
Do we need to modify the CI test?