diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-06-27 20:37:38 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-06-27 21:04:40 (EDT) |
commit | 83d5903fdc1732bb4e1f7a395cf37d3edb98c4c5 (patch) | |
tree | 73fd13ab57759b76f95c91be5b46488192f24d28 /tests/build.sh | |
parent | bd3b6debda962c68bbbe080f9ce779f6226d27d8 (diff) |
tests/build: Test mknod
Currently doesn't work.
Diffstat (limited to 'tests/build.sh')
-rwxr-xr-x | tests/build.sh | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/build.sh b/tests/build.sh index b17994a..1a50e23 100755 --- a/tests/build.sh +++ b/tests/build.sh @@ -22,15 +22,23 @@ set -eu . "${TOP_SRCDIR}/tests/aux/tap-functions.sh" . "${TOP_SRCDIR}/tests/aux/common.sh" -plan_ 2 +plan_ 3 -mkdir -p "${TOP_BUILDDIR}/tests/" +mkdir -p "${TOP_BUILDDIR}/tests/pkg/" +if [ x"${TOP_BUILDDIR}" != x"${TOP_SRCDIR}" ]; then + cp -Rp "${TOP_SRCDIR}/tests/pkg/data/" "${TOP_BUILDDIR}/tests/pkg/" +fi + +mkdir -p "${TOP_BUILDDIR}/tests/pkg/data/dev/" +OPK_WORK_AREA="${TOP_BUILDDIR}/tests/pkg/" command_ok_ 'mknod' -- \ + "${TOP_BUILDDIR}/mknod${EXEEXT}" \ + "${TOP_BUILDDIR}/tests/pkg/data/dev/null" c 1 3 SOURCE_DATE_EPOCH=1685592000 command_ok_ 'package building' -- \ "${TOP_BUILDDIR}/opkg-opk" \ -b \ -c "${TOP_SRCDIR}/tests/pkg/control/" \ - -d "${TOP_SRCDIR}/tests/pkg/data/" \ + -d "${TOP_BUILDDIR}/tests/pkg/data/" \ -s "${TOP_SRCDIR}/tests/pkg/specials" \ "${TOP_BUILDDIR}/tests/pkg.opk" @@ -52,4 +60,9 @@ cmd_is 'package info' \ crw-r--r-- pj/pj 1, 3 2023-06-01 00:00:00 /dev/null EOF +if [ x"${TOP_BUILDDIR}" != x"${TOP_SRCDIR}" ]; then + rm -Rf "${TOP_BUILDDIR}/tests/pkg/data/" +fi +rm -Rf "${TOP_BUILDDIR}/tests/pkg/specials" + : |