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
Assorted fixes: Makefile, tests, gie enhancement, Travis-CI simplification #1088
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ab005c6
nad/Makefile.am: add null.lla to EXTRA_DIST
rouault e7cb0ca
gie: add a require_grid keyword, and use if for DHDN_ETRS89.gie; aso …
rouault 6f3df8c
travis/install.sh: make sure to run tests without grids, and remove a…
rouault 0535414
Document require_grid option
rouault File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,7 +149,7 @@ static ffio *ffio_create (const char **tags, size_t n_tags, size_t max_record_si | |
|
||
static const char *gie_tags[] = { | ||
"<gie>", "operation", "accept", "expect", "roundtrip", "banner", "verbose", | ||
"direction", "tolerance", "ignore", "builtins", "echo", "skip", "</gie>" | ||
"direction", "tolerance", "ignore", "require_grid", "builtins", "echo", "skip", "</gie>" | ||
}; | ||
|
||
static const size_t n_gie_tags = sizeof gie_tags / sizeof gie_tags[0]; | ||
|
@@ -187,6 +187,7 @@ typedef struct { | |
size_t dimensions_given, dimensions_given_at_last_accept; | ||
double tolerance; | ||
int ignore; | ||
int skip_test; | ||
const char *curr_file; | ||
FILE *fout; | ||
} gie_ctx; | ||
|
@@ -516,6 +517,20 @@ static int ignore (const char *args) { | |
return 0; | ||
} | ||
|
||
static int require_grid (const char *args) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a great idea! Previously we've handled missing grids by adding |
||
PJ_GRID_INFO grid_info; | ||
const char* grid_filename = column (args, 1); | ||
grid_info = proj_grid_info(grid_filename); | ||
if( strlen(grid_info.filename) == 0 ) { | ||
if (T.verbosity > 1) { | ||
fprintf (T.fout, "Test skipped because of missing grid %s\n", | ||
grid_filename); | ||
} | ||
T.skip_test = 1; | ||
} | ||
return 0; | ||
} | ||
|
||
static int direction (const char *args) { | ||
const char *endp = args; | ||
while (isspace (*endp)) | ||
|
@@ -571,6 +586,7 @@ either a conversion or a transformation) | |
T.op_ok = 0; | ||
T.op_ko = 0; | ||
T.op_skip = 0; | ||
T.skip_test = 0; | ||
|
||
direction ("forward"); | ||
tolerance ("0.5 mm"); | ||
|
@@ -1034,6 +1050,11 @@ static int dispatch (const char *cmnd, const char *args) { | |
if (T.skip) | ||
return SKIP; | ||
if (0==strcmp (cmnd, "operation")) return operation ((char *) args); | ||
if (T.skip_test) | ||
{ | ||
if (0==strcmp (cmnd, "expect")) return another_skip(); | ||
return 0; | ||
} | ||
if (0==strcmp (cmnd, "accept")) return accept (args); | ||
if (0==strcmp (cmnd, "expect")) return expect (args); | ||
if (0==strcmp (cmnd, "roundtrip")) return roundtrip (args); | ||
|
@@ -1042,6 +1063,7 @@ static int dispatch (const char *cmnd, const char *args) { | |
if (0==strcmp (cmnd, "direction")) return direction (args); | ||
if (0==strcmp (cmnd, "tolerance")) return tolerance (args); | ||
if (0==strcmp (cmnd, "ignore")) return ignore (args); | ||
if (0==strcmp (cmnd, "require_grid")) return require_grid (args); | ||
if (0==strcmp (cmnd, "builtins")) return builtins (args); | ||
if (0==strcmp (cmnd, "echo")) return echo (args); | ||
if (0==strcmp (cmnd, "skip")) return skip (args); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reasoning behind including it here? The
null
grid is included in the grid distributions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reasoning is that null.lla is in git, and if we don't had it in EXTRA_DIST it is not part of the generated tarball by make dist. And thus if someone use the tarball and does "make check" without downloading the grids, it won't get the null grid (since 'make' in nad create null from null.lla) and that causes a number of test failures. I think it is reasonable to have the tiny null grid generated by proj itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right. I agree, it is reasonable to include it.