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