summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2024-02-21 21:42:12 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2024-02-21 21:42:12 (EST)
commit91863a2f944400f11e16d039f2e9270af34bb8a1 (patch)
tree3030f732acdae0519fade047e7866f7466cdafa1
parent71552d25e112928e8c64ec8bc916b376f95736dc (diff)
tests: Make "Package: bar" "Architecture: any"
-rw-r--r--tests/data/pkg/bar.pkg/control2
-rwxr-xr-xtests/exe/ob-buildopk.sh4
-rwxr-xr-xtests/exe/ob-genchanges.sh4
-rwxr-xr-xtests/exe/ob-gencontrol.sh2
-rwxr-xr-xtests/exe/opkbuild.sh6
-rwxr-xr-xtests/lib/ob_get_binary_parameter.sh8
6 files changed, 15 insertions, 11 deletions
diff --git a/tests/data/pkg/bar.pkg/control b/tests/data/pkg/bar.pkg/control
index fff5663..93c1198 100644
--- a/tests/data/pkg/bar.pkg/control
+++ b/tests/data/pkg/bar.pkg/control
@@ -1,4 +1,4 @@
-Architecture: all
+Architecture: any
Platform: all
Section: util
Description: Bit-bang All Registers
diff --git a/tests/exe/ob-buildopk.sh b/tests/exe/ob-buildopk.sh
index 3bd0b50..ca0c7ee 100755
--- a/tests/exe/ob-buildopk.sh
+++ b/tests/exe/ob-buildopk.sh
@@ -50,7 +50,7 @@ touch 'foo.control/control' 'foo.control/md5sums' \
command_ok_ 'ob-buildopk exit status' -- "${FAKEROOT}" ob-buildopk
for opk in '../../foo:i686-linux-glibc_1.0-1_i686-linux-glibc_all.opk' \
- '../../bar_1.0-1_all_all.opk'; do
+ '../../bar_1.0-1_i686-linux-glibc_all.opk'; do
command_ok_ 'opk exists' -- [ -f "${opk}" ]
cmd_is 'outer archive contents' ls_outer "${opk}" <<-EOF
debian-binary
@@ -72,6 +72,6 @@ cmd_is 'data.tar.gz contents' \
./usr/bin/foo.sh
EOF
cmd_is 'data.tar.gz contents' \
- ls_inner '../../bar_1.0-1_all_all.opk' data.tar.gz <<-EOF
+ ls_inner '../../bar_1.0-1_i686-linux-glibc_all.opk' data.tar.gz <<-EOF
./
EOF
diff --git a/tests/exe/ob-genchanges.sh b/tests/exe/ob-genchanges.sh
index 76f62cb..7fc8ec8 100755
--- a/tests/exe/ob-genchanges.sh
+++ b/tests/exe/ob-genchanges.sh
@@ -25,7 +25,7 @@ set -eu
plan_ 2
>'../../foo:i686-linux-glibc_1.0-1_i686-linux-glibc_all.opk'
->'../../bar_1.0-1_all_all.opk'
+>'../../bar_1.0-1_i686-linux-glibc_all.opk'
>'../../baz+qux_1.0-1_all_all.opk'
>'../../baz-qux_1.0-1_all_all.opk'
@@ -53,5 +53,5 @@ cmd_is 'changes file' cat '../../foo_1.0-1_i686-linux-glibc_x60.changes' <<-EOF
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 base baz-qux_1.0-1_all_all.opk
- 0 util bar_1.0-1_all_all.opk
+ 0 util bar_1.0-1_i686-linux-glibc_all.opk
EOF
diff --git a/tests/exe/ob-gencontrol.sh b/tests/exe/ob-gencontrol.sh
index 87152f0..9c74a52 100755
--- a/tests/exe/ob-gencontrol.sh
+++ b/tests/exe/ob-gencontrol.sh
@@ -71,7 +71,7 @@ for run in 'first' 'second'; do
Package: bar
Source: foo
Version: 1.0-1
- Architecture: all
+ Architecture: i686-linux-glibc
Platform: all
Section: util
Maintainer: "J. Random Hacker" <jrandom@example.com>
diff --git a/tests/exe/opkbuild.sh b/tests/exe/opkbuild.sh
index e9f0808..d113e5b 100755
--- a/tests/exe/opkbuild.sh
+++ b/tests/exe/opkbuild.sh
@@ -51,7 +51,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:i686-linux-glibc_1.0-1_i686-linux-glibc_all.opk' \
- '../bar_1.0-1_all_all.opk'; do
+ '../bar_1.0-1_i686-linux-glibc_all.opk'; do
command_ok_ 'opk exists' -- [ -f "${opk}" ]
cmd_is 'outer archive contents' ls_outer "${opk}" <<-EOF
debian-binary
@@ -73,7 +73,7 @@ cmd_is 'control.tar.gz contents' \
./md5sums
EOF
cmd_is 'control.tar.gz contents' \
- ls_inner '../bar_1.0-1_all_all.opk' control.tar.gz <<-EOF
+ ls_inner '../bar_1.0-1_i686-linux-glibc_all.opk' control.tar.gz <<-EOF
./
./control
EOF
@@ -93,7 +93,7 @@ cmd_is 'data.tar.gz contents' \
./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
+ ls_inner '../bar_1.0-1_i686-linux-glibc_all.opk' data.tar.gz <<-EOF
./
./usr/
./usr/share/
diff --git a/tests/lib/ob_get_binary_parameter.sh b/tests/lib/ob_get_binary_parameter.sh
index 1ad8a32..c85c3ec 100755
--- a/tests/lib/ob_get_binary_parameter.sh
+++ b/tests/lib/ob_get_binary_parameter.sh
@@ -23,7 +23,7 @@ set -eu
. "${TOP_SRCDIR}/tests/aux/common.sh"
. "${TOP_BUILDDIR}/lib/libopkbuild.${SHSOEXT}.${LIBOPKBUILD_SHSOVERSION}"
-plan_ 5
+plan_ 7
command_ok_ 'ob_init_package()' -- ob_init_package '..'
@@ -32,6 +32,10 @@ is 'foo Architecture' \
is 'foo Platform' \
"$(ob_get_binary_parameter 'foo' 'Platform')" 'all'
is 'bar Architecture' \
- "$(ob_get_binary_parameter 'bar' 'Architecture')" 'all'
+ "$(ob_get_binary_parameter 'bar' 'Architecture')" 'any'
is 'bar Platform' \
"$(ob_get_binary_parameter 'bar' 'Platform')" 'all'
+is 'baz-qux Architecture' \
+ "$(ob_get_binary_parameter 'baz-qux' 'Architecture')" 'all'
+is 'baz-qux Platform' \
+ "$(ob_get_binary_parameter 'baz-qux' 'Platform')" 'all'