Enhance Test Framework to be able to run a single test.#391
Enhance Test Framework to be able to run a single test.#391rhou1 wants to merge 1 commit intomapr:masterfrom
Conversation
The -s option can now support a mixture of test suites and individual query files, separated by commas. If the individual query file does not have a json definition file in the same directory, the Test Framework will check the parent directories until it finds at least one JSON file, at which time it assumes that one of those JSON files can be used.
|
Chun, please take a look. |
|
Hey this is really cool! Thanks for adding this |
|
Does this handle cases when there are more than one test def JSON files in the folder? |
|
Yes, this supports having multiple JSON definition files in the same folder. This is how I discovered the query file extension is not quite correct, because I was picking the wrong JSON file. |
|
cool, thanks! I'd like to try this out sometime. |
| List<File> jsonFiles = searchFiles(singleTestFile.getParentFile(), ".*.json"); | ||
| if (jsonFiles.isEmpty()) { | ||
| String updir = ""; | ||
| while (jsonFiles.isEmpty()) { |
There was a problem hiding this comment.
What happens if you never encounter a test definition file in any of the upstream directories?
| } | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Can you test the following scenarios:
- -s .../dir contains test definition file and sudirs containing .json
- -s .../test_definition_file.json
- -s .../test_query.q
- -s .../dir without any test definition files in any of the dir and parent dirs
There was a problem hiding this comment.
Do we need to specify the relative path to the test, including the file extension?
There was a problem hiding this comment.
What does the "..." do?
- how is .json different from test definition file?
- are there any files besides test_definition_file.json in the directory?
There was a problem hiding this comment.
@agirish. Yes. Previously we would say
-s Functional/p1tests
Now we can say
-s Functional/p1tests/is_null.q
The -s option can now support a mixture of test suites and individual query files,
separated by commas. If the individual query file does not have a json definition
file in the same directory, the Test Framework will check the parent directories
until it finds at least one JSON file, at which time it assumes that one of those
JSON files can be used.