From 0a0501c8d51adc0c642291cb5c11ea025816d698 Mon Sep 17 00:00:00 2001 From: Venkatesh Radhakrishnan Date: Mon, 13 Apr 2015 14:21:32 -0700 Subject: [PATCH] Add Xfunc to makefile Summary: Make target for running all xfunc tests Test Plan: make xfunc Reviewers: igor, sdong, meyering Reviewed By: meyering Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D36873 --- Makefile | 11 +++++++++++ src.mk | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 124cd228f..63fc9d56f 100644 --- a/Makefile +++ b/Makefile @@ -442,6 +442,9 @@ prioritize_long_running_tests = \ # See "man parallel" for its "-j ..." option. J = 100% +# Use this regexp to select the subset of tests whose names match. +tests-regexp = . + .PHONY: check_0 check_0: $(t_run) $(AM_V_GEN)export TEST_TMPDIR=$(TMPD); \ @@ -454,6 +457,7 @@ check_0: $(t_run) printf '%s\n' $(t_run); \ } \ | $(prioritize_long_running_tests) \ + | grep -E '$(tests-regexp)' \ | parallel -j$(J) --joblog=LOG $$eta --gnu '{} >& t/log-{/}' endif @@ -919,6 +923,13 @@ commit-prereq: $(MAKE) clean && USE_CLANG=1 $(MAKE) all; $(MAKE) clean && OPT=-DROCKSDB_LITE $(MAKE) static_lib; +xfunc: + for xftest in $(XFUNC_TESTS); do \ + echo "===== Running xftest $$xftest"; \ + make check ROCKSDB_XFUNC_TEST="$$xftest" tests-regexp="DBTest" ;\ + done + + # --------------------------------------------------------------------------- # Platform-specific compilation # --------------------------------------------------------------------------- diff --git a/src.mk b/src.mk index b8b45f6a5..3fba1e95c 100644 --- a/src.mk +++ b/src.mk @@ -256,4 +256,10 @@ JNI_NATIVE_SOURCES = \ # TODO/FIXME: fix the above. Otherwise, the current rules would fail: # java/rocksjni/write_batch_test.cc:13:44: fatal error: include/org_rocksdb_WriteBatch.h: No such file or directory # #include "include/org_rocksdb_WriteBatch.h" -# ^ + +# These are the xfunc tests run : +XFUNC_TESTS = \ + "managed_new" \ + "managed_xftest_dropold" \ + "managed_xftest_release" \ + "inplace_lock_test"