Commit 1dcc0a39 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Remove some output. Perhaps removed too much output. Maybe the individual...

Remove some output.  Perhaps removed too much output.  Maybe the individual test names should be printed as the test runs.  For now, let's go for this extrema version, and see how it wears.  Addresses #13

git-svn-id: file:///svn/tokudb@702 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4d20260c
...@@ -6,7 +6,7 @@ ifeq ($(OSX),OSX) ...@@ -6,7 +6,7 @@ ifeq ($(OSX),OSX)
LIBEXT=dylib LIBEXT=dylib
VGRIND= VGRIND=
TDB_LOADLIBES = -L../ -ldb TDB_LOADLIBES = -L../ -ldb
SETTOKUENV=DYLD_LIBRARY_PATH=.. SETTOKUENV=export DYLD_LIBRARY_PATH=..
UNSETTOKUENV=unset DYLD_LIBRARY_PATH UNSETTOKUENV=unset DYLD_LIBRARY_PATH
else else
SETTOKUENV=true SETTOKUENV=true
...@@ -45,6 +45,7 @@ foo: ...@@ -45,6 +45,7 @@ foo:
.PHONY: check check.bdb check.tdb .PHONY: check check.bdb check.tdb
check: check.bdb check.tdb check: check.bdb check.tdb
@ echo ok
check.bdb: $(RUN_BDB_TESTS) check.bdb: $(RUN_BDB_TESTS)
check.tdb: $(RUN_TDB_TESTS) check.tdb: $(RUN_TDB_TESTS)
...@@ -53,16 +54,13 @@ check.tdb: $(RUN_TDB_TESTS) ...@@ -53,16 +54,13 @@ check.tdb: $(RUN_TDB_TESTS)
$(RUN_ALL_TESTS): $(RUN_ALL_TESTS):
$(ALL_TESTS): $(ALL_TESTS):
%.foo:
echo $@
%.run: %.bdbrun %.tdbrun %.run: %.bdbrun %.tdbrun
# The @ sign makes the make quiet. If there is an error there is enough info to tell what test failed.
%.bdbrun: %.bdb %.bdbrun: %.bdb
$(UNSETTOKUENV); $(VGRIND) ./$< @ $(UNSETTOKUENV); $(VGRIND) ./$<
%.tdbrun: %.tdb %.tdbrun: %.tdb
$(SETTOKUENV) $(VGRIND) ./$< @ $(SETTOKUENV); $(VGRIND) ./$<
# For a few of the tests bdb is making valgrind unhappy. # For a few of the tests bdb is making valgrind unhappy.
NO_VGRIND = \ NO_VGRIND = \
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <db.h> #include <db.h>
#include "test.h"
DBT *dbt_init(DBT *dbt, void *data, u_int32_t size) { DBT *dbt_init(DBT *dbt, void *data, u_int32_t size) {
memset(dbt, 0, sizeof *dbt); memset(dbt, 0, sizeof *dbt);
dbt->data = data; dbt->data = data;
...@@ -21,7 +23,7 @@ DBT *dbt_init_malloc(DBT *dbt) { ...@@ -21,7 +23,7 @@ DBT *dbt_init_malloc(DBT *dbt) {
} }
void test_rand_insert(int n, int dup_mode) { void test_rand_insert(int n, int dup_mode) {
printf("test_rand_insert:%d %d\n", n, dup_mode); if (verbose) printf("test_rand_insert:%d %d\n", n, dup_mode);
DB_ENV * const null_env = 0; DB_ENV * const null_env = 0;
DB *db; DB *db;
...@@ -89,7 +91,9 @@ void test_rand_insert(int n, int dup_mode) { ...@@ -89,7 +91,9 @@ void test_rand_insert(int n, int dup_mode) {
assert(r == 0); assert(r == 0);
} }
int main() { int main(int argc, const char *argv[]) {
parse_args(argc, argv);
int i; int i;
for (i = 1; i <= (1<<16); i *= 2) { for (i = 1; i <= (1<<16); i *= 2) {
test_rand_insert(i, 0); test_rand_insert(i, 0);
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#define CKERR(r) if (r!=0) fprintf(stderr, "%s:%d error %d %s\n", __FILE__, __LINE__, r, db_strerror(r)); assert(r==0); #include "test.h"
DBT *dbt_init(DBT *dbt, void *data, u_int32_t size) { DBT *dbt_init(DBT *dbt, void *data, u_int32_t size) {
memset(dbt, 0, sizeof *dbt); memset(dbt, 0, sizeof *dbt);
...@@ -61,7 +61,7 @@ void expect(DBC *cursor, int k, int v) { ...@@ -61,7 +61,7 @@ void expect(DBC *cursor, int k, int v) {
} }
void test_reverse_compare(int n) { void test_reverse_compare(int n) {
printf("test_reverse_compare:%d\n", n); if (verbose) printf("test_reverse_compare:%d\n", n);
DB_ENV * const null_env = 0; DB_ENV * const null_env = 0;
DB *db; DB *db;
...@@ -140,7 +140,9 @@ void test_reverse_compare(int n) { ...@@ -140,7 +140,9 @@ void test_reverse_compare(int n) {
CKERR(r); CKERR(r);
} }
int main() { int main(int argc, const char *argv[]) {
parse_args(argc, argv);
int i; int i;
for (i = 1; i <= (1<<16); i *= 2) { for (i = 1; i <= (1<<16); i *= 2) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment