You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2015/04/05 01:29:37 UTC

[42/48] couch commit: updated refs/heads/master to 7776921

Simplify ABS_PATH macro

COUCHDB-2547


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

Branch: refs/heads/master
Commit: b41d8ba93f2edb5e80d9efa07755535409e8d3fe
Parents: d8d1a3c
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Authored: Wed Feb 18 11:16:54 2015 -0800
Committer: ILYA Khlopotov <ii...@ca.ibm.com>
Committed: Wed Feb 18 11:16:54 2015 -0800

----------------------------------------------------------------------
 include/couch_eunit.hrl | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/b41d8ba9/include/couch_eunit.hrl
----------------------------------------------------------------------
diff --git a/include/couch_eunit.hrl b/include/couch_eunit.hrl
index c48442a..390f03a 100644
--- a/include/couch_eunit.hrl
+++ b/include/couch_eunit.hrl
@@ -31,11 +31,12 @@
     filename:join([?BUILDDIR(), "src", "couch", "test", "fixtures"])).
 -define(TEMPDIR,
     filename:join([?BUILDDIR(), "tmp", "tmp_data"])).
--define(ABS_PATH(File),
-    filename:join([
-        filename:dirname(
-            filename:dirname(
-                filename:dirname(filename:absname(File)))), File])).
+
+-define(APPDIR, filename:dirname(element(2, file:get_cwd()))).
+%% Account for the fact that source files are in src/<app>/.eunit/<module>.erl
+%% when run from eunit
+-define(ABS_PATH(File), %% src/<app>/.eunit/<module>.erl
+    filename:join([?APPDIR, File])).
 
 -define(tempfile,
     fun() ->