add a check for system-version, since I tend to reverse comparisons
authorespie <espie@openbsd.org>
Mon, 15 Mar 2021 09:26:29 +0000 (09:26 +0000)
committerespie <espie@openbsd.org>
Mon, 15 Mar 2021 09:26:29 +0000 (09:26 +0000)
regress/usr.sbin/pkg_add/Makefile
regress/usr.sbin/pkg_add/system-version.ref [new file with mode: 0644]

index 762737d..81ad3b5 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.75 2019/08/20 11:05:42 espie Exp $
+# $OpenBSD: Makefile,v 1.76 2021/03/15 09:26:29 espie Exp $
 
 REGRESS_TARGETS=pkgnames pkgpaths signatures depends-check longnames pkgcfl \
        collision-check1 collision-check2 collision-check3 \
@@ -12,7 +12,7 @@ REGRESS_TARGETS=pkgnames pkgpaths signatures depends-check longnames pkgcfl \
        usertest-1 usertest-2 usertest-3 cups-bug nettle-bug \
        tying-1 tying-2 tag-delete setsprint temp-error1 \
        temp-error2 temp-error2-as-root temp-error3 temp-error4 \
-       cksum-error
+       cksum-error system-version
 
 REGRESS_ROOT_TARGETS = temp-error2-as-root
 
@@ -48,7 +48,7 @@ D$i ?= ${.OBJDIR}/dest$i
 DEST$i ?= ${D$i}/usr/local
 .endfor
 
-# current maxes (used): D44, SRC27, plist24, rep5
+# current maxes (used): D45, SRC27, plist24, rep5
 pkgnames:
        ${PERLSCRIPT}/check-name
 
@@ -254,6 +254,12 @@ inter1: rep0/inta-0.tgz rep0/intb-0.tgz
        @ROOT=${D31} PKG_PATH=${.OBJDIR}/rep0 ${ADD_PKG} inta intb
        @ROOT=${D31} ${DELETE_PKG} inta intb
 
+system-version: rep0/syst-0.tgz rep1/syst-0.tgz
+       -rm -rf ${D45}
+       @ROOT=${D45} PKG_PATH=${.OBJDIR}/rep0 ${ADD_PKG} syst
+       @ROOT=${D45} PKG_PATH=${.OBJDIR}/rep1 ${ADD_PKG} -u
+       @ROOT=${D45} ${INFO_PKG} -qS syst |diff -u - ${.CURDIR}/system-version.ref
+
 plist1:
        @${MKPLIST} ${LONG1} ${LONG2} ${LONG3} ${LONG4} >$@
 
@@ -710,6 +716,12 @@ rep5/a-0.tgz: plist19
        @echo "zoinx" > ${SRC27}/a
        @INJECT=inject-badsum ${CREATE_PKG} -B src27 -f plist19 $@
 
+rep0/syst-0.tgz:
+       @${CREATE_PKG} -V 1 ${EMPTY} $@
+
+rep1/syst-0.tgz:
+       @${CREATE_PKG} -V 3 ${EMPTY} $@
+
 .PHONY: ${REGRESS_TARGETS}
 
 cksum-error: rep5/a-0.tgz
diff --git a/regress/usr.sbin/pkg_add/system-version.ref b/regress/usr.sbin/pkg_add/system-version.ref
new file mode 100644 (file)
index 0000000..7708522
--- /dev/null
@@ -0,0 +1 @@
+syst-0,3