diff options
Diffstat (limited to 'tests/exe')
-rwxr-xr-x | tests/exe/ob-buildenv.sh | 4 | ||||
-rwxr-xr-x | tests/exe/ob-buildopk.sh | 6 | ||||
-rwxr-xr-x | tests/exe/ob-genchanges.sh | 9 | ||||
-rwxr-xr-x | tests/exe/ob-gencontrol.sh | 42 | ||||
-rwxr-xr-x | tests/exe/opkbuild.sh | 6 |
5 files changed, 49 insertions, 18 deletions
diff --git a/tests/exe/ob-buildenv.sh b/tests/exe/ob-buildenv.sh index 3720207..29235c0 100755 --- a/tests/exe/ob-buildenv.sh +++ b/tests/exe/ob-buildenv.sh @@ -41,4 +41,8 @@ cmd_is 'ob-buildenv' ob-buildenv <<-EOF STRINGS='i686-linux-glibc-strings' STRIP='i686-linux-glibc-strip' OPK_TOOL_PREFIX='i686-linux-glibc-' + CFLAGS=' -ffile-prefix-map=${PWD}=.' + CXXFLAGS=' -ffile-prefix-map=${PWD}=.' + TZ='UTC0' + LC_ALL='C' EOF diff --git a/tests/exe/ob-buildopk.sh b/tests/exe/ob-buildopk.sh index 1f59124..ca0c7ee 100755 --- a/tests/exe/ob-buildopk.sh +++ b/tests/exe/ob-buildopk.sh @@ -43,14 +43,14 @@ plan_ 9 rm -Rf *'.data/' *'.control/' mkdir -p 'foo.data/usr/bin/' 'bar.data/' 'foo.control/' 'bar.control/' \ - 'baz-qux.data/' 'baz-qux.control/' + 'baz+qux.data/' 'baz+qux.control/' 'baz-qux.data/' 'baz-qux.control/' cp -p '../../src/src/foo.sh' 'foo.data/usr/bin/' 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: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 d0bc6a0..7fc8ec8 100755 --- a/tests/exe/ob-genchanges.sh +++ b/tests/exe/ob-genchanges.sh @@ -25,14 +25,15 @@ 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' command_ok_ 'ob-genchanges exit status' -- ob-genchanges cmd_is 'changes file' cat '../../foo_1.0-1_i686-linux-glibc_x60.changes' <<-EOF Format: 1.0 Source: foo - Binary: bar baz-qux foo + Binary: bar baz+qux baz-qux foo Version: 1.0-1 Architecture: i686-linux-glibc Platform: x60 @@ -42,6 +43,7 @@ cmd_is 'changes file' cat '../../foo_1.0-1_i686-linux-glibc_x60.changes' <<-EOF Date: Thu, 01 Jan 1970 01:00:00 +0000 Description: bar - Bit-bang All Registers + baz+qux - Add all the things baz-qux - Hyphenate all the things foo - Frobnicator of Objects Changes: @@ -49,6 +51,7 @@ cmd_is 'changes file' cat '../../foo_1.0-1_i686-linux-glibc_x60.changes' <<-EOF * Initial release. Files: 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 ad12d60..309e28a 100755 --- a/tests/exe/ob-gencontrol.sh +++ b/tests/exe/ob-gencontrol.sh @@ -22,19 +22,20 @@ set -eu . "${TOP_SRCDIR}/tests/aux/tap-functions.sh" . "${TOP_SRCDIR}/tests/aux/common.sh" -plan_ 12 +plan_ 14 OB_DO_SOURCE='true' command_ok_ 'ob-gencontrol source package exit status' -- \ ob-gencontrol cmd_is 'source package control file' cat 'src:foo.control/control' <<-EOF Package: src:foo Source: foo - Binary: bar baz-qux foo + Binary: bar baz+qux baz-qux foo Version: 1.0-1 Architecture: src Platform: all Maintainer: "J. Random Hacker" <jrandom@example.com> - Build-Depends: build-all-runes + Build-Depends: build-all-runes, quiet-untuned-xylophone, $(: \ + )something-completely-different Installed-Size: 0 Format: 2.0 Description: foo source package @@ -46,7 +47,7 @@ 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 + cmd_is "${run} run foo control file" cat 'foo.control/control' <<-EOF Package: foo:i686-linux-glibc Source: foo Version: 1.0-1 @@ -63,17 +64,18 @@ for run in 'first' 'second'; do . This package provides a frobnicator of objects. EOF - cmd_is 'md5sums file' cat 'foo.control/md5sums' <<-EOF + cmd_is "${run} run foo md5sums file" cat 'foo.control/md5sums' <<-EOF 582b7bd410b9e196dfb0a706ac95bf23 /usr/bin/foo.sh EOF - cmd_is 'control file' cat 'bar.control/control' <<-EOF + cmd_is "${run} run bar control file" cat 'bar.control/control' <<-EOF 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> + Depends: foo:i686-linux-glibc (= 1.0-1) Installed-Size: 0 Description: Bit-bang All Registers This is a frobnicator of objects. Conveniently, it also $(: \ @@ -82,14 +84,36 @@ for run in 'first' 'second'; do . This package assists in bit-banging all yer registers. EOF - cmd_is 'control file' cat 'baz-qux.control/control' <<-EOF + cmd_is "${run} run baz+qux control file" cat 'baz+qux.control/control' \ + <<-EOF + Package: baz+qux + Source: foo + Version: 1.0-1 + Architecture: all + Platform: all + Maintainer: "J. Random Hacker" <jrandom@example.com> + Depends: foo:i686-linux-glibc (>= 1.0-1), $(: \ + )foo:i686-linux-glibc (<< 1.0-1.~), bar + Installed-Size: 0 + Description: Add all the things + This is a frobnicator of objects. Conveniently, it also $(: \ + )bit-bangs all + registers. + . + This package's name contains a plus sign, not to be $(: \ + )confused with the one that + instead contains a hyphen. + EOF + cmd_is "${run} baz-qux foo control file" cat 'baz-qux.control/control' \ + <<-EOF Package: baz-qux Source: foo Version: 1.0-1 Architecture: all Platform: all Maintainer: "J. Random Hacker" <jrandom@example.com> - Depends: bar + Depends: foo:i686-linux-glibc (>= 1.0-1), $(: \ + )foo:i686-linux-glibc (<< 1.0-1.~), bar Installed-Size: 0 Description: Hyphenate all the things This is a frobnicator of objects. Conveniently, it also $(: \ 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/ |