2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2017, 2021 Gary Mills
14 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
17 %patch% 01-extdiff.patch
18 %patch% 02-journal.patch
19 %patch% 03-Timout.patch
20 %patch% 04-wait-on-file.patch
23 COMPONENT_FMRI = developer/versioning/mercurial
24 COMPONENT_CLASSIFICATION = Development/Source Code Management
26 # This is a standalone application. Since no other Python project depends on
27 # it we just provide single unversioned package.
28 SINGLE_PYTHON_VERSION = yes
32 # Build and install documentation
33 COMPONENT_POST_BUILD_ACTION += cd $(@D) ; $(ENV) $(COMPONENT_BUILD_ENV) $(GMAKE) doc ;
34 COMPONENT_POST_INSTALL_ACTION += cd $(@D) ; $(ENV) $(COMPONENT_INSTALL_ENV) $(GMAKE) DESTDIR=$(PROTO_DIR) PREFIX=$(USRDIR) install-doc ;
36 # Use bash in sh mode for the tests; using /bin/sh on Solaris hasn't always
37 # worked, and using /bin/bash doesn't always work, either. Also skip the
38 # tests which try to check all the code in the userland gate. And finally,
39 # test the bits from the proto area, rather than rebuilding. Given the way the
40 # test suite works, the hg executable must be named "hg".
44 test-devel-warnings.t \
48 test-removeemptydirs.t \
51 # https://bz.mercurial-scm.org/show_bug.cgi?id=6402
52 TEST_BLACKLIST += test-stdio.py
54 # https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/093876.html
57 test-bundle2-exchange.t
59 # https://bz.mercurial-scm.org/show_bug.cgi?id=6915
60 TEST_BLACKLIST += test-patchbomb.t
62 # https://bz.mercurial-scm.org/show_bug.cgi?id=6899
63 TEST_BLACKLIST += test-revlog-mmapindex.t
65 COMPONENT_PRE_TEST_ACTION += \
66 (cd $(BUILD_DIR); rm -f sh; ln -s /bin/bash sh; \
67 printf "%s\n" $(TEST_BLACKLIST) > blacklist);
70 COMPONENT_TEST_DIR = $(@D)/tests
71 COMPONENT_TEST_ENV += TERM=dumb
72 COMPONENT_TEST_ENV += HGTEST_JOBS=$(or $(HGTEST_JOBS),1)
73 COMPONENT_TEST_ENV += PATH=$(PATH.gnu)
74 COMPONENT_TEST_CMD = $(PYTHON)
75 COMPONENT_TEST_ARGS = ./run-tests.py \
77 --shell $(BUILD_DIR)/sh \
78 --with-hg $(PROTOUSRBINDIR)/hg \
79 --blacklist $(BUILD_DIR)/blacklist
80 COMPONENT_TEST_TARGETS =
82 # Random temporary directory
83 COMPONENT_TEST_TRANSFORMS += "-e 's|/tmp/hgtests\.[^ ]\{8\}|\$$(HGTMP)|g'"
84 # Sequential number of test working directory
85 COMPONENT_TEST_TRANSFORMS += "-e 's|\(/child\)[0-9]\{1,\}/|\1X/|g'"
87 COMPONENT_TEST_TRANSFORMS += "-e 's/\([Dd]aemon process \)[0-9]\{1,\}/\1\$$(PID)/'"