Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g.proj: fix wkt output on Windows #3306

Merged
merged 2 commits into from
Dec 15, 2023
Merged

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 added the backport to 8.3 PR needs to be backported to release branch 8.3 label Dec 15, 2023
@petrasovaa petrasovaa merged commit 2841c5f into OSGeo:main Dec 15, 2023
18 checks passed
@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 removed the backport to 8.3 PR needs to be backported to release branch 8.3 label Dec 17, 2023
@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