trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject trafficserver git commit: Various TSQA build improvements
Date Sun, 10 May 2015 21:11:42 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master dc45acfdf -> 55530007c


Various TSQA build improvements


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

Branch: refs/heads/master
Commit: 55530007c4416d589d1b70d9c74a4eb3e3f20e1b
Parents: dc45acf
Author: James Peach <jpeach@apache.org>
Authored: Sun May 10 14:11:13 2015 -0700
Committer: James Peach <jpeach@apache.org>
Committed: Sun May 10 14:11:13 2015 -0700

----------------------------------------------------------------------
 ci/tsqa/Makefile   | 29 +++++++++++++++++++++--------
 ci/tsqa/README.rst |  2 ++
 2 files changed, 23 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/55530007/ci/tsqa/Makefile
----------------------------------------------------------------------
diff --git a/ci/tsqa/Makefile b/ci/tsqa/Makefile
index c692857..6b58359 100644
--- a/ci/tsqa/Makefile
+++ b/ci/tsqa/Makefile
@@ -14,30 +14,43 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-.PHONY: test clean update
+.PHONY: test list clean update bootstrap
 
 VIRTUALENV_DIR = virtualenv
 
 # Run all tests.
 test: $(VIRTUALENV_DIR)
-	$(VIRTUALENV_DIR)/bin/nosetests --with-xunit -sv --logging-level=INFO
+	@. $(VIRTUALENV_DIR)/bin/activate && $(VIRTUALENV_DIR)/bin/nosetests --with-xunit
-sv --logging-level=INFO
 
 # Scan and list the tests.
 list: $(VIRTUALENV_DIR)
-	@source $(VIRTUALENV_DIR)/bin/activate && $(VIRTUALENV_DIR)/bin/nosetests -v --collect-only
+	@. $(VIRTUALENV_DIR)/bin/activate && $(VIRTUALENV_DIR)/bin/nosetests -sv --collect-only
 
 # Construct the virtualenv.
-$(VIRTUALENV_DIR):
+$(VIRTUALENV_DIR): $(VIRTUALENV_DIR)/.done
+
+$(VIRTUALENV_DIR)/.done:
 	@if [ ! -d $(VIRTUALENV_DIR) ]; then\
 		virtualenv $(VIRTUALENV_DIR);\
 	fi
-	@# Update the virtualenv with your dep libraries
-	source $(VIRTUALENV_DIR)/bin/activate && $(VIRTUALENV_DIR)/bin/pip install -r requirements.txt
+	$(MAKE) update
 	@echo "Virtualenv ready!"
 
 # Update the virtualenv with the latest TSQA package and dependencies.
-update: $(VIRTUALENV_DIR)
-	source $(VIRTUALENV_DIR)/bin/activate && $(VIRTUALENV_DIR)/bin/pip install --upgrade
-r requirements.txt
+update:
+	@rm -f $(VIRTUALENV_DIR)/.done
+	@. $(VIRTUALENV_DIR)/bin/activate && \
+		$(VIRTUALENV_DIR)/bin/pip install --upgrade -r requirements.txt && \
+		touch $(VIRTUALENV_DIR)/.done
+
+# Install TSQA bootstrap dependencies.
+bootstrap:
+	@if [ -e /etc/debian_version ]; then \
+		apt-get install -y python-pip python-virtualenv python-dev libffi-dev ; \
+	fi
+	@if [ -e /etc/redhat-release ]; then \
+		yum install -y python-pip python-virtualenv python-devel libcffi-devel ; \
+	fi
 
 clean:
 	rm -rf virtualenv

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/55530007/ci/tsqa/README.rst
----------------------------------------------------------------------
diff --git a/ci/tsqa/README.rst b/ci/tsqa/README.rst
index 236ffb7..0e55c8b 100644
--- a/ci/tsqa/README.rst
+++ b/ci/tsqa/README.rst
@@ -23,6 +23,8 @@ two external depencies (below package names are for RHEL/Centos):
     - python-virtualenv
     - libcffi-devel
 
+Run ``sudo make bootstrap`` to install the TSQA dependencies.
+
 Once these two packages are available you simply need to run "make test" in this
 directory to run all tests.
 


Mime
View raw message