It is sometimes convenient to provide data files to be processed as tests by a custom test runner. It may be inconvenient or impractical to include a test description in such files, and so it may be convenient to nominate a class to use the data file as the basis for a test.
Such data files may even be source code, or some template resembling source code.
This could be supported in jtreg by introducing properties for use in TEST.ROOT or TEST.properties that associate a class and possible arguments with a filename extension.
For example, imagine a property of the form
testrunner.<extn> <classname> <args>
This would find and use a class named <classname> to be invoked with a list of string arguments from <args> and a filepath for all filepaths in that directory or its subdirectories when the filename ends with .<extn>
The class would be searched for in the current directory and any libraries that are in scope with the lib.dirs property.. It would be compiled as if specified in a @build action tag.
Such data files may even be source code, or some template resembling source code.
This could be supported in jtreg by introducing properties for use in TEST.ROOT or TEST.properties that associate a class and possible arguments with a filename extension.
For example, imagine a property of the form
testrunner.<extn> <classname> <args>
This would find and use a class named <classname> to be invoked with a list of string arguments from <args> and a filepath for all filepaths in that directory or its subdirectories when the filename ends with .<extn>
The class would be searched for in the current directory and any libraries that are in scope with the lib.dirs property.. It would be compiled as if specified in a @build action tag.