Commit c55ed275 authored by Bjorn Munch's avatar Bjorn Munch

Bug #12373393 PB2 SHOULD ALLOW TO CREATE COLLECTIONS AS SUPER SET OF EXISTING COLLECTIONS

    Let CMake parse files with a ".in" suffix containing includes
    Added default.release.in to replace default.release
    Explained in README
    New patch: replace 'include' with '#include' to avoid accidental matches
parent 21779a32
......@@ -1314,6 +1314,7 @@ mysql-max-4.0.2-alpha-pc-linux-gnu-i686.tar.gz
mysql-test/*.ds?
mysql-test/*.vcproj
mysql-test/.DS_Store
mysql-test/collections/default.release
mysql-test/funcs_1.log
mysql-test/funcs_1.tar
mysql-test/gmon.out
......
......@@ -132,3 +132,26 @@ ADD_CUSTOM_TARGET(test-bt-debug
COMMAND ${MTR_FORCE} --comment=debug --timer --skip-ndbcluster --skip-rpl --report-features ${EXP}
)
# Process .in files with includes in collections/
MACRO(PROCESS_COLLECTION_INCLUDE collin collection)
FILE(STRINGS ${collin} inlines)
FOREACH(line ${inlines})
IF(${line} MATCHES "#include .*")
STRING(REPLACE "#include " "collections/" incfile ${line})
FILE(READ ${incfile} contents)
FILE(APPEND ${collection} "${contents}")
ELSE()
FILE(APPEND ${collection} "${line}\n")
ENDIF()
ENDFOREACH()
ENDMACRO()
FILE(GLOB infiles "collections/*.in")
FOREACH(collin ${infiles})
STRING(REPLACE ".in" "" collection ${collin})
# Only generate file once
IF(NOT EXISTS ${collection})
PROCESS_COLLECTION_INCLUDE(${collin} ${collection})
ENDIF()
ENDFOREACH()
......@@ -28,3 +28,11 @@ these steps:
5) The commands from the collection are run line by line via execv() or
similar system calls. They are not run as a shell script. Shell
expansions are not guaranteed to work and most likely won't.
The directory may contain collections that are "super sets" of others,
identified by a file name suffix ".in". These files may contain lines
"#include <filename>", or lines with mysql-test-run.pl invocations.
CMake will create a new file without the .in suffix where
the include lines are replaced with the contents of the referred
file. Filename is local to the collections directory, and includes do
not nest.
# This file contains the old default.release, the plan is to replace that
# with something like the below (remove space after #):
# include default.daily
# include default.weekly
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=debug --vardir=var-debug --skip-ndbcluster --skip-rpl --report-features --debug-server
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --skip-ndbcluster --report-features
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --skip-ndbcluster --ps-protocol
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment