summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzrignore1
-rw-r--r--mysql-test/CMakeLists.txt23
-rw-r--r--mysql-test/collections/README8
-rw-r--r--mysql-test/collections/default.release.in (renamed from mysql-test/collections/default.release)6
4 files changed, 38 insertions, 0 deletions
diff --git a/.bzrignore b/.bzrignore
index 017c41f2188..36bb062ffff 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -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
diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt
index 655d8e086eb..954e9c44311 100644
--- a/mysql-test/CMakeLists.txt
+++ b/mysql-test/CMakeLists.txt
@@ -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()
diff --git a/mysql-test/collections/README b/mysql-test/collections/README
index 9af84646a40..f64c089ee99 100644
--- a/mysql-test/collections/README
+++ b/mysql-test/collections/README
@@ -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.
diff --git a/mysql-test/collections/default.release b/mysql-test/collections/default.release.in
index 108e1032ca2..0e3ad30671b 100644
--- a/mysql-test/collections/default.release
+++ b/mysql-test/collections/default.release.in
@@ -1,3 +1,9 @@
+# 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