Remove REDIS tag from test macros. (#333)
Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
This commit is contained in:
parent
cc94c98a9d
commit
7809df0c93
@ -1817,7 +1817,7 @@ int dictTest(int argc, char **argv, int flags) {
|
||||
dict *dict = dictCreate(&BenchmarkDictType);
|
||||
long count = 0;
|
||||
unsigned long new_dict_size, current_dict_used, remain_keys;
|
||||
int accurate = (flags & REDIS_TEST_ACCURATE);
|
||||
int accurate = (flags & TEST_ACCURATE);
|
||||
|
||||
if (argc == 4) {
|
||||
if (accurate) {
|
||||
|
@ -1817,7 +1817,7 @@ int listpackTest(int argc, char *argv[], int flags) {
|
||||
unsigned char *lp, *p, *vstr;
|
||||
int64_t vlen;
|
||||
unsigned char intbuf[LP_INTBUF_SIZE];
|
||||
int accurate = (flags & REDIS_TEST_ACCURATE);
|
||||
int accurate = (flags & TEST_ACCURATE);
|
||||
|
||||
TEST("Create int list") {
|
||||
lp = createIntList();
|
||||
|
@ -2019,7 +2019,7 @@ int quicklistTest(int argc, char *argv[], int flags) {
|
||||
UNUSED(argc);
|
||||
UNUSED(argv);
|
||||
|
||||
int accurate = (flags & REDIS_TEST_ACCURATE);
|
||||
int accurate = (flags & TEST_ACCURATE);
|
||||
unsigned int err = 0;
|
||||
int optimize_start =
|
||||
-(int)(sizeof(optimization_level) / sizeof(*optimization_level));
|
||||
@ -3259,7 +3259,7 @@ int quicklistTest(int argc, char *argv[], int flags) {
|
||||
quicklistRelease(ql);
|
||||
}
|
||||
|
||||
if (flags & REDIS_TEST_LARGE_MEMORY) {
|
||||
if (flags & TEST_LARGE_MEMORY) {
|
||||
TEST("compress and decompress quicklist listpack node") {
|
||||
quicklistNode *node = quicklistCreateNode();
|
||||
node->entry = lpNew(0);
|
||||
|
@ -6928,9 +6928,9 @@ int main(int argc, char **argv) {
|
||||
int flags = 0;
|
||||
for (j = 3; j < argc; j++) {
|
||||
char *arg = argv[j];
|
||||
if (!strcasecmp(arg, "--accurate")) flags |= REDIS_TEST_ACCURATE;
|
||||
else if (!strcasecmp(arg, "--large-memory")) flags |= REDIS_TEST_LARGE_MEMORY;
|
||||
else if (!strcasecmp(arg, "--valgrind")) flags |= REDIS_TEST_VALGRIND;
|
||||
if (!strcasecmp(arg, "--accurate")) flags |= TEST_ACCURATE;
|
||||
else if (!strcasecmp(arg, "--large-memory")) flags |= TEST_LARGE_MEMORY;
|
||||
else if (!strcasecmp(arg, "--valgrind")) flags |= TEST_VALGRIND;
|
||||
}
|
||||
|
||||
if (!strcasecmp(argv[2], "all")) {
|
||||
|
@ -39,9 +39,9 @@
|
||||
#ifndef __TESTHELP_H
|
||||
#define __TESTHELP_H
|
||||
|
||||
#define REDIS_TEST_ACCURATE (1<<0)
|
||||
#define REDIS_TEST_LARGE_MEMORY (1<<1)
|
||||
#define REDIS_TEST_VALGRIND (1<<2)
|
||||
#define TEST_ACCURATE (1<<0)
|
||||
#define TEST_LARGE_MEMORY (1<<1)
|
||||
#define TEST_VALGRIND (1<<2)
|
||||
|
||||
extern int __failed_tests;
|
||||
extern int __test_num;
|
||||
|
@ -1646,7 +1646,7 @@ int utilTest(int argc, char **argv, int flags) {
|
||||
test_ld2string();
|
||||
test_fixedpoint_d2string();
|
||||
#if defined(__linux__)
|
||||
if (!(flags & REDIS_TEST_VALGRIND)) {
|
||||
if (!(flags & TEST_VALGRIND)) {
|
||||
test_reclaimFilePageCache();
|
||||
}
|
||||
#endif
|
||||
|
@ -1847,7 +1847,7 @@ static size_t strEntryBytesLarge(size_t slen) {
|
||||
|
||||
/* ./redis-server test ziplist <randomseed> */
|
||||
int ziplistTest(int argc, char **argv, int flags) {
|
||||
int accurate = (flags & REDIS_TEST_ACCURATE);
|
||||
int accurate = (flags & TEST_ACCURATE);
|
||||
unsigned char *zl, *p;
|
||||
unsigned char *entry;
|
||||
unsigned int elen;
|
||||
|
Loading…
x
Reference in New Issue
Block a user