未验证 提交 1a358266 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #2100 from taosdata/feature/sangshuduo/perftest-script-improve

determine if TDengine need pull and recompile
...@@ -31,12 +31,26 @@ function collectSysInfo { ...@@ -31,12 +31,26 @@ function collectSysInfo {
function buildTDengine { function buildTDengine {
cd /root/TDengine cd /root/TDengine
git pull
cd debug git remote update
rm -rf * REMOTE_COMMIT=`git rev-parse --short remotes/origin/develop`
cmake .. LOCAL_COMMIT=`git rev-parse --short @`
make > /dev/null
make install echo " LOCAL: $LOCAL_COMMIT"
echo "REMOTE: $REMOTE_COMMIT"
if [ "$LOCAL_COMMIT" == "$REMOTE_COMMIT" ]; then
echo "repo up-to-date"
else
echo "repo need to pull"
git pull
LOCAL_COMMIT=`git rev-parse @`
cd debug
rm -rf *
cmake ..
make > /dev/null
make install
fi
} }
function restartTaosd { function restartTaosd {
...@@ -55,7 +69,7 @@ function sendReport { ...@@ -55,7 +69,7 @@ function sendReport {
receiver="sdsang@taosdata.com, sangshuduo@gmail.com" receiver="sdsang@taosdata.com, sangshuduo@gmail.com"
mimebody="MIME-Version: 1.0\nContent-Type: text/html; charset=utf-8\n" mimebody="MIME-Version: 1.0\nContent-Type: text/html; charset=utf-8\n"
echo -e "to: ${receiver}\nsubject: Perf test report ${today}\n" | \ echo -e "to: ${receiver}\nsubject: Perf test report ${today}, commit ID: ${LOCAL_COMMIT}\n" | \
(cat - && uuencode perftest-1d-$today.log perftest-1d-$today.log)| \ (cat - && uuencode perftest-1d-$today.log perftest-1d-$today.log)| \
(cat - && uuencode perftest-1d-report.csv perftest-1d-report-$today.csv) | \ (cat - && uuencode perftest-1d-report.csv perftest-1d-report-$today.csv) | \
(cat - && uuencode perftest-1d-report.png perftest-1d-report-$today.png) | \ (cat - && uuencode perftest-1d-report.png perftest-1d-report-$today.png) | \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册