fix: adjust oem name only with cus_name.h define
This commit is contained in:
parent
b68f68bdaa
commit
d3e1e53569
|
@ -31,9 +31,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
|
||||
#include "cus_name.h"
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS
|
||||
|
||||
|
|
|
@ -16,12 +16,23 @@
|
|||
#ifndef _CUS_NAME_H_
|
||||
#define _CUS_NAME_H_
|
||||
|
||||
//
|
||||
// support OEM
|
||||
//
|
||||
#ifndef TD_PRODUCT_NAME
|
||||
#ifdef TD_ENTERPRISE
|
||||
#define TD_PRODUCT_NAME "TDengine Enterprise Edition"
|
||||
#else
|
||||
#define TD_PRODUCT_NAME "TDengine Community Edition"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CUS_NAME
|
||||
#define CUS_NAME "TDengine"
|
||||
#endif
|
||||
|
||||
#ifndef CUS_PROMPT
|
||||
#define CUS_PROMPT "taos"
|
||||
#define CUS_PROMPT "taos"
|
||||
#endif
|
||||
|
||||
#ifndef CUS_EMAIL
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#define _TD_UTIL_DEF_H_
|
||||
|
||||
#include "os.h"
|
||||
#include "cus_name.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -79,14 +80,6 @@ extern const int32_t TYPE_BYTES[21];
|
|||
#define TSDB_DEFAULT_PASS "taosdata"
|
||||
#endif
|
||||
|
||||
#ifndef TD_PRODUCT_NAME
|
||||
#ifdef TD_ENTERPRISE
|
||||
#define TD_PRODUCT_NAME "TDengine Enterprise Edition"
|
||||
#else
|
||||
#define TD_PRODUCT_NAME "TDengine Community Edition"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define TSDB_TRUE 1
|
||||
#define TSDB_FALSE 0
|
||||
#define TSDB_OK 0
|
||||
|
|
|
@ -38,13 +38,7 @@
|
|||
#include "tversion.h"
|
||||
#include "tconv.h"
|
||||
|
||||
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
|
||||
#include "cus_name.h"
|
||||
#endif
|
||||
|
||||
#ifndef CUS_PROMPT
|
||||
#define CUS_PROMPT "taos"
|
||||
#endif
|
||||
|
||||
#define TSC_VAR_NOT_RELEASE 1
|
||||
#define TSC_VAR_RELEASED 0
|
||||
|
|
|
@ -28,9 +28,6 @@
|
|||
|
||||
#include "tutil.h"
|
||||
|
||||
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
|
||||
#include "cus_name.h"
|
||||
#endif
|
||||
|
||||
#define CONFIG_PATH_LEN (TSDB_FILENAME_LEN + 12)
|
||||
#define CONFIG_FILE_LEN (CONFIG_PATH_LEN + 32)
|
||||
|
|
|
@ -27,22 +27,8 @@
|
|||
#include "dmUtil.h"
|
||||
#include "tcs.h"
|
||||
#include "qworker.h"
|
||||
|
||||
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
|
||||
#include "cus_name.h"
|
||||
#else
|
||||
#ifndef CUS_NAME
|
||||
#define CUS_NAME "TDengine"
|
||||
#endif
|
||||
|
||||
#ifndef CUS_PROMPT
|
||||
#define CUS_PROMPT "taos"
|
||||
#endif
|
||||
|
||||
#ifndef CUS_EMAIL
|
||||
#define CUS_EMAIL "<support@taosdata.com>"
|
||||
#endif
|
||||
#endif
|
||||
// clang-format off
|
||||
#define DM_APOLLO_URL "The apollo string to use when configuring the server, such as: -a 'jsonFile:./tests/cfg.json', cfg.json text can be '{\"fqdn\":\"td1\"}'."
|
||||
#define DM_CFG_DIR "Configuration directory."
|
||||
|
|
|
@ -16,14 +16,7 @@
|
|||
#define _DEFAULT_SOURCE
|
||||
#include "os.h"
|
||||
#include "taoserror.h"
|
||||
|
||||
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
|
||||
#include "cus_name.h"
|
||||
#else
|
||||
#ifndef CUS_PROMPT
|
||||
#define CUS_PROMPT "taos"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define PROCESS_ITEM 12
|
||||
#define UUIDLEN37 37
|
||||
|
|
|
@ -31,16 +31,16 @@ class TDTestCase(TBase):
|
|||
# run
|
||||
outputs = etool.runBinFile("taosBenchmark", "-V")
|
||||
print(outputs)
|
||||
if len(outputs) != 3:
|
||||
if len(outputs) != 4:
|
||||
tdLog.exit(f"checkVersion return lines count {len(outputs) != 3}")
|
||||
# version string len
|
||||
assert len(outputs[0]) > 27
|
||||
assert len(outputs[1]) > 24
|
||||
# commit id
|
||||
assert len(outputs[1]) > 43
|
||||
assert outputs[1][:4] == "git:"
|
||||
assert len(outputs[2]) > 43
|
||||
assert outputs[2][:4] == "git:"
|
||||
# build info
|
||||
assert len(outputs[2]) > 36
|
||||
assert outputs[2][:6] == "build:"
|
||||
assert len(outputs[3]) > 36
|
||||
assert outputs[3][:6] == "build:"
|
||||
|
||||
tdLog.info("check taosBenchmark version successfully.")
|
||||
|
||||
|
|
|
@ -31,16 +31,16 @@ class TDTestCase(TBase):
|
|||
# run
|
||||
outputs = etool.runBinFile("taosdump", "-V")
|
||||
print(outputs)
|
||||
if len(outputs) != 3:
|
||||
if len(outputs) != 4:
|
||||
tdLog.exit(f"checkVersion return lines count {len(outputs) != 3}")
|
||||
# version string len
|
||||
assert len(outputs[0]) > 22
|
||||
assert len(outputs[1]) > 19
|
||||
# commit id
|
||||
assert len(outputs[1]) > 43
|
||||
assert outputs[1][:4] == "git:"
|
||||
assert len(outputs[2]) > 43
|
||||
assert outputs[2][:4] == "git:"
|
||||
# build info
|
||||
assert len(outputs[2]) > 36
|
||||
assert outputs[2][:6] == "build:"
|
||||
assert len(outputs[3]) > 36
|
||||
assert outputs[3][:6] == "build:"
|
||||
|
||||
tdLog.info("check taosdump version successfully.")
|
||||
|
||||
|
|
|
@ -17,16 +17,10 @@
|
|||
#include <pwd.h>
|
||||
#endif
|
||||
|
||||
#include "cus_name.h"
|
||||
#include "shellInt.h"
|
||||
#include "version.h"
|
||||
|
||||
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
|
||||
#include "cus_name.h"
|
||||
#else
|
||||
#ifndef CUS_PROMPT
|
||||
#define CUS_PROMPT "taos"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define TAOS_CONSOLE_PROMPT_CONTINUE " -> "
|
||||
|
||||
|
|
|
@ -49,22 +49,6 @@
|
|||
// ---------------- define ----------------
|
||||
//
|
||||
|
||||
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
|
||||
#include <cus_name.h>
|
||||
#else
|
||||
#ifndef CUS_NAME
|
||||
#define CUS_NAME "TDengine"
|
||||
#endif
|
||||
|
||||
#ifndef CUS_PROMPT
|
||||
#define CUS_PROMPT "taos"
|
||||
#endif
|
||||
|
||||
#ifndef CUS_EMAIL
|
||||
#define CUS_EMAIL "<support@taosdata.com>"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// use 256 as normal buffer length
|
||||
#define BUFFER_LEN 256
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#include <bench.h>
|
||||
#include "cus_name.h" // include/util/
|
||||
#include <bench.h>
|
||||
#include "benchLog.h"
|
||||
#include <toolsdef.h>
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <bench.h>
|
||||
#include "benchLog.h"
|
||||
#include "cus_name.h"
|
||||
|
||||
#ifdef LINUX
|
||||
#include <argp.h>
|
||||
|
@ -21,23 +22,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
extern char version[];
|
||||
|
||||
#if defined(CUS_NAME) || defined(CUS_PROMPT) || defined(CUS_EMAIL)
|
||||
#include "cus_name.h"
|
||||
#else
|
||||
#ifndef CUS_NAME
|
||||
#define CUS_NAME "TDengine"
|
||||
#endif
|
||||
|
||||
#ifndef CUS_PROMPT
|
||||
#define CUS_PROMPT "taos"
|
||||
#endif
|
||||
|
||||
#ifndef CUS_EMAIL
|
||||
#define CUS_EMAIL "<support@taosdata.com>"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS
|
||||
char g_configDir[MAX_PATH_LEN] = {0}; // "C:\\TDengine\\cfg"};
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include "cus_name.h" // include/util/
|
||||
#include "dump.h"
|
||||
#include "dumpUtil.h"
|
||||
#ifdef WEBSOCKET
|
||||
|
|
Loading…
Reference in New Issue