Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8D50F1823C for ; Wed, 11 Nov 2015 23:07:18 +0000 (UTC) Received: (qmail 20607 invoked by uid 500); 11 Nov 2015 23:07:14 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 20313 invoked by uid 500); 11 Nov 2015 23:07:14 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 18312 invoked by uid 99); 11 Nov 2015 23:07:13 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2015 23:07:13 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D7805E5708; Wed, 11 Nov 2015 23:07:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kxepal@apache.org To: commits@couchdb.apache.org Date: Wed, 11 Nov 2015 23:08:02 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [50/50] couchdb commit: updated refs/heads/2876-js-tests to bd19653 Merge branch 'master' into 2876-js-tests Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/bd19653c Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/bd19653c Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/bd19653c Branch: refs/heads/2876-js-tests Commit: bd19653c6e588ccb647f955d52524bda90d61efb Parents: 805a427 486181f Author: Alexander Shorin Authored: Thu Nov 12 02:03:42 2015 +0300 Committer: Alexander Shorin Committed: Thu Nov 12 02:03:42 2015 +0300 ---------------------------------------------------------------------- .gitignore | 1 + .travis.yml | 11 +- INSTALL.Unix.md | 4 +- INSTALL.Windows.md | 2 +- LICENSE | 24 +++ Makefile | 308 ++++++++++++++++++++++++-------- NOTICE | 6 +- README-DEV.md | 190 -------------------- README-DEV.rst | 247 +++++++++++++++++++++++++ build-aux/couchdb-build-release.sh | 9 +- configure | 18 +- dev/run | 21 ++- rebar.config.script | 39 ++-- rel/files/eunit.config | 32 ++++ rel/files/sys.config | 2 +- rel/overlay/etc/default.ini | 5 + run-tests.sh | 9 - 17 files changed, 608 insertions(+), 320 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/bd19653c/Makefile ---------------------------------------------------------------------- diff --cc Makefile index 79b717a,3387232..614280c --- a/Makefile +++ b/Makefile @@@ -19,34 -19,178 +19,188 @@@ COUCHDB_VERSION = $(vsn_major).$(vsn_mi DESTDIR= + # Rebar options + apps= + skip_deps=folsom,lager,meck,mochiweb,proper,snappy + suites= + tests= + + EUNIT_OPTS=$(shell echo "\ + apps=$(apps) \ + skip_deps=$(skip_deps) \ + suites=$(suites) \ + tests=$(tests) \ + " | sed -e 's/[a-z]\+= / /g') + DIALYZE_OPTS=$(shell echo "\ + apps=$(apps) \ + skip_deps=$(skip_deps) \ + " | sed -e 's/[a-z]\+= / /g') + + + ################################################################################ + # Main commands + ################################################################################ + + + .PHONY: all + # target: all - Build everything all: couch fauxton docs - config.erl: - @echo "Apache CouchDB has not been configured." - @echo "Try \"./configure -h\" for help." - @echo - @false + .PHONY: help + # target: help - Print this help + help: + @egrep "^# target: " Makefile \ + | sed -e 's/^# target: //g' \ + | sort \ + | awk '{printf(" %-20s", $$1); $$1=$$2=""; print "-" $$0}' + + + ################################################################################ + # Building + ################################################################################ + + + .PHONY: couch + # target: couch - Build CouchDB core couch: config.erl - @${REBAR} compile + @$(REBAR) compile @cp src/couch/priv/couchjs bin/ - clean: - @${REBAR} -r clean - @rm -f bin/couchjs - @rm -rf src/*/ebin - @rm -rf src/*/.rebar - @rm -rf src/*/priv/*.so - @rm -rf src/couch/priv/{couchspawnkillable,couchjs} - @rm -rf share/server/main.js share/server/main-coffee.js - @rm -rf tmp dev/data dev/lib dev/logs - @rm -f src/couch/priv/couchspawnkillable - @rm -f src/couch/priv/couch_js/config.h - @rm -f dev/boot_node.beam dev/pbkdf2.pyc log/crash.log - check: javascript eunit build-test + .PHONY: docs + # target: docs - Build documentation + docs: src/docs/build + + + .PHONY: fauxton + # target: fauxton - Build Fauxton web UI + fauxton: share/www + + + ################################################################################ + # Testing + ################################################################################ + + + .PHONY: check + # target: check - Test everything + check: + @$(MAKE) eunit + @$(MAKE) javascript + @$(MAKE) build-test + + + .PHONY: eunit + # target: eunit - Run EUnit tests, use EUNIT_OPTS to provide custom options + eunit: export BUILDDIR = $(shell pwd) + eunit: export ERL_AFLAGS = -config $(shell pwd)/rel/files/eunit.config + eunit: couch + @$(REBAR) setup_eunit 2> /dev/null + @$(REBAR) -r eunit $(EUNIT_OPTS) + + + .PHONY: javascript + # target: javascript - Run JavaScript test suites or specific ones defined by suites option -javascript: all share/www/script/test - @dev/run -q --with-admin-party-please test/javascript/run $(suites) ++javascript: all ++ @mkdir -p share/www/test ++ifeq ($(IN_RELEASE), true) ++ @cp test/javascript/tests/lorem*.txt share/www/test/ ++else ++ # FIXME: strange path ahead! ++ @mkdir -p src/fauxton/dist/release/test ++ @cp test/javascript/tests/lorem*.txt src/fauxton/dist/release/test/ ++endif ++ # 2 remedy problems w/ "internal server error" remove dev/lib ++ @dev/run -q --with-admin-party-please test/javascript/run ++ @rm -rf share/www/script + + + .PHONY: list-eunit-apps + # target: list-eunit-apps - List EUnit target apps + list-eunit-apps: + @find ./src/ -type f -name *_test.erl -o -name *_tests.erl \ + | cut -d '/' -f 3 \ + | sort -u + + + .PHONY: list-eunit-suites + # target: list-eunit-suites - List EUnit target test suites + list-eunit-suites: + @find ./src/ -type f -name *_test.erl -o -name *_tests.erl -printf "%f\n" \ + | cut -d '.' -f -1 \ + | sort + + + .PHONY: list-js-suites + # target: list-js-suites - List JavaScript test suites + list-js-suites: + @find ./test/javascript/tests/ -type f -name *.js -printf "%f\n" \ + | cut -d '.' -f -1 \ + | sort + + + .PHONY: build-test + # target: build-test - Test build script + build-test: + @test/build/test-configure.sh + + + ################################################################################ + # Developing + ################################################################################ + + + .PHONY: build-plt + # target: build-plt - Build project-specific PLT + build-plt: + @$(REBAR) -r build-plt $(DIALYZE_OPTS) + + + .PHONY: check-plt + # target: check-plt - Check the PLT for consistency and rebuild it if it is not up-to-date + check-plt: + @$(REBAR) -r check-plt $(DIALYZE_OPTS) + + + .PHONY: dialyze + # target: dialyze - Analyze the code for discrepancies + dialyze: .rebar + @$(REBAR) -r dialyze $(DIALYZE_OPTS) + + + .PHONY: docker-image + # target: docker-image - Build Docker image + docker-image: + @docker build --rm -t couchdb/dev-cluster . + + + .PHONY: docker-start + # target: docker-start - Start CouchDB in Docker container + docker-start: + @docker run -d -P -t couchdb/dev-cluster > .docker-id + + + .PHONY: docker-stop + # target: docker-stop - Stop Docker container + docker-stop: + @docker stop `cat .docker-id` + + + .PHONY: introspect + # target: introspect - Check for commits difference between rebar.config and repository + introspect: + @$(REBAR) -r update-deps + @./introspect + + + ################################################################################ + # Distributing + ################################################################################ - # creates a full erlang release + + .PHONY: dist + # target: dist - Make release tarball dist: all @./build-aux/couchdb-build-release.sh $(COUCHDB_VERSION) @@@ -190,8 -341,9 +351,3 @@@ ifeq ($(with_fauxton), 1 @echo "Building Fauxton" @cd src/fauxton && npm install && ./node_modules/grunt-cli/bin/grunt couchdb endif -- - .PHONY: introspect - introspect: - ${REBAR} -r update-deps - ./introspect - -share/www/script/test: - @# TODO: Fix tests to look for these files in their new path - @mkdir -p $@ - @cp test/javascript/tests/lorem*.txt share/www/script/test/