Makefile revision 5343
147N/A#
147N/A# CDDL HEADER START
147N/A#
147N/A# The contents of this file are subject to the terms of the
147N/A# Common Development and Distribution License (the "License").
147N/A# You may not use this file except in compliance with the License.
147N/A#
147N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
147N/A# or http://www.opensolaris.org/os/licensing.
147N/A# See the License for the specific language governing permissions
147N/A# and limitations under the License.
147N/A#
147N/A# When distributing Covered Code, include this CDDL HEADER in each
147N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
147N/A# If applicable, add the following below this CDDL HEADER, with the
147N/A# fields enclosed by brackets "[]" replaced with your own identifying
147N/A# information: Portions Copyright [yyyy] [name of copyright owner]
147N/A#
147N/A# CDDL HEADER END
147N/A#
2899N/A
147N/A#
147N/A# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
147N/A#
147N/A
147N/Ainclude ../../../make-rules/shared-macros.mk
147N/A
147N/ACOMPONENT_NAME= nose
147N/ACOMPONENT_VERSION= 1.3.6
844N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
844N/ACOMPONENT_PROJECT_URL= https://github.com/nose-devs/nose
147N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
1258N/ACOMPONENT_ARCHIVE_HASH= \
147N/A sha256:f61e0909a743eed37b1207e38a8e7b4a2fe0a82185e36f2be252ef1b3f901758
2899N/ACOMPONENT_ARCHIVE_URL= https://pypi.python.org/packages/source/n/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
2899N/ACOMPONENT_BUGDB= python-mod/nose
147N/A
147N/ATPNO= 22206
147N/A
147N/Ainclude $(WS_MAKE_RULES)/prep.mk
147N/Ainclude $(WS_MAKE_RULES)/setup.py.mk
147N/Ainclude $(WS_MAKE_RULES)/ips.mk
206N/A
206N/AASLR_MODE = $(ASLR_NOT_APPLICABLE)
206N/A
206N/A$(SOURCE_DIR)/.prep: PYTHON_VERSION=3.4
806N/A
806N/ACOMPONENT_TEST_DIR = $(SOURCE_DIR)
806N/ACOMPONENT_TEST_ARGS = selftest.py
806N/A
806N/A# Used to automatically run the Python 2.6 nose tests even though there was
147N/A# an error found when running one of the Python 2.7 ones.
147N/ACOMPONENT_TEST_ARGS += || true
147N/A
806N/A# Save an original copy of the test script to be able to edit it correctly
206N/A# for each version of Python and build the tests once.
147N/ACOMPONENT_POST_UNPACK_ACTION += \
147N/A ($(CP) $(SOURCE_DIR)/selftest.py $(SOURCE_DIR)/selftest.py.orig ; \
147N/A cd $(COMPONENT_TEST_DIR); $(COMPONENT_TEST_ENV_CMD) \
147N/A $(COMPONENT_TEST_ENV) \
147N/A $(COMPONENT_TEST_CMD) setup.py build_tests)
147N/A
1938N/A# We need to adjust the script that is used to run the tests, to pick the
1938N/A# appropriate nose in the proto area depending upon which version of Python
3477N/A# we are running the tests against.
3477N/ACOMPONENT_PRE_TEST_ACTION = \
147N/A $(GSED) -e "s|'build', 'lib\*'|'..', 'build', 'prototype', '$(MACH)', 'usr', 'lib', 'python$(PYTHON_VERSION)', 'vendor-packages\*'|" \
147N/A $(SOURCE_DIR)/selftest.py.orig > $(SOURCE_DIR)/selftest.py
181N/A
147N/A# The test output can contain non-deterministic results because "chances are
181N/A# you will experience odd, intermittent and unexplainable failures and errors"
147N/A# when using the multiprocess plug. See:
147N/A# http://nose.readthedocs.org/en/latest/plugins/multiprocess.html
147N/A# CR #20470423 has been filed to investigate these failures.
147N/A#
# Because of this we use nawk to just extract lines starting with:
# ERROR: ...
# Ran 3XX tests in ...
# FAILED ...
# OK
# stripping out the random portions (like time to complete the tests).
COMPONENT_TEST_TRANSFORMER = $(NAWK)
COMPONENT_TEST_TRANSFORMS = "'/^ERROR: / { print }; /^Ran / { sub(\" tests in .+s\", \" tests in\"); print }; /^FAILED / { print }; /^OK / { print };'"
COMPONENT_SYSTEM_TEST_DIR = $(SOURCE_DIR)
COMPONENT_SYSTEM_TEST_ENV =
COMPONENT_SYSTEM_TEST_ARGS = selftest.py
build: $(BUILD_NO_ARCH)
install: $(INSTALL_NO_ARCH)
test: $(TEST_NO_ARCH)
system-test: $(SYSTEM_TEST_NO_ARCH)
REQUIRED_PACKAGES += library/python/setuptools-27
REQUIRED_PACKAGES += library/python/setuptools-34