summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorrich prohaska <prohaska@tokutek.com>2013-07-24 11:43:01 -0400
committerrich prohaska <prohaska@tokutek.com>2013-07-24 11:43:01 -0400
commitc88937f1a74c6396b13409330dae171cdbf18412 (patch)
tree7004726e35f49d428cfbb477dd2bbfa52ce8e181 /scripts
parentfbb99837199e6d54a7df1b6e649ec394da585e65 (diff)
downloadmariadb-git-c88937f1a74c6396b13409330dae171cdbf18412.tar.gz
#45 test build from source tarballs
Diffstat (limited to 'scripts')
-rw-r--r--scripts/testbuildfromsrc.bash32
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/testbuildfromsrc.bash b/scripts/testbuildfromsrc.bash
new file mode 100644
index 00000000000..136841ea284
--- /dev/null
+++ b/scripts/testbuildfromsrc.bash
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+# for all source tarballs and their coresponding md5 files, build a binary release tarball
+
+system=$(uname -s|tr [:upper:] [:lower:])
+arch=$(uname -m)
+
+function expand() {
+ echo $* | tr ,: " "
+}
+
+for f in *.md5; do
+ if [[ $f =~ (.*).tar.gz.md5 ]] ; then
+ mysqlsrc=${BASH_REMATCH[1]}
+ else
+ exit 1
+ fi
+ if [ -d $mysqlsrc ] ; then continue; fi
+ md5sum --check $mysqlsrc.tar.gz.md5
+ if [ $? != 0 ] ; then exit 1; fi
+ tar xzf $mysqlsrc.tar.gz
+ if [ $? != 0 ] ; then exit 1; fi
+ mkdir $mysqlsrc/build.RelWithDebInfo
+ pushd $mysqlsrc/build.RelWithDebInfo
+ if [ $? != 0 ] ; then exit 1; fi
+ cmake -D BUILD_CONFIG=mysql_release -D CMAKE_BUILD_TYPE=RelWithDebInfo -D BUILD_TESTING=OFF ..
+ if [ $? != 0 ] ; then exit 1; fi
+ make -j4 package
+ if [ $? != 0 ] ; then exit 1; fi
+ if [ ! -f $mysqlsrc-$system-$arch.tar.gz ] ; then exit 1; fi
+ popd
+done