• unknown's avatar
    WL#3935 Improve mysqltest report and exitcode for diff · 2cedc54d
    unknown authored
     - Move the code to generate test report to the test tool(in this
       case mysqltest) where the best control of what failed is
    - Simplify the code in mysql-test-run.pl
    - mysqltest will now find what diff to use in a best effort attempt
      using "diff -u", "diff -c" and finally dumping the two files verbatim
      in the report.
    
    
    client/mysqltest.c:
      - Add new option --tail-lines indicating how many lines of the result to output
        when generating report for a failure
      - Remove eval_result, noone knows what it should do and it's not used.
      - Add support for best effort execution of systems builtin "diff",
        try with "diff -u" and "diff -c" and if that fails dump the whole content
         of teh two files to report
      - Use one common function when comapring two files, used when test 
        has completed and the result should be compared to the .result file
        as well as using it from myqltest's builtin diff_files command.
      - Output the last lines og the result so far  in the report that mysqltest
        generates in case of a test failure.
    mysql-test/lib/mtr_report.pl:
      - Remove code for generating diff between .reject and .result file,
        that is handled by mysqltest(or the test tool) from now on.
      - Add better comments
    mysql-test/mysql-test-run.pl:
      - Remove the --udiff flag to mysql-test-run.pl, if the systems diff supports
        unified diff it will be used automatically
      - Remove the code for "mtr_show_failed_diff", the report from mysqltest
        will know include the diff so if mysqltest(or another test tool)
        fails, just display it's report what went wrong
      - Pass --tail-lines=20 to mysqltest to it will shos the last 20 lines 
        from the result in the report in case of failure.	
    mysql-test/r/mysqltest.result:
      Update result file now when the output from mysqltest has been sent to /dev/null
    mysql-test/t/mysqltest.test:
      - Improve tests for --diff_files
      - Remove temporary files in var/tmp generated in the fly
      - Send output from test for --diff_files to /deb/null since only the error
        code it returns are of interest and tyhe outpu may vary depending
        on what builtin diff is being used.
    2cedc54d
mysqltest.result 24 KB