couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [42/48] couch commit: updated refs/heads/master to 7776921
Date Sat, 04 Apr 2015 23:29:37 GMT
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 <iilyak@ca.ibm.com>
Authored: Wed Feb 18 11:16:54 2015 -0800
Committer: ILYA Khlopotov <iilyak@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() ->


Mime
View raw message