PERFORCE change 176194 for review
Garrett Cooper
gcooper at FreeBSD.org
Sun Mar 28 10:04:51 UTC 2010
http://p4web.freebsd.org/chv.cgi?CH=176194
Change 176194 by gcooper at gcooper-bayonetta on 2010/03/28 10:04:05
- Simplify test script. Add another negative testcase for an invalid version string.
- Fix compile error with version/perform.c
Affected files ...
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/tools/regression/usr.sbin/pkg_install/version/test_index_search.sh#2 edit
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/version/perform.c#4 edit
Differences ...
==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/tools/regression/usr.sbin/pkg_install/version/test_index_search.sh#2 (text+ko) ====
@@ -3,7 +3,12 @@
# A simple script for testing -I (INDEX lookup).
#
+set -e
+
# XXX (gcooper): hardcoding version in test is BAD!
-UNAME_r=8.0-RELEASE pkg_version -I >/dev/null || exit $?
+UNAME_r=8.0-RELEASE pkg_version -I >/dev/null
export UNAME_r=1142.0-RELEASE
pkg_version -I 2>&1 | grep -Eq "pkg_version: Unable to open.*INDEX-${UNAME_r%.*}"
+# Battle of Britain: TAKA TAKA TAKA TAKA TAKA TAKA!
+export UNAME_r=Iveseenmonkiescodebetterthanthis
+pkg_version -I 2>&1 | grep -Eq "bad release version specified: $UNAME_r"
==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/version/perform.c#4 (text+ko) ====
@@ -60,7 +60,8 @@
__func__);
return 1;
} else if ((rel_major_ver = (int) strtol(u.release, NULL, 10)) <= 0) {
- warnx("%s.%s: release version specified: %s", u.release);
+ warnx("%s.%s: bad release version specified: %s", progname, __func__,
+ u.release);
return 1;
}
More information about the p4-projects
mailing list