Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit f8f4c80

Browse files
committed
Tests added
1 parent ba7fb1e commit f8f4c80

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

.circleci/config.yml

+12
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,16 @@ jobs:
3737
>&2 echo "Oh no! $errcount tests failed"
3838
exit 1
3939
fi
40+
for f in tools/unittest/*.sh; do
41+
printf "$f${printTail:0:-${#f}}"
42+
bash "$f" -H
43+
status=$?
44+
if [ "$status" -ne 0 ]; then
45+
errcount="$(($errcount+1))"
46+
fi
47+
done
48+
if [ "$errcount" -ne 0 ]; then
49+
>&2 echo "Oh no! $errcount tests failed"
50+
exit 1
51+
fi
4052

.circleci/run.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
run:
2+
0:
3+
delta_ddl_do: select now(); select now();
4+
delta_ddl_undo: select now();
5+
# delta_config: max_wal_size = 2048MB
6+
1:
7+
# delta_ddl_do: select now();
8+
# delta_ddl_undo: select now();
9+
delta_config: max_wal_size = 4092MB
10+
2:
11+
# delta_ddl_do: select now();
12+
# delta_ddl_undo: select now();
13+
delta_config: max_wal_size = 4092MB

tests/nancy_run_localhost_series.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
realpath() {
4+
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
5+
}
6+
7+
src_dir=$(dirname $(dirname $(realpath "$0")))"/.circleci"
8+
9+
output=$(
10+
${BASH_SOURCE%/*}/../nancy run \
11+
--less-output \
12+
--db-pgbench "-s 1" \
13+
--workload-pgbench "-t 1" \
14+
--config file://${BASH_SOURCE%/*}/../.circleci/run.yml 2>&1
15+
)
16+
17+
if [[ $output =~ "Run #1 done." ]] && [[ $output =~ "Run #2 done." ]] && [[ $output =~ "Run #3 done." ]]; then
18+
echo -e "\e[36mOK\e[39m"
19+
else
20+
>&2 echo -e "\e[31mFAILED\e[39m"
21+
>&2 echo -e "Output: $output"
22+
exit 1
23+
fi

0 commit comments

Comments
 (0)