Merge pull request #12272 from taosdata/fix/ZhiqiangWang/fix-15311-TDinternal-CI-error

fix(os): TDinternal CI error.
This commit is contained in:
Zhiqiang Wang 2022-05-09 17:51:12 +08:00 committed by GitHub
commit ce2bbd7eb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 6 deletions

View File

@ -80,6 +80,7 @@ int64_t taosWriteFile(TdFilePtr pFile, const void *buf, int64_t count);
void taosFprintfFile(TdFilePtr pFile, const char *format, ...);
int64_t taosGetLineFile(TdFilePtr pFile, char ** __restrict ptrBuf);
int64_t taosGetsFile(TdFilePtr pFile, int32_t maxSize, char *__restrict buf);
int32_t taosEOFFile(TdFilePtr pFile);

View File

@ -688,6 +688,16 @@ int64_t taosGetLineFile(TdFilePtr pFile, char **__restrict ptrBuf) {
return getline(ptrBuf, &len, pFile->fp);
#endif
}
int64_t taosGetsFile(TdFilePtr pFile, int32_t maxSize, char *__restrict buf) {
if (pFile == NULL || buf == NULL ) {
return -1;
}
assert(pFile->fp != NULL);
if (fgets(buf, maxSize, pFile->fp) == NULL) {
return -1;
}
return strlen(buf);
}
int32_t taosEOFFile(TdFilePtr pFile) {
if (pFile == NULL) {
return 0;

View File

@ -5,7 +5,7 @@ set +e
echo "Executing copy_udf.sh"
SCRIPT_DIR=`dirname $0`
SCRIPT_DIR=`pwd`
cd $SCRIPT_DIR/../
IN_TDINTERNAL="community"

View File

@ -62,11 +62,7 @@ fi
TOP_DIR=`pwd`
if [[ "$SCRIPT_DIR" == *"$IN_TDINTERNAL"* ]]; then
BIN_DIR=`find . -name "tmq_sim"|grep bin|head -n1|cut -d '/' -f 2,3`
else
BIN_DIR=`find . -name "tmq_sim"|grep bin|head -n1|cut -d '/' -f 2`
fi
BIN_DIR=`find . -name "tmq_sim"|grep bin|head -n1|cut -d '/' -f 2`
declare -x BUILD_DIR=$TOP_DIR/$BIN_DIR