head	1.2;
access;
symbols
	pkgsrc-2026Q1:1.2.0.48
	pkgsrc-2026Q1-base:1.2
	pkgsrc-2025Q4:1.2.0.46
	pkgsrc-2025Q4-base:1.2
	pkgsrc-2025Q3:1.2.0.44
	pkgsrc-2025Q3-base:1.2
	pkgsrc-2025Q2:1.2.0.42
	pkgsrc-2025Q2-base:1.2
	pkgsrc-2025Q1:1.2.0.40
	pkgsrc-2025Q1-base:1.2
	pkgsrc-2024Q4:1.2.0.38
	pkgsrc-2024Q4-base:1.2
	pkgsrc-2024Q3:1.2.0.36
	pkgsrc-2024Q3-base:1.2
	pkgsrc-2024Q2:1.2.0.34
	pkgsrc-2024Q2-base:1.2
	pkgsrc-2024Q1:1.2.0.32
	pkgsrc-2024Q1-base:1.2
	pkgsrc-2023Q4:1.2.0.30
	pkgsrc-2023Q4-base:1.2
	pkgsrc-2023Q3:1.2.0.28
	pkgsrc-2023Q3-base:1.2
	pkgsrc-2023Q2:1.2.0.26
	pkgsrc-2023Q2-base:1.2
	pkgsrc-2023Q1:1.2.0.24
	pkgsrc-2023Q1-base:1.2
	pkgsrc-2022Q4:1.2.0.22
	pkgsrc-2022Q4-base:1.2
	pkgsrc-2022Q3:1.2.0.20
	pkgsrc-2022Q3-base:1.2
	pkgsrc-2022Q2:1.2.0.18
	pkgsrc-2022Q2-base:1.2
	pkgsrc-2022Q1:1.2.0.16
	pkgsrc-2022Q1-base:1.2
	pkgsrc-2021Q4:1.2.0.14
	pkgsrc-2021Q4-base:1.2
	pkgsrc-2021Q3:1.2.0.12
	pkgsrc-2021Q3-base:1.2
	pkgsrc-2021Q2:1.2.0.10
	pkgsrc-2021Q2-base:1.2
	pkgsrc-2021Q1:1.2.0.8
	pkgsrc-2021Q1-base:1.2
	pkgsrc-2020Q4:1.2.0.6
	pkgsrc-2020Q4-base:1.2
	pkgsrc-2020Q3:1.2.0.4
	pkgsrc-2020Q3-base:1.2
	pkgsrc-2020Q2:1.2.0.2
	pkgsrc-2020Q2-base:1.2;
locks; strict;
comment	@# @;


1.2
date	2020.05.02.07.24.32;	author rillig;	state Exp;
branches;
next	1.1;
commitid	tKxRCw5YybIWwD6C;

1.1
date	2020.05.01.18.37.59;	author rillig;	state Exp;
branches;
next	;
commitid	lyLO2VMAZxerhz6C;


desc
@@


1.2
log
@regress: move tests for platform tools to tools-platform
@
text
@# $NetBSD: spec,v 1.1 2020/05/01 18:37:59 rillig Exp $
#
# Tests for the platform-provided tools.
#
# The individual *.test files are run in a minimal environment.
# In that environment, only the PATH is set, and it points to a
# directory containing only the tools from mk/tools/tools.${OPSYS}.mk.
#
# Additionally, MACHINE_PLATFORM is set, so that the tests can expect
# different results depending on the platform.  This is used for
# documenting bugs that have been fixed in a certain version.
#
# The individual tests may create arbitrary files in their current
# working directory.
#

do_test() {
	regressdir="$PWD"
	tmpdir="$(mktemp -d)" || { TEST_EXITSTATUS=$?; return; }
	bindir="$tmpdir/bin"
	mkdir "$bindir"
	(
		cd ../../pkgtools/digest \
		&& $TEST_MAKE \
			BINDIR="$bindir" \
			-f "$regressdir/zzz-prepare-tools.mk" \
			"prepare-platform-tools"
	)
	machine_platform=$(
		cd ../../pkgtools/digest \
		&& $TEST_MAKE show-var VARNAME=MACHINE_PLATFORM
	)

	for testfile in *.test; do
		mkdir "$tmpdir/work"
		(cd "$tmpdir/work" && "$bindir/env" -i \
			MACHINE_PLATFORM="$machine_platform" \
			PATH="$bindir" \
			"sh" "$regressdir/$testfile") \
		|| TEST_EXITSTATUS=$?
		rm -rf "$tmpdir/work"
	done

	rm -rf "$tmpdir"
}

check_result() {
	exit_status 0
}
@


1.1
log
@regress: add tools-platform/ for testing the platform tools

Right now, the tests in regress/tools are a mixture of testing the pkgsrc
infrastructure in mk/tools and the tools provided by the platforms.
These don't go well together, therefore the tests for the platform tools
will be migrated here.
@
text
@d1 1
a1 1
# $NetBSD$
d9 4
d29 4
d36 3
a38 1
		(cd "$tmpdir/work" && "$bindir/env" -i PATH="$bindir" \
@

