From e3ac8a05239153151f5686ef428225016eee476e Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Wed, 14 Apr 2021 11:04:30 +0800 Subject: [PATCH] [TD-2986]: add demo example into CI --- tests/examples/c/demo.c | 2 +- tests/test-all.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/examples/c/demo.c b/tests/examples/c/demo.c index e074e64966..0b1cd7b5d2 100644 --- a/tests/examples/c/demo.c +++ b/tests/examples/c/demo.c @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) { printf("failed to connect to server, reason:%s\n", "null taos"/*taos_errstr(taos)*/); exit(1); } - for (int i = 0; i < 4000000; i++) { + for (int i = 0; i < 100; i++) { Test(taos, qstr, i); } taos_close(taos); diff --git a/tests/test-all.sh b/tests/test-all.sh index 980629e6d2..47e5de6aa0 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -516,6 +516,15 @@ if [ "$2" != "sim" ] && [ "$2" != "python" ] && [ "$2" != "jdbc" ] && [ "$2" != echo "asyncdemo pass" totalExamplePass=`expr $totalExamplePass + 1` fi + + ./demo 127.0.0.1 > /dev/null 2>&1 + if [ $? != "0" ]; then + echo "demo failed" + totalExampleFailed=`expr $totalExampleFailed + 1` + else + echo "demo pass" + totalExamplePass=`expr $totalExamplePass + 1` + fi if [ "$totalExamplePass" -gt "0" ]; then echo -e "\n${GREEN} ### Total $totalExamplePass examples succeed! ### ${NC}" -- GitLab