Makefile revision 1874
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# CDDL HEADER START
1fa26403d7679235a30fbf6289f68fed5872df30Mark Andrews#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# The contents of this file are subject to the terms of the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Common Development and Distribution License (the "License").
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# You may not use this file except in compliance with the License.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# or http://www.opensolaris.org/os/licensing.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# See the License for the specific language governing permissions
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# and limitations under the License.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# If applicable, add the following below this CDDL HEADER, with the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews#
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews# CDDL HEADER END
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsinclude ../../make-rules/shared-macros.mk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsCOMPONENT_NAME= logilab-astng
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCOMPONENT_VERSION= 0.24.0
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsCOMPONENT_PROJECT_URL= http://www.logilab.org/project/logilab-astng/
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsCOMPONENT_ARCHIVE_HASH= \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews sha256:2d9413fa338ccf8b3f4b86520b385e9d35e848117dc7602b3994972a3163647f
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsCOMPONENT_ARCHIVE_URL= http://download.logilab.org/pub/astng/$(COMPONENT_ARCHIVE)
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsCOMPONENT_BUGDB= python-mod/logilab-astng
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsinclude ../../make-rules/prep.mk
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsinclude ../../make-rules/ips.mk
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewsinclude ../../make-rules/setup.py.mk
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# common targets
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrewsbuild: $(BUILD_NO_ARCH)
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninstall: $(INSTALL_NO_ARCH)
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# The tests are run using python 2.7 only and require that
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# the python-27 package is installed (does not have to be the default python).
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Testing using python-26 is done manually, since it requires
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# downloading and installing the unittest2 component (not part of Solaris).
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# which provides python 2.7 functionality to the unittest python library
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# in the python2.6 package.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Use the python 2.7 libraries for testing.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrewstest: PYTHON_VERSION=2.7
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# logilab-common is a runtime dependency of logilab-astng,
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# and we need to use its latest version from the workspace.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# We can't just add its install target as a dependency here,
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# so just run "gmake install" in the logilab-common component directory
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# before running logilab-astng tests.
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsCOMPONENT_PRE_TEST_ACTION = ( $(GMAKE) -C \
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews $(COMPONENT_DIR)/../logilab-common install )
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsCOMPONENT_TEST_ENV = PYTHONPATH=$(COMPONENT_DIR)/../logilab-common/build/prototype/$(MACH)$(PYTHON_VENDOR_PACKAGES):$(PROTO_DIR)$(PYTHON_VENDOR_PACKAGES)
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Run pytest-2.7 from logilab-common's proto area for now, until the
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# new version of logilab-common containing pytest is in CBE.
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Then we can change it to /usr/bin/pytest-$(PYTHON_VERSION).
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsCOMPONENT_TEST_CMD = $(COMPONENT_DIR)/../logilab-common/build/prototype/$(MACH)/usr/bin/pytest-$(PYTHON_VERSION)
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsCOMPONENT_TEST_ARGS =
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Expected failures for test target:
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# sparc:
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# 242 test cases, 2 failures, 6 skipped
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# 8 modules OK (1 failed)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# failures: unittest_builder [2/55]
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# x86:
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# 242 test cases, 4 failures, 8 skipped
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# 6 modules OK (3 failed)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# failures: unittest_builder [2/55], unittest_lookup [1/21],
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# unittest_inference [1/75]
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssontest: $(TEST_NO_ARCH)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsinclude ../../make-rules/depend.mk
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews