summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2023-06-17 17:47:10 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2023-06-17 17:47:10 (EDT)
commit068d3b26698139ee92e6767648d2ebace18234b6 (patch)
tree2eb4e40a70a3a1c65f0cfe95a72acd0dbf6e752c /tests
parent7a7b84a3b7761dcd2e4051a30fc5bd2236b8be11 (diff)
tests: Verify contents of built package
Diffstat (limited to 'tests')
-rwxr-xr-xtests/build.sh23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/build.sh b/tests/build.sh
index a5032cc..760d9be 100755
--- a/tests/build.sh
+++ b/tests/build.sh
@@ -20,11 +20,13 @@
set -eu
. "${TOP_SRCDIR}/tests/aux/tap-functions.sh"
+. "${TOP_SRCDIR}/tests/aux/common.sh"
-plan_ 1
+plan_ 2
mkdir -p "${TOP_BUILDDIR}/tests/"
+# FIXME: Specify specials override file
SOURCE_DATE_EPOCH=1685592000 command_ok_ 'package building' -- \
"${TOP_BUILDDIR}/opkg-opk" \
-b \
@@ -32,4 +34,23 @@ SOURCE_DATE_EPOCH=1685592000 command_ok_ 'package building' -- \
-d "${TOP_SRCDIR}/tests/pkg/data/" \
"${TOP_BUILDDIR}/tests/pkg.opk"
+# FIXME: /dev/null should be a char device
+cmd_is 'package info' \
+ "${TOP_BUILDDIR}/opkg-opk" \
+ -f control \
+ -L \
+ "${TOP_BUILDDIR}/tests/pkg.opk" \
+ 0<<-EOF
+ Package: foo
+ Source: foo
+ Version: 1.0
+
+ drwxr-xr-x pj/pj 0 2023-06-01 00:00:00 /
+ drwxr-xr-x pj/pj 0 2023-06-01 00:00:00 /bin/
+ lrwxrwxrwx pj/pj 0 2023-06-01 00:00:00 /bin/false -> true
+ -rwxr-xr-x pj/pj 84 2023-06-01 00:00:00 /bin/true
+ drwxr-xr-x pj/pj 0 2023-06-01 00:00:00 /dev/
+ -rw-r--r-- pj/pj 0 2023-06-01 00:00:00 /dev/null
+ EOF
+
: