Skip to content

Comments

g.proj: fix wkt output on Windows#3306

Merged
petrasovaa merged 2 commits intoOSGeo:mainfrom
petrasovaa:g.proj-w-test
Dec 15, 2023
Merged

g.proj: fix wkt output on Windows#3306
petrasovaa merged 2 commits intoOSGeo:mainfrom
petrasovaa:g.proj-w-test

Conversation

@petrasovaa
Copy link
Contributor

@petrasovaa petrasovaa commented Dec 14, 2023

This added minimal test of g.proj -w to see whether it fails on Windows and then I added the fix suggested in #1955.

@petrasovaa petrasovaa added the C Related code is in C label Dec 14, 2023
@petrasovaa petrasovaa self-assigned this Dec 14, 2023
@petrasovaa
Copy link
Contributor Author

Windows test before the change:

Running .\general\g.proj\testsuite\test_g_proj.py...
========================================================================
F
======================================================================
FAIL: test_wkt_output (__main__.GProjWKTTestCase)
Test if g.proj returns WKT
----------------------------------------------------------------------
Traceback (most recent call last):
  File "etc\python\grass\gunittest\case.py", line 1390, in assertModule
    module.run()
  File "etc\python\grass\pygrass\modules\interface\module.py", line 806, in run
    self.wait()
grass.exceptions.CalledModuleError: Module run `g.proj datum_trans=0 -w` ended with an error.

The subprocess ended with a non-zero return code: 32[21](https://github.com/OSGeo/grass/actions/runs/7215310826/job/19659296500#step:9:22)[22](https://github.com/OSGeo/grass/actions/runs/7215310826/job/19659296500#step:9:23)6[35](https://github.com/OSGeo/grass/actions/runs/7215310826/job/19659296500#step:9:36)6. See errors above the traceback or in the error output.

After the fix it runs:

Running .\db\db.copy\testsuite\test_dbcopy.py...
Running .\db\db.describe\testsuite\test_dbdescribe.py...
Running .\general\g.list\testsuite\test_g_list.py...
Running .\general\g.proj\testsuite\test_g_proj.py...
Running .\general\g.region\testsuite\test_g_region.py...
Running .\general\g.remove\testsuite\test_g_remove.py...
Running .\general\g.rename\testsuite\test_overwrite.py...

@petrasovaa petrasovaa changed the title g.proj: add test of g.proj -w g.proj: fix wkt output on Windows Dec 15, 2023
@petrasovaa petrasovaa added this to the 8.4.0 milestone Dec 15, 2023
@petrasovaa petrasovaa merged commit 2841c5f into OSGeo:main Dec 15, 2023
@petrasovaa petrasovaa deleted the g.proj-w-test branch December 15, 2023 19:31
@neteler neteler added the windows Microsoft Windows specific label Dec 17, 2023
neteler pushed a commit that referenced this pull request Dec 17, 2023
Follows documentation of exportToWkt: Note that the returned WKT string should be freed with CPLFree() when no longer needed. It is the responsibility of the caller.
@neteler neteler modified the milestones: 8.4.0, 8.3.2 Dec 17, 2023
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Jan 9, 2024
Follows documentation of exportToWkt: Note that the returned WKT string should be freed with CPLFree() when no longer needed. It is the responsibility of the caller.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C Related code is in C windows Microsoft Windows specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] WinGRASS and OSGeo4W g.proj -w fails when not run from shell only

2 participants