Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
Fix and simplify environment for etap tests
Browse files Browse the repository at this point in the history
BugzID: 11797
  • Loading branch information
kocolosk committed Feb 9, 2011
1 parent 62fadab commit 435aed2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -26,10 +26,10 @@ clean:
@cd couchjs && python scons/scons.py --clean
@./rebar clean

check:
# compile is required here because of cross-dependencies between apps
check: compile
@./rebar eunit
@ERL_FLAGS="-pa `pwd`/apps/couch/ebin `pwd`/apps/couch/test/etap" \
prove apps/couch/test/etap/*.t
@ERL_FLAGS="-pa `pwd`/apps/couch/ebin" prove apps/couch/test/etap/*.t

dist: compile
@rm -rf rel/bigcouch
Expand Down
15 changes: 3 additions & 12 deletions apps/couch/src/test_util.erl
Expand Up @@ -15,20 +15,11 @@
-export([init_code_path/0]).
-export([source_file/1, build_file/1]).

srcdir() ->
"@abs_top_srcdir@".

builddir() ->
"@abs_top_builddir@".

init_code_path() ->
Paths = ["etap", "couch", "oauth", "ibrowse", "mochiweb"],
lists:foreach(fun(Name) ->
code:add_pathz(filename:join([builddir(), "ebin", Name]))
end, Paths).
code:load_abs("apps/couch/test/etap/etap").

source_file(Name) ->
filename:join([srcdir(), Name]).
filename:join(["apps/couch", Name]).

build_file(Name) ->
filename:join([builddir(), Name]).
filename:join(["apps/couch", Name]).

0 comments on commit 435aed2

Please sign in to comment.