mariadb/newbrt/tests/test.h
Yoni Fogel 908ba5ecf4 Addresses #1338
All newbrt tests now call toku_brt_init/destroy

git-svn-id: file:///svn/toku/tokudb.1032b@8393 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:32 -04:00

35 lines
647 B
C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "toku_portability.h"
#include "brt.h"
int verbose=0;
static inline void
default_parse_args (int argc, const char *argv[]) {
const char *progname=argv[0];
argc--; argv++;
while (argc>0) {
if (strcmp(argv[0],"-v")==0) {
verbose=1;
} else if (strcmp(argv[0],"-q")==0) {
verbose=0;
} else {
fprintf(stderr, "Usage:\n %s [-v] [-q]\n", progname);
exit(1);
}
argc--; argv++;
}
}
int test_main(int argc, const char *argv[]);
int
main(int argc, const char *argv[]) {
toku_brt_init();
test_main(argc, argv);
toku_brt_destroy();
}