Merge pull request #12272 from taosdata/fix/ZhiqiangWang/fix-15311-TDinternal-CI-error
fix(os): TDinternal CI error.
This commit is contained in:
commit
ce2bbd7eb4
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -5,7 +5,7 @@ set +e
|
|||
|
||||
echo "Executing copy_udf.sh"
|
||||
|
||||
SCRIPT_DIR=`dirname $0`
|
||||
SCRIPT_DIR=`pwd`
|
||||
cd $SCRIPT_DIR/../
|
||||
|
||||
IN_TDINTERNAL="community"
|
||||
|
|
|
@ -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
|
||||
|
||||
declare -x BUILD_DIR=$TOP_DIR/$BIN_DIR
|
||||
|
||||
|
|
Loading…
Reference in New Issue