TDengine/tests/unit-test/test.sh
Bomin Zhang 876979b5f5
feat[ts-6107]: shared storage (#31552)
* add API to use s3 as shared storage

* support using local file system as shared storage

* upload file to shared storage

* support read, compact and drop

* finish basic mnode & vnode msg processing

* follower sync migration state

* implement mnode transaction, and improve log

* send migration progress msg to dnode to avoid deadlock

* implement following migration

* remove mcount

* avoid redo migration on startup

* avoid follower deadlock when leader is down

* trigger migrate by timer,  avoid compact after migration

* comment out the usage of 'tcs' functions in stream

* change config item prefix from s3 to ss

* change db option prefix from s3 to ss

* rename s3 data struct, function, file to ss

* rename s3 macro to ss

* update s3 sql to ss

* rename remaining s3 items to ss

* check ss configruation, improve s3 retry

* grant object storage -> shared storage,  check ssEnabled

* fix memory leaks

* update build options

* omit sensitive information when dump config

* fix backward compatibility issue

* fix issues found in ci-checks

* fix some failed test cases

* avoid follower timeout and improve log

* fix: follower timeout because migration status not updated

* refuse migration if there's an in progress one

* fix ss test case

* remove garbage files and other minor improvement

* fix failed test cases

* update unit test

* fix failed test case

* fix failed test case

* update document

* update document and fix failed test cases

* fix minor issues in code, test and document

* check new commit after migration task is scheduled

* fix several issus

1. migrate information cannot be dropped sometimes because progress response was put into read queue.
2. memory leak in rare cases
3. data corruption in rare cases
4. failed test case

* add shared storage upgrade tool

* fix compile error
2025-07-14 16:33:53 +08:00

69 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
# set -x
function usage() {
echo "$0"
echo -e "\t -e enterprise edition"
echo -e "\t -h help"
}
ent=1
while getopts "e:h" opt; do
case $opt in
e)
ent="$OPTARG"
;;
h)
usage
exit 0
;;
\?)
echo "Invalid option: -$OPTARG"
usage
exit 0
;;
esac
done
script_dir=$(dirname "$0")
cd "${script_dir}"
PWD=$(pwd)
if [ $ent -eq 0 ]; then
cd ../../debug
else
cd ../../../debug
fi
PWD=$(pwd)
echo "PWD: $PWD"
set -e
pgrep taosd || build/bin/taosd >> /dev/null 2>&1 &
sleep 10
# Run ctest and capture output and return code
ctest_output="unit-test.log"
ctest -E "cunit_test|pcre*|example*|clientTest|connectOptionsTest|stmtTest|stmt2Test|tssTest|tmqTest|catalogTest|taoscTest" -j8 2>&1 | tee "$ctest_output"
ctest_ret=${PIPESTATUS[0]}
# Read the captured output
ctest_output=$(cat "$ctest_output")
# Check if ctest failed or no tests were found
if [ $ctest_ret -ne 0 ]; then
echo "ctest failed, failing the script."
exit 1
elif echo "$ctest_output" | grep -q "No tests were found"; then
echo "No tests were found, failing the script."
exit 1
fi
build/bin/clientTest
build/bin/connectOptionsTest
build/bin/stmtTest
build/bin/stmt2Test
build/bin/tssTest
build/bin/tmqTest
build/bin/catalogTest
build/bin/taoscTest