pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/regress Add pkgfail, a simple regression test which en...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a7dfcd883c51
branches: trunk
changeset: 480011:a7dfcd883c51
user: gavan <gavan%pkgsrc.org@localhost>
date: Sat Aug 28 00:19:17 2004 +0000
description:
Add pkgfail, a simple regression test which ensures that PKG_FAIL_REASON works.
This test serves as a simple example of how to write a regression test.
diffstat:
regress/Makefile | 3 +-
regress/pkgfail/Makefile | 12 +++++++++++
regress/pkgfail/spec | 52 ++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 66 insertions(+), 1 deletions(-)
diffs (85 lines):
diff -r be5a7994303e -r a7dfcd883c51 regress/Makefile
--- a/regress/Makefile Fri Aug 27 22:08:55 2004 +0000
+++ b/regress/Makefile Sat Aug 28 00:19:17 2004 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2004/08/27 21:35:21 jlam Exp $
+# $NetBSD: Makefile,v 1.3 2004/08/28 00:19:17 gavan Exp $
COMMENT= Regression tests for pkgsrc infrastructure
SUBDIR+= buildlink-transform
+SUBDIR+= pkgfail
.include "../mk/bsd.pkg.subdir.mk"
diff -r be5a7994303e -r a7dfcd883c51 regress/pkgfail/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/pkgfail/Makefile Sat Aug 28 00:19:17 2004 +0000
@@ -0,0 +1,12 @@
+# $NetBSD: Makefile,v 1.1 2004/08/28 00:19:17 gavan Exp $
+#
+
+DISTNAME= regress-pkgfail-0.0
+CATEGORIES= regress
+
+MAINTAINER= gavan%NetBSD.org@localhost
+COMMENT= Test PKG_FAIL_REASON
+
+PKG_FAIL_REASON= "This package should never build"
+
+.include "../../mk/bsd.pkg.mk"
diff -r be5a7994303e -r a7dfcd883c51 regress/pkgfail/spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/pkgfail/spec Sat Aug 28 00:19:17 2004 +0000
@@ -0,0 +1,52 @@
+# pkgfail regression test
+# spec file
+#
+# A spec file is sourced by the pkg_regress script. The following variables
+# control the basic aspects of the individual test.
+#
+# Variables starting TEST_ are reserved, and should not be used in this file.
+#
+
+# MAKEARGS_TEST is the make target(s) and any extra arguments to invoke make
+# in the regression testing directory. If empty, make will be invoked with
+# no arguments.
+
+MAKEARGS_TEST=install
+
+# MAKEARGS_CLEAN is the make target(s) and any extra arguments to invoke make
+# in the regression testing directory in order to clean up. This is the final
+# step which is taken, and occurs after the determination of pass/fail for
+# the test. A typical value for this variable may be "deinstall clean".
+# This variable is optional.
+
+#MAKEARGS_CLEAN=
+
+
+check_result()
+{
+# exit_status compares its argument against the exit status from make. If not
+# the same, the test is failed.
+
+exit_status 1
+
+# output_require passes a list of patterns to egrep to check for in the output
+# from the make invocation. If any pattern is not matched, the test is failed.
+
+output_require "This package should never build"
+
+# output_prohibit passes a list of patterns to egrep to check for in the output
+# from the make invocation. If any pattern is matched, the test is failed.
+
+# output_prohibit ""
+
+}
+
+
+# Environment variables may be set here to be passed to subprocesses such as
+# make.
+
+#export VARIABLE=value
+
+# Other scripting that may be required prior to execution of the test may
+# be placed here. Please note that if possible, logic should be confined
+# to the Makefile and not placed here.
Home |
Main Index |
Thread Index |
Old Index