test_c.sh 925 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
#!/bin/bash

set -e

taosd >> /dev/null 2>&1 &
taosadapter >> /dev/null 2>&1 &

cd ../../docs-examples/c

# 1
gcc connect_example.c -o connect_example -ltaos
./connect_example

# 2
taos -s "drop database if exists power"
gcc -o insert_example insert_example.c -ltaos
./insert_example

# 3
taos -s "drop database if exists power"
gcc -o stmt_example stmt_example.c -ltaos
./stmt_example

# 4
taos -s "drop database if exists power"
gcc -o multi_bind_example multi_bind_example.c -ltaos
./multi_bind_example

# 5
gcc -o query_example query_example.c -ltaos
./query_example

# 6
taos -s "drop database if exists test"
gcc -o line_example line_example.c -ltaos
./line_example

# 7
taos -s "drop database if exists test"
gcc -o telnet_line_example telnet_line_example.c -ltaos
./telnet_line_example 

# 8
taos -s "drop database if exists test"
gcc -o json_protocol_example json_protocol_example.c -ltaos
./json_protocol_example