Bug #71115 mysql_plugin testcase broken with out of source builds
Submitted: 9 Dec 2013 7:26 Modified: 9 Dec 2013 9:29
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.7.3 OS:Any
Assigned to: CPU Architecture:Any
Tags: mtr

[9 Dec 2013 7:26] Laurynas Biveinis
mysql_plugin testcase is broken with out of source builds because it searches for the daemon_example.ini file in the build or installed server directory, while the file is present in the source or installed server directory.  Thus, if testing on source-built server with build != source, it is not found.

This happens because the testcase searches for the file by

  my $daemonexample_ini= "$ENV{DAEMONEXAMPLE_DIR}/daemon_example.ini";
  $daemonexample_ini =~ s,/plugin/debug/,/plugin/,;

Where DAEMONEXAMPLE_DIR is setup by MTR to be build (or installed server) directory.

How to repeat:
mysql-server$ mkdir obj
mysql-server$ cd obj
mysql-server/obj$ cmake ..
mysql-server/obj$ make
mysql-server/obj$ cd mysql-test
mysql-server/obj/mysql-test$ ./mysql-test-run mysql_plugin
main.mysql_plugin                        [ skipped ]  Test requires known location of daemon_example.ini file.

Suggested fix:
Not sure. Either copy the file to build dir during the build, either look for it in both locations in the testcase.
[9 Dec 2013 9:29] Umesh Shastry
Hello Laurynas,

Thank you for the bug report.
Verified as described.