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 2014/06/23 13:56:49 UTC
[3/9] couchdb commit: updated refs/heads/1963-eunit to 2e3e693
Move couch_eunit.hrl.in to include directory
Because include path "." has higher priority than any other custom
paths, generated during `configure` phase couch_eunit.hrl contains
build and source paths which aren't used for `make distcheck` causing
various failures.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/033b1f1d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/033b1f1d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/033b1f1d
Branch: refs/heads/1963-eunit
Commit: 033b1f1dfa5d74813e63db36fede3aa120095438
Parents: 1330c2e
Author: Alexander Shorin <kx...@apache.org>
Authored: Mon Jun 23 00:33:26 2014 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Mon Jun 23 03:31:26 2014 +0400
----------------------------------------------------------------------
.gitignore | 2 +-
configure.ac | 2 +-
test/couchdb/Makefile.am | 5 ++--
test/couchdb/couch_eunit.hrl.in | 44 ----------------------------
test/couchdb/include/couch_eunit.hrl.in | 44 ++++++++++++++++++++++++++++
test/couchdb/run.in | 7 +++--
6 files changed, 53 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/033b1f1d/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 0f8498c..236aa5d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -129,7 +129,7 @@ stamp-h1
test/.deps/
test/bench/run
test/couchdb/run
-test/couchdb/couch_eunit.hrl
+test/couchdb/include/couch_eunit.hrl
test/couchdb/fixtures/.deps/
test/javascript/run
test/javascript/run_js_tests.sh
http://git-wip-us.apache.org/repos/asf/couchdb/blob/033b1f1d/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 36b765a..5aba06a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -754,7 +754,7 @@ AC_CONFIG_FILES([test/Makefile])
AC_CONFIG_FILES([test/bench/Makefile])
AC_CONFIG_FILES([test/couchdb/run])
AC_CONFIG_FILES([test/couchdb/Makefile])
-AC_CONFIG_FILES([test/couchdb/couch_eunit.hrl])
+AC_CONFIG_FILES([test/couchdb/include/couch_eunit.hrl])
AC_CONFIG_FILES([test/couchdb/fixtures/Makefile])
AC_CONFIG_FILES([test/javascript/Makefile])
AC_CONFIG_FILES([test/view_server/Makefile])
http://git-wip-us.apache.org/repos/asf/couchdb/blob/033b1f1d/test/couchdb/Makefile.am
----------------------------------------------------------------------
diff --git a/test/couchdb/Makefile.am b/test/couchdb/Makefile.am
index b51bdb1..2de2a90 100644
--- a/test/couchdb/Makefile.am
+++ b/test/couchdb/Makefile.am
@@ -17,7 +17,8 @@ noinst_SCRIPTS = run
all:
mkdir -p ebin
mkdir -p temp
- ${ERLC} -oebin test_request.erl test_web.erl
+ ${ERLC} -Wall -I$(top_srcdir)/src -I$(top_srcdir)/test/couchdb/include \
+ -o ebin/ test_request.erl test_web.erl
chmod +x run
chmod +x fixtures/*.sh
chmod -x fixtures/os_daemon_bad_perm.sh
@@ -54,7 +55,7 @@ eunit_files = \
json_stream_parse_tests.erl \
test_request.erl \
test_web.erl \
- couch_eunit.hrl
+ include/couch_eunit.hrl
fixture_files = \
fixtures/couch_config_tests_1.ini \
http://git-wip-us.apache.org/repos/asf/couchdb/blob/033b1f1d/test/couchdb/couch_eunit.hrl.in
----------------------------------------------------------------------
diff --git a/test/couchdb/couch_eunit.hrl.in b/test/couchdb/couch_eunit.hrl.in
deleted file mode 100644
index ff080e1..0000000
--- a/test/couchdb/couch_eunit.hrl.in
+++ /dev/null
@@ -1,44 +0,0 @@
-% 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, "@abs_top_builddir@").
--define(SOURCEDIR, "@abs_top_srcdir@").
--define(CONFIG_CHAIN, [
- filename:join([?BUILDDIR, "etc", "couchdb", "default_dev.ini"]),
- filename:join([?BUILDDIR, "etc", "couchdb", "local_dev.ini"]),
- filename:join([?SOURCEDIR, "test", "couchdb", "eunit.ini"])]).
--define(FIXTURESDIR,
- filename:join([?SOURCEDIR, "test", "couchdb", "fixtures"])).
--define(TEMPDIR,
- filename:join([?BUILDDIR, "test", "couchdb", "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).
http://git-wip-us.apache.org/repos/asf/couchdb/blob/033b1f1d/test/couchdb/include/couch_eunit.hrl.in
----------------------------------------------------------------------
diff --git a/test/couchdb/include/couch_eunit.hrl.in b/test/couchdb/include/couch_eunit.hrl.in
new file mode 100644
index 0000000..ff080e1
--- /dev/null
+++ b/test/couchdb/include/couch_eunit.hrl.in
@@ -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, "@abs_top_builddir@").
+-define(SOURCEDIR, "@abs_top_srcdir@").
+-define(CONFIG_CHAIN, [
+ filename:join([?BUILDDIR, "etc", "couchdb", "default_dev.ini"]),
+ filename:join([?BUILDDIR, "etc", "couchdb", "local_dev.ini"]),
+ filename:join([?SOURCEDIR, "test", "couchdb", "eunit.ini"])]).
+-define(FIXTURESDIR,
+ filename:join([?SOURCEDIR, "test", "couchdb", "fixtures"])).
+-define(TEMPDIR,
+ filename:join([?BUILDDIR, "test", "couchdb", "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).
http://git-wip-us.apache.org/repos/asf/couchdb/blob/033b1f1d/test/couchdb/run.in
----------------------------------------------------------------------
diff --git a/test/couchdb/run.in b/test/couchdb/run.in
index 2982ec3..2405f63 100644
--- a/test/couchdb/run.in
+++ b/test/couchdb/run.in
@@ -16,8 +16,8 @@
-define(BUILDDIR, "@abs_top_builddir@").
-define(SOURCEDIR, "@abs_top_srcdir@").
--define(TESTS_EBIN, filename:join([?BUILDDIR, "test", "couchdb", "ebin"])).
--define(TESTS_TEMP, filename:join([?BUILDDIR, "test", "couchdb", "temp"])).
+-define(TESTS_EBIN, filename:join([?BUILDDIR, "test", "couchdb", "ebin", ""])).
+-define(TESTS_TEMP, filename:join([?BUILDDIR, "test", "couchdb", "temp", ""])).
main([]) ->
io:fwrite("Path to test file or directory wasn't specified.~n"),
@@ -79,7 +79,8 @@ compile(Files) ->
fun(File)->
io:fwrite("compile ~p~n", [File]),
Opts = [report, verbose, {outdir, ?TESTS_EBIN},
- {i, filename:join([?BUILDDIR, "test", "couchdb"])},
+ {i, filename:join([?BUILDDIR, "test", "couchdb",
+ "include"])},
{i, filename:join([?SOURCEDIR, "src"])}],
{ok, Mod} = compile:file(File, Opts),
Mod