-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tests): make proto/textproto tests not rely on
jq
(#3967)
unfortunately `jq` is not available in google3, so I changed the tests back to awk for skipping nondeterministic fields and python's json.tool for formatting. Because python's json output is different than jq's, all our golden files had to be updated too.
- Loading branch information
1 parent
eb83475
commit 2898628
Showing
19 changed files
with
550 additions
and
468 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
{ | ||
"required_input": [ | ||
{ | ||
"v_name": { | ||
"corpus": "my_custom_corpus", | ||
"path": "kythe/cxx/extractor/proto/testdata/simple1.proto" | ||
}, | ||
"info": { | ||
"path": "kythe/cxx/extractor/proto/testdata/simple1.proto", | ||
"digest": "36aa2295772636e8e940333faa06f0838953101f353ab52d72279389e16117be" | ||
} | ||
} | ||
], | ||
"argument": [ | ||
"kythe/cxx/extractor/proto/testdata/simple1.proto" | ||
], | ||
"source_file": [ | ||
"kythe/cxx/extractor/proto/testdata/simple1.proto" | ||
] | ||
"argument": [ | ||
"kythe/cxx/extractor/proto/testdata/simple1.proto" | ||
], | ||
"required_input": [ | ||
{ | ||
"info": { | ||
"digest": "36aa2295772636e8e940333faa06f0838953101f353ab52d72279389e16117be", | ||
"path": "kythe/cxx/extractor/proto/testdata/simple1.proto" | ||
}, | ||
"v_name": { | ||
"corpus": "my_custom_corpus", | ||
"path": "kythe/cxx/extractor/proto/testdata/simple1.proto" | ||
} | ||
} | ||
], | ||
"source_file": [ | ||
"kythe/cxx/extractor/proto/testdata/simple1.proto" | ||
], | ||
} |
58 changes: 29 additions & 29 deletions
58
kythe/cxx/extractor/proto/testdata/custom_root_directory.UNIT
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 |
---|---|---|
@@ -1,31 +1,31 @@ | ||
{ | ||
"required_input": [ | ||
{ | ||
"v_name": { | ||
"path": "relative_imports.proto" | ||
}, | ||
"info": { | ||
"path": "relative_imports.proto", | ||
"digest": "c91db27db87695c42ab03479f5393d83fd881c5c4982579b0115a20c36342d2c" | ||
} | ||
}, | ||
{ | ||
"v_name": { | ||
"path": "subdir/other.proto" | ||
}, | ||
"info": { | ||
"path": "subdir/other.proto", | ||
"digest": "c9d3571c48d70781dc7d4984b1b8974f44cb5953c3be17cacacc15f35f5981eb" | ||
} | ||
} | ||
], | ||
"argument": [ | ||
"kythe/cxx/extractor/proto/testdata/relative_imports.proto", | ||
"--", | ||
"--proto_path", | ||
"kythe/cxx/extractor/proto/testdata/subdir" | ||
], | ||
"source_file": [ | ||
"relative_imports.proto" | ||
] | ||
"argument": [ | ||
"kythe/cxx/extractor/proto/testdata/relative_imports.proto", | ||
"--", | ||
"--proto_path", | ||
"kythe/cxx/extractor/proto/testdata/subdir" | ||
], | ||
"required_input": [ | ||
{ | ||
"info": { | ||
"digest": "c91db27db87695c42ab03479f5393d83fd881c5c4982579b0115a20c36342d2c", | ||
"path": "relative_imports.proto" | ||
}, | ||
"v_name": { | ||
"path": "relative_imports.proto" | ||
} | ||
}, | ||
{ | ||
"info": { | ||
"digest": "c9d3571c48d70781dc7d4984b1b8974f44cb5953c3be17cacacc15f35f5981eb", | ||
"path": "subdir/other.proto" | ||
}, | ||
"v_name": { | ||
"path": "subdir/other.proto" | ||
} | ||
} | ||
], | ||
"source_file": [ | ||
"relative_imports.proto" | ||
], | ||
} |
62 changes: 31 additions & 31 deletions
62
kythe/cxx/extractor/proto/testdata/custom_vname_config.UNIT
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 |
---|---|---|
@@ -1,33 +1,33 @@ | ||
{ | ||
"required_input": [ | ||
{ | ||
"v_name": { | ||
"corpus": "corpus1", | ||
"path": "kythe/cxx/extractor/proto/testdata/simple1.proto" | ||
}, | ||
"info": { | ||
"path": "kythe/cxx/extractor/proto/testdata/simple1.proto", | ||
"digest": "36aa2295772636e8e940333faa06f0838953101f353ab52d72279389e16117be" | ||
} | ||
}, | ||
{ | ||
"v_name": { | ||
"corpus": "corpus2", | ||
"root": "kythe/cxx/extractor/proto/testdata", | ||
"path": "simple2.proto" | ||
}, | ||
"info": { | ||
"path": "kythe/cxx/extractor/proto/testdata/simple2.proto", | ||
"digest": "0db133854842fd4a2112176264bb7e596671db36d1d91dcb9910c662278680ae" | ||
} | ||
} | ||
], | ||
"argument": [ | ||
"kythe/cxx/extractor/proto/testdata/simple1.proto", | ||
"kythe/cxx/extractor/proto/testdata/simple2.proto" | ||
], | ||
"source_file": [ | ||
"kythe/cxx/extractor/proto/testdata/simple1.proto", | ||
"kythe/cxx/extractor/proto/testdata/simple2.proto" | ||
] | ||
"argument": [ | ||
"kythe/cxx/extractor/proto/testdata/simple1.proto", | ||
"kythe/cxx/extractor/proto/testdata/simple2.proto" | ||
], | ||
"required_input": [ | ||
{ | ||
"info": { | ||
"digest": "36aa2295772636e8e940333faa06f0838953101f353ab52d72279389e16117be", | ||
"path": "kythe/cxx/extractor/proto/testdata/simple1.proto" | ||
}, | ||
"v_name": { | ||
"corpus": "corpus1", | ||
"path": "kythe/cxx/extractor/proto/testdata/simple1.proto" | ||
} | ||
}, | ||
{ | ||
"info": { | ||
"digest": "0db133854842fd4a2112176264bb7e596671db36d1d91dcb9910c662278680ae", | ||
"path": "kythe/cxx/extractor/proto/testdata/simple2.proto" | ||
}, | ||
"v_name": { | ||
"corpus": "corpus2", | ||
"path": "simple2.proto", | ||
"root": "kythe/cxx/extractor/proto/testdata" | ||
} | ||
} | ||
], | ||
"source_file": [ | ||
"kythe/cxx/extractor/proto/testdata/simple1.proto", | ||
"kythe/cxx/extractor/proto/testdata/simple2.proto" | ||
], | ||
} |
62 changes: 31 additions & 31 deletions
62
kythe/cxx/extractor/proto/testdata/duplicate_imports.UNIT
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 |
---|---|---|
@@ -1,33 +1,33 @@ | ||
{ | ||
"required_input": [ | ||
{ | ||
"v_name": { | ||
"path": "kythe/cxx/extractor/proto/testdata/relative_imports.proto" | ||
}, | ||
"info": { | ||
"path": "kythe/cxx/extractor/proto/testdata/relative_imports.proto", | ||
"digest": "c91db27db87695c42ab03479f5393d83fd881c5c4982579b0115a20c36342d2c" | ||
} | ||
}, | ||
{ | ||
"v_name": { | ||
"path": "kythe/cxx/extractor/proto/testdata/subdir/other.proto" | ||
}, | ||
"info": { | ||
"path": "kythe/cxx/extractor/proto/testdata/subdir/other.proto", | ||
"digest": "c9d3571c48d70781dc7d4984b1b8974f44cb5953c3be17cacacc15f35f5981eb" | ||
} | ||
} | ||
], | ||
"argument": [ | ||
"kythe/cxx/extractor/proto/testdata/relative_imports.proto", | ||
"kythe/cxx/extractor/proto/testdata/subdir/other.proto", | ||
"--", | ||
"--proto_path", | ||
"kythe/cxx/extractor/proto/testdata/subdir" | ||
], | ||
"source_file": [ | ||
"kythe/cxx/extractor/proto/testdata/relative_imports.proto", | ||
"kythe/cxx/extractor/proto/testdata/subdir/other.proto" | ||
] | ||
"argument": [ | ||
"kythe/cxx/extractor/proto/testdata/relative_imports.proto", | ||
"kythe/cxx/extractor/proto/testdata/subdir/other.proto", | ||
"--", | ||
"--proto_path", | ||
"kythe/cxx/extractor/proto/testdata/subdir" | ||
], | ||
"required_input": [ | ||
{ | ||
"info": { | ||
"digest": "c91db27db87695c42ab03479f5393d83fd881c5c4982579b0115a20c36342d2c", | ||
"path": "kythe/cxx/extractor/proto/testdata/relative_imports.proto" | ||
}, | ||
"v_name": { | ||
"path": "kythe/cxx/extractor/proto/testdata/relative_imports.proto" | ||
} | ||
}, | ||
{ | ||
"info": { | ||
"digest": "c9d3571c48d70781dc7d4984b1b8974f44cb5953c3be17cacacc15f35f5981eb", | ||
"path": "kythe/cxx/extractor/proto/testdata/subdir/other.proto" | ||
}, | ||
"v_name": { | ||
"path": "kythe/cxx/extractor/proto/testdata/subdir/other.proto" | ||
} | ||
} | ||
], | ||
"source_file": [ | ||
"kythe/cxx/extractor/proto/testdata/relative_imports.proto", | ||
"kythe/cxx/extractor/proto/testdata/subdir/other.proto" | ||
], | ||
} |
62 changes: 31 additions & 31 deletions
62
kythe/cxx/extractor/proto/testdata/duplicate_imports2.UNIT
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 |
---|---|---|
@@ -1,33 +1,33 @@ | ||
{ | ||
"required_input": [ | ||
{ | ||
"v_name": { | ||
"path": "kythe/cxx/extractor/proto/testdata/relative_imports.proto" | ||
}, | ||
"info": { | ||
"path": "kythe/cxx/extractor/proto/testdata/relative_imports.proto", | ||
"digest": "c91db27db87695c42ab03479f5393d83fd881c5c4982579b0115a20c36342d2c" | ||
} | ||
}, | ||
{ | ||
"v_name": { | ||
"path": "kythe/cxx/extractor/proto/testdata/subdir/other.proto" | ||
}, | ||
"info": { | ||
"path": "kythe/cxx/extractor/proto/testdata/subdir/other.proto", | ||
"digest": "c9d3571c48d70781dc7d4984b1b8974f44cb5953c3be17cacacc15f35f5981eb" | ||
} | ||
} | ||
], | ||
"argument": [ | ||
"kythe/cxx/extractor/proto/testdata/subdir/other.proto", | ||
"kythe/cxx/extractor/proto/testdata/relative_imports.proto", | ||
"--", | ||
"--proto_path", | ||
"kythe/cxx/extractor/proto/testdata/subdir" | ||
], | ||
"source_file": [ | ||
"kythe/cxx/extractor/proto/testdata/subdir/other.proto", | ||
"kythe/cxx/extractor/proto/testdata/relative_imports.proto" | ||
] | ||
"argument": [ | ||
"kythe/cxx/extractor/proto/testdata/subdir/other.proto", | ||
"kythe/cxx/extractor/proto/testdata/relative_imports.proto", | ||
"--", | ||
"--proto_path", | ||
"kythe/cxx/extractor/proto/testdata/subdir" | ||
], | ||
"required_input": [ | ||
{ | ||
"info": { | ||
"digest": "c91db27db87695c42ab03479f5393d83fd881c5c4982579b0115a20c36342d2c", | ||
"path": "kythe/cxx/extractor/proto/testdata/relative_imports.proto" | ||
}, | ||
"v_name": { | ||
"path": "kythe/cxx/extractor/proto/testdata/relative_imports.proto" | ||
} | ||
}, | ||
{ | ||
"info": { | ||
"digest": "c9d3571c48d70781dc7d4984b1b8974f44cb5953c3be17cacacc15f35f5981eb", | ||
"path": "kythe/cxx/extractor/proto/testdata/subdir/other.proto" | ||
}, | ||
"v_name": { | ||
"path": "kythe/cxx/extractor/proto/testdata/subdir/other.proto" | ||
} | ||
} | ||
], | ||
"source_file": [ | ||
"kythe/cxx/extractor/proto/testdata/subdir/other.proto", | ||
"kythe/cxx/extractor/proto/testdata/relative_imports.proto" | ||
], | ||
} |
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
Oops, something went wrong.