summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-07-04 22:45:49 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-07-04 22:45:49 (EDT)
commita87167806219bb536c86e603e9e38f68a54d654b (patch)
treeddfc820d8e466231a6d5fb26d0275721fbde2260
parent39fc6829125a795e34b356f1490b61442b516cfb (diff)
tests: Verify arch-qualification
-rw-r--r--tests/data/pkg/foo.pkg/control2
-rwxr-xr-xtests/exe/ob-buildopk.sh5
-rwxr-xr-xtests/exe/ob-genchanges.sh4
-rwxr-xr-xtests/exe/ob-gencontrol.sh4
-rwxr-xr-xtests/exe/ob-installdocs.sh4
-rwxr-xr-xtests/exe/opkbuild.sh18
6 files changed, 20 insertions, 17 deletions
diff --git a/tests/data/pkg/foo.pkg/control b/tests/data/pkg/foo.pkg/control
index e768224..a0320b7 100644
--- a/tests/data/pkg/foo.pkg/control
+++ b/tests/data/pkg/foo.pkg/control
@@ -1,6 +1,6 @@
Architecture: any-linux-any
Platform: all
-Section: libdev
+Section: lib
Depends: ${Generated-Depends}
Description: Frobnicator of Objects
${Common-Description}
diff --git a/tests/exe/ob-buildopk.sh b/tests/exe/ob-buildopk.sh
index 020824a..1f59124 100755
--- a/tests/exe/ob-buildopk.sh
+++ b/tests/exe/ob-buildopk.sh
@@ -49,7 +49,7 @@ touch 'foo.control/control' 'foo.control/md5sums' \
'bar.control/control' 'bar.control/md5sums'
command_ok_ 'ob-buildopk exit status' -- "${FAKEROOT}" ob-buildopk
-for opk in '../../foo_1.0-1_i686-linux-glibc_all.opk' \
+for opk in '../../foo:i686-linux-glibc_1.0-1_i686-linux-glibc_all.opk' \
'../../bar_1.0-1_all_all.opk'; do
command_ok_ 'opk exists' -- [ -f "${opk}" ]
cmd_is 'outer archive contents' ls_outer "${opk}" <<-EOF
@@ -64,7 +64,8 @@ for opk in '../../foo_1.0-1_i686-linux-glibc_all.opk' \
EOF
done
cmd_is 'data.tar.gz contents' \
- ls_inner '../../foo_1.0-1_i686-linux-glibc_all.opk' data.tar.gz <<-EOF
+ ls_inner '../../foo:i686-linux-glibc_1.0-1_i686-linux-glibc_all.opk' \
+ data.tar.gz <<-EOF
./
./usr/
./usr/bin/
diff --git a/tests/exe/ob-genchanges.sh b/tests/exe/ob-genchanges.sh
index 1b8e951..d9545f4 100755
--- a/tests/exe/ob-genchanges.sh
+++ b/tests/exe/ob-genchanges.sh
@@ -24,7 +24,7 @@ set -eu
plan_ 2
->'../../foo_1.0-1_i686-linux-glibc_all.opk'
+>'../../foo:i686-linux-glibc_1.0-1_i686-linux-glibc_all.opk'
>'../../bar_1.0-1_all_all.opk'
>'../../baz-qux_1.0-1_all_all.opk'
@@ -48,7 +48,7 @@ cmd_is 'changes file' cat '../../foo_1.0-1_i686-linux-glibc_x60.changes' <<-EOF
foo (1.0-1) trunk
* Initial release.
Files:
- 0 libdev foo_1.0-1_i686-linux-glibc_all.opk
+ 0 lib foo:i686-linux-glibc_1.0-1_i686-linux-glibc_all.opk
0 base baz-qux_1.0-1_all_all.opk
0 utils bar_1.0-1_all_all.opk
EOF
diff --git a/tests/exe/ob-gencontrol.sh b/tests/exe/ob-gencontrol.sh
index 4ea0cb5..9aa49a6 100755
--- a/tests/exe/ob-gencontrol.sh
+++ b/tests/exe/ob-gencontrol.sh
@@ -47,12 +47,12 @@ cp -Rp '../../src/' 'src/'
for run in 'first' 'second'; do
command_ok_ "ob-gencontrol ${run} run exit status" -- ob-gencontrol
cmd_is 'control file' cat 'foo.control/control' <<-EOF
- Package: foo
+ Package: foo:i686-linux-glibc
Source: foo
Version: 1.0-1
Architecture: i686-linux-glibc
Platform: all
- Section: libdev
+ Section: lib
Maintainer: "J. Random Hacker" <jrandom@example.com>
Depends: bar
Installed-Size: 1
diff --git a/tests/exe/ob-installdocs.sh b/tests/exe/ob-installdocs.sh
index 96c3244..fe54b8a 100755
--- a/tests/exe/ob-installdocs.sh
+++ b/tests/exe/ob-installdocs.sh
@@ -29,13 +29,13 @@ rm -Rf *'.data/'
command_ok_ 'ob-installdocs first run exit status' -- ob-installdocs
for f in 'copyright' 'changelog.dist' 'README.upstream'; do
command_ok_ "${f} file installed" -- \
- [ -f "foo.data/usr/share/doc/foo/${f}" ]
+ [ -f "foo.data/usr/share/doc/foo:i686-linux-glibc/${f}" ]
done
command_ok_ 'link created' -- [ -L 'bar.data/usr/share/doc/bar' ]
command_ok_ 'ob-installdocs second run exit status' -- ob-installdocs
for f in 'copyright' 'changelog.dist' 'README.upstream'; do
command_ok_ "${f} file installed" -- \
- [ -f "foo.data/usr/share/doc/foo/${f}" ]
+ [ -f "foo.data/usr/share/doc/foo:i686-linux-glibc/${f}" ]
done
command_ok_ 'link created' -- [ -L 'bar.data/usr/share/doc/bar' ]
diff --git a/tests/exe/opkbuild.sh b/tests/exe/opkbuild.sh
index a14f8d3..e9f0808 100755
--- a/tests/exe/opkbuild.sh
+++ b/tests/exe/opkbuild.sh
@@ -50,7 +50,7 @@ cp -Rp '../src/' 'src/'
command_ok_ 'opkbuild exit status' -- opkbuild -a i686-linux-glibc -p x60 -dc
for opk in '../src:foo_1.0-1_src_all.opk' \
- '../foo_1.0-1_i686-linux-glibc_all.opk' \
+ '../foo:i686-linux-glibc_1.0-1_i686-linux-glibc_all.opk' \
'../bar_1.0-1_all_all.opk'; do
command_ok_ 'opk exists' -- [ -f "${opk}" ]
cmd_is 'outer archive contents' ls_outer "${opk}" <<-EOF
@@ -66,7 +66,8 @@ cmd_is 'control.tar.gz contents' \
./md5sums
EOF
cmd_is 'control.tar.gz contents' \
- ls_inner '../foo_1.0-1_i686-linux-glibc_all.opk' control.tar.gz <<-EOF
+ ls_inner '../foo:i686-linux-glibc_1.0-1_i686-linux-glibc_all.opk' \
+ control.tar.gz <<-EOF
./
./control
./md5sums
@@ -77,18 +78,19 @@ cmd_is 'control.tar.gz contents' \
./control
EOF
cmd_is 'data.tar.gz contents' \
- ls_inner '../foo_1.0-1_i686-linux-glibc_all.opk' data.tar.gz <<-EOF
+ ls_inner '../foo:i686-linux-glibc_1.0-1_i686-linux-glibc_all.opk' \
+ data.tar.gz <<-EOF
./
./usr/
./usr/bin/
./usr/bin/foo.sh
./usr/share/
./usr/share/doc/
- ./usr/share/doc/foo/
- ./usr/share/doc/foo/README.dist
- ./usr/share/doc/foo/README.upstream
- ./usr/share/doc/foo/changelog.dist
- ./usr/share/doc/foo/copyright
+ ./usr/share/doc/foo:i686-linux-glibc/
+ ./usr/share/doc/foo:i686-linux-glibc/README.dist
+ ./usr/share/doc/foo:i686-linux-glibc/README.upstream
+ ./usr/share/doc/foo:i686-linux-glibc/changelog.dist
+ ./usr/share/doc/foo:i686-linux-glibc/copyright
EOF
cmd_is 'data.tar.gz contents' \
ls_inner '../bar_1.0-1_all_all.opk' data.tar.gz <<-EOF