You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2014/08/15 22:12:11 UTC

couch commit: updated refs/heads/1963-eunit-bigcouch to df926af

Repository: couchdb-couch
Updated Branches:
  refs/heads/1963-eunit-bigcouch 474fe7de5 -> df926afac


WIP: add couch_eunit.hrl


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/df926afa
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/df926afa
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/df926afa

Branch: refs/heads/1963-eunit-bigcouch
Commit: df926afac02e37c5ae7faba45f5b6dea0a1be8d8
Parents: 474fe7d
Author: Russell Branca <ch...@apache.org>
Authored: Fri Aug 15 13:12:06 2014 -0700
Committer: Russell Branca <ch...@apache.org>
Committed: Fri Aug 15 13:12:06 2014 -0700

----------------------------------------------------------------------
 include/couch_eunit.hrl | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/df926afa/include/couch_eunit.hrl
----------------------------------------------------------------------
diff --git a/include/couch_eunit.hrl b/include/couch_eunit.hrl
new file mode 100644
index 0000000..83e0d68
--- /dev/null
+++ b/include/couch_eunit.hrl
@@ -0,0 +1,44 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+%   http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+-include_lib("eunit/include/eunit.hrl").
+
+-define(BUILDDIR, "/Users/russell/src/couchdb").
+-define(SOURCEDIR, "/Users/russell/src/couchdb/src/couch").
+-define(CONFIG_CHAIN, [
+    filename:join([?BUILDDIR, "etc", "couchdb", "default_dev.ini"]),
+    filename:join([?BUILDDIR, "etc", "couchdb", "local_dev.ini"]),
+    filename:join([?BUILDDIR, "etc", "couchdb", "eunit.ini"])]).
+-define(FIXTURESDIR,
+    filename:join([?SOURCEDIR, "test", "fixtures"])).
+-define(TEMPDIR,
+    filename:join([?BUILDDIR, "test", "temp"])).
+
+-define(tempfile,
+    fun() ->
+        {A, B, C} = erlang:now(),
+        N = node(),
+        FileName = lists:flatten(io_lib:format("~p-~p.~p.~p", [N, A, B, C])),
+        filename:join([?TEMPDIR, FileName])
+    end).
+-define(tempdb,
+    fun() ->
+            Nums = tuple_to_list(erlang:now()),
+            Prefix = "eunit-test-db",
+            Suffix = lists:concat([integer_to_list(Num) || Num <- Nums]),
+            list_to_binary(Prefix ++ "-" ++ Suffix)
+    end).
+-define(docid,
+    fun() ->
+        {A, B, C} = erlang:now(),
+        lists:flatten(io_lib:format("~p~p~p", [A, B, C]))
+    end).