Elena Stepanova <elenst@montyprogram.com> writes:
ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),) # Don't know why the following is necessary... cp unittest/unit.pl $(builddir)/unittest/ cp -r mysql-test/* $(builddir)/mysql-test/ cp -r sql/share/* $(builddir)/sql/share/ cp -r scripts/*sql $(builddir)/scripts/ if [ ! -f testsuite-stamp ] ; then \
Recently it started causing a problem. MTR assumes that the tests are run either in a proper source build (be it in-source or out-of-source), or in a binary build. With the extra-copying above, particularly due to copying of mysql-test folder, the builddir by the moment of running tests is in the "neither fish nor fowl" state.
These lines are coming from the initial draft of the rules. I understand from the comment that there is no reason to ask *why* the lines were necessary, but I'm wondering if you remember why you felt they *were* necessary (even if didn't know why). Were you getting some errors without them? Or were they copied from some previous version of the file?
I am pretty sure they were copied from previous version, possibly even also similarly copied by OurDelta from original ancient Debian packaging. Maybe they were used to be able to run mysql-test inside the build directory in the autotools days? Note that in MariaDB, we never ran mysql-test that way, instead we install the mariadb-test-X.Y package and run the tests there (it always seemed a bit silly to me to test the build, not the packages - what is the point of a good build, if it is packaged incorrectly?)
I tried to remove these 4 'cp' lines and the build seemed to work all right; but there might also be consequences that I fail to predict, so I would like to have the 2nd (3rd, 4th, ... Nth) opinion. Does anyone have any idea what might go wrong without these 4 lines?
Well, I can think of two things: 1. It could affect running mysql-test inside the build directory. Well, in fact it does, since you found that it fixes this :-) 2. It could affect what gets installed by `make install` into the mariadb-test-X.Y package. I suggest you check the contents of that package with and without those lines. If the contents is the same, just go ahead and remove it. If anything is missing, probably the lines should be removed anyway, and cmake should be fixed to install things properly. In short, removing sounds fine, it's probably just some left-over crap like so much else of the .deb packaging. - Kristian.