dvaneeden@dve-carbon:~/dev/pingcap/mysql-tester$ cat t/source.test
--echo first line
--source include/hello.inc
--echo last line
dvaneeden@dve-carbon:~/dev/pingcap/mysql-tester$ cat include/hello.inc
--echo Hello from the included file
dvaneeden@dve-carbon:~/dev/pingcap/mysql-tester$ cat r/source.result
first line
Hello from the included file
last line
A lot of places that only reported the line number, these should now report <file>:<line> instead.
This improves compatibility with the official MySQL test runner from Oracle
This has the potential to break existing tests that were defined with --source, but never actually ran the included files or tested for their presence.
This tries to restrict including random files (/etc/password, etc)
This does not prevent against including files in include files and causing endless loops etc
This disables --source by default and emits a warning like this:
WARN[0000] source command disabled, add '--enable_source' to your file to enable line="./t/source.test:8"
So when porting tests one has to add --enable-source to the top of the file. It would probably good to change this in the future to make it enabled by default and require --disable-source to disable it for files where it breaks (or remove /fix the --source lines)
<file>:<line>
instead.--source
, but never actually ran the included files or tested for their presence./etc/password
, etc)Related:
source file_name
)Existing tests
This disables
--source
by default and emits a warning like this:So when porting tests one has to add
--enable-source
to the top of the file. It would probably good to change this in the future to make it enabled by default and require--disable-source
to disable it for files where it breaks (or remove /fix the--source
lines)