]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Create Makefile target unity_test
authorIgor Canadi <icanadi@fb.com>
Wed, 7 Oct 2015 21:46:18 +0000 (14:46 -0700)
committerIgor Canadi <icanadi@fb.com>
Wed, 7 Oct 2015 21:46:18 +0000 (14:46 -0700)
Summary: unity_test will compile db_test with unity.a instead of librocksdb.a. This will test both the compilation and some small amount of runtime.

Test Plan: This is a test :)

Reviewers: kradhakrishnan

Reviewed By: kradhakrishnan

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D48297

Makefile
build_tools/rocksdb-lego-determinator

index da054123589d6ad60f475a4b658ebf159248be7a..009f4676ac634e20d7725b242037f1a866f3cadf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -602,6 +602,11 @@ unity.a: unity.o
        $(AM_V_AR)rm -f $@
        $(AM_V_at)$(AR) $(ARFLAGS) $@ unity.o
 
+# try compiling db_test with unity
+unity_test: db/db_test.o util/db_test_util.o $(TESTHARNESS) unity.a
+       $(AM_LINK)
+       ./unity_test
+
 rocksdb.h rocksdb.cc: build_tools/amalgamate.py Makefile $(LIB_SOURCES) unity.cc
        build_tools/amalgamate.py -I. -i./include unity.cc -x include/rocksdb/c.h -H rocksdb.h -o rocksdb.cc
 
index c4f1f169bcae969b108d0aaecd15585100c0e7d1..155e2b553c0a14156b33cbf21abd4494bc64d094 100755 (executable)
@@ -219,7 +219,7 @@ UNITY_COMMANDS="[
             $CLEANUP_ENV,
             {
                 'name':'Build, test unity test',
-                'shell':'$SHM $DEBUG V=1 make J=1 unity',
+                'shell':'$SHM $DEBUG V=1 make J=1 unity_test',
                 'user':'root'
             },
         ],
@@ -227,8 +227,6 @@ UNITY_COMMANDS="[
     }
 ]"
 
-UNITY_COMMANDS=$DISABLE_COMMANDS
-
 #
 # Build RocksDB lite
 #