pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mk/tests: clean up test.subr



Module Name:	pkgsrc-wip
Committed By:	Roland Illig <roland.illig%gmx.de@localhost>
Pushed By:	rillig
Date:		Fri Mar 9 02:10:39 2018 +0100
Changeset:	15cd12c9a45c82216594cd5cd65b5ad4aeb99cd0

Modified Files:
	mk/tests/test.subr

Log Message:
mk/tests: clean up test.subr

This code has been spread into the individual test files.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=15cd12c9a45c82216594cd5cd65b5ad4aeb99cd0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 mk/tests/test.subr | 47 -----------------------------------------------
 1 file changed, 47 deletions(-)

diffs:
diff --git a/mk/tests/test.subr b/mk/tests/test.subr
index 0ca674717d..18433acb15 100644
--- a/mk/tests/test.subr
+++ b/mk/tests/test.subr
@@ -180,50 +180,3 @@ assert_that() {
 	(*)	die "assert_that called with invalid arguments: $*"
 	esac
 }
-
-test_scm() {
-	case "$1" in
-	(cvs)		scm_display_name="CVS"		scm_tag_varname="CVS_TAG"	;;
-	(fossil)	scm_display_name="Fossil"	scm_tag_varname="FOSSIL_VERSION";;
-	(git)		scm_display_name="Git"		scm_tag_varname="GIT_TAG"	;;
-	(hg)		scm_display_name="Mercurial"	scm_tag_varname="HG_TAG"	;;
-	(svn)		scm_display_name="Subversion"	scm_tag_varname="SVN_REVISION"	;;
-	esac
-
-	step "Setting up $scm_display_name repository"
-	rm -rf "$repodir"
-	setup_${1}_repository
-	wrkdir=`pkgsrc_make show-var VARNAME=WRKDIR`
-
-	: step "Dumping API variables for $scm_display_name (for manual inspection)"
-	: SCM_UNDER_TEST="$1" pkgsrc_make clean
-	: SCM_UNDER_TEST="$1" pkgsrc_make "show-all-$1"
-	:
-	: "needs to be inspected manually"
-
-	step "Testing $scm_display_name"
-	: pkgsrc_make clean
-	PKG_DEBUG_LEVEL=0 pkgsrc_make -f "$1-1-single.mk" clean
-	PKG_DEBUG_LEVEL=0 pkgsrc_make -f "$1-1-single.mk" build
-	#PKG_DEBUG_LEVEL=0 pkgsrc_make -f "$1-1-single.mk" do-build
-	exit 1
-	:
-	assert_that --file "$wrkdir/pkgbase/today" --has-content "2018-03-01"
-	assert_that --file "$wrkdir/2017/today"    --has-content "2017-01-01"
-	assert_that --file "$wrkdir/current/today" --has-content "2018-03-01"
-
-	step "Testing $scm_display_name with CHECKOUT_DATE"
-	SCM_UNDER_TEST="$1" pkgsrc_make clean
-	SCM_UNDER_TEST="$1" CHECKOUT_DATE="2018-02-01" pkgsrc_make patch
-	:
-	assert_that --file "$wrkdir/pkgbase/today" --has-content "2018-01-01"
-
-	step "Testing $scm_display_name with tagged checkout"
-	SCM_UNDER_TEST="$1" pkgsrc_make clean
-	tag_value="v2017"; test "$1" = "svn" && tag_value="1"
-	eval "SCM_UNDER_TEST=\"\$1\" $scm_tag_varname=\"\$tag_value\" pkgsrc_make patch"
-	:
-	assert_that --file "$wrkdir/pkgbase/today" --has-content "2017-01-01"
-
-	SCM_UNDER_TEST="$1" pkgsrc_make clean
-}


Home | Main Index | Thread Index | Old Index