Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7359

Tests no longer run in a out of source build due to missing replace utiltiy

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.41
    • Fix Version/s: 5.5.42
    • Component/s: Tests
    • Labels:
      None
    • Environment:
      Gentoo

      Description

      When i run the tests from inside the cmake BUILD_DIR (out of source), mtr can no longer find the replace utility.

      mysql-test-run: *** ERROR: Could not find any of /var/tmp/portage/dev-db/mariadb-5.5.41/work/mysql/extra/replace /var/tmp/portage/dev-db/mariadb-5.5.41/work/mariadb-5.5.41_build/client/replace

      replace is built into ${BUILD_DIR}/extra, while mtr is searching in ${BUILD_DIR}/client (or ${S}/extra for in-source builds.. not default)

      This seems to be a result of the merge upstream:
      https://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/4393/mysql-test/mysql-test-run.pl#mysql-test/mysql-test-run.pl

      # ----------------------------------------------------
      # replace
      # ----------------------------------------------------
      my $exe_replace= mtr_exe_exists(vs_config_dirs('extra', 'replace'),
                                       "$basedir/extra/replace",
                                       "$path_client_bindir/replace");
        $ENV{'REPLACE'}= native_path($exe_replace);
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              It works in upstream MySQL, though.
              The difference is in vs_config_dirs subroutine.

              In MySQL, it returns 4 paths:

                return ("$bindir/$path_part/Release/$exe",
                        "$bindir/$path_part/RelWithDebinfo/$exe",
                        "$bindir/$path_part/Debug/$exe",
                        "$bindir/$path_part/$exe");
              

              in MariaDB, there are only 3:

                return ("$basedir/$path_part/release/$exe",
                        "$basedir/$path_part/relwithdebinfo/$exe",
                        "$basedir/$path_part/debug/$exe");
              

              The last path in MySQL's version is where replace actually is.

              Show
              elenst Elena Stepanova added a comment - It works in upstream MySQL, though. The difference is in vs_config_dirs subroutine. In MySQL, it returns 4 paths: return ("$bindir/$path_part/Release/$exe", "$bindir/$path_part/RelWithDebinfo/$exe", "$bindir/$path_part/Debug/$exe", "$bindir/$path_part/$exe"); in MariaDB, there are only 3: return ("$basedir/$path_part/release/$exe", "$basedir/$path_part/relwithdebinfo/$exe", "$basedir/$path_part/debug/$exe"); The last path in MySQL's version is where replace actually is.
              Hide
              otto Otto Kekäläinen added a comment -

              I bumped into the same issue when packaging an 5.5.40 -> 5.5.41 upgrade for Ubuntu, see log at http://paste.debian.net/138376/

              I tried the fix above, using both $basedir and $bindir, but those didn't have any effect. So I ended up with this patch: https://github.com/ottok/mariadb-5.5/commit/e06840b

              Now it works (or at least for me): http://labs.seravo.fi/~otto/mariadb-repo/mariadb-5.5-sid-amd64/mariadb-5.5_5.5.41-1_amd64.build-e06840b-pbuilder.log

              Show
              otto Otto Kekäläinen added a comment - I bumped into the same issue when packaging an 5.5.40 -> 5.5.41 upgrade for Ubuntu, see log at http://paste.debian.net/138376/ I tried the fix above, using both $basedir and $bindir, but those didn't have any effect. So I ended up with this patch: https://github.com/ottok/mariadb-5.5/commit/e06840b Now it works (or at least for me): http://labs.seravo.fi/~otto/mariadb-repo/mariadb-5.5-sid-amd64/mariadb-5.5_5.5.41-1_amd64.build-e06840b-pbuilder.log
              Hide
              elenst Elena Stepanova added a comment - - edited

              For clarification, my comment above was not a fix, it was an observation regarding why MySQL's version works, while MariaDB's fails. I chose not to fix it, because I didn't know (right away) what caused MySQL's version have $bindir there, while MariaDB's one has $basedir. I can dig into it, but I thought Sergei Golubchik might know it already if the changes were his.

              I did hope that the workaround with adding the extra line would work, though..

              Show
              elenst Elena Stepanova added a comment - - edited For clarification, my comment above was not a fix, it was an observation regarding why MySQL's version works, while MariaDB's fails. I chose not to fix it, because I didn't know (right away) what caused MySQL's version have $bindir there, while MariaDB's one has $basedir. I can dig into it, but I thought Sergei Golubchik might know it already if the changes were his. I did hope that the workaround with adding the extra line would work, though..
              Hide
              elenst Elena Stepanova added a comment -

              The problem was fixed in this revision: http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/4399 (apparently as a side change)

              === modified file 'mysql-test/mysql-test-run.pl'
              --- mysql-test/mysql-test-run.pl	2014-12-19 10:35:44 +0000
              +++ mysql-test/mysql-test-run.pl	2015-01-06 15:32:41 +0000
              @@ -2495,6 +2495,7 @@
                 # ----------------------------------------------------
                 my $exe_replace= mtr_exe_exists(vs_config_dirs('extra', 'replace'),
                                                "$basedir/extra/replace",
              +                                 "$bindir/extra$opt_vs_config/replace",
                                                "$path_client_bindir/replace");
                 $ENV{'REPLACE'}= native_path($exe_replace);
              
              Show
              elenst Elena Stepanova added a comment - The problem was fixed in this revision: http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/4399 (apparently as a side change) === modified file 'mysql-test/mysql-test-run.pl' --- mysql-test/mysql-test-run.pl 2014-12-19 10:35:44 +0000 +++ mysql-test/mysql-test-run.pl 2015-01-06 15:32:41 +0000 @@ -2495,6 +2495,7 @@ # ---------------------------------------------------- my $exe_replace= mtr_exe_exists(vs_config_dirs('extra', 'replace'), "$basedir/extra/replace", + "$bindir/extra$opt_vs_config/replace", "$path_client_bindir/replace"); $ENV{'REPLACE'}= native_path($exe_replace);

                People

                • Assignee:
                  knielsen Kristian Nielsen
                  Reporter:
                  grknight Brian Evans
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: