1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2025-04-21 12:27:27 +03:00

qpkg: added regression test harness and a few tests

- Makefile (test, tests, valgrind): new targets to run regression tests
- test/Common: test harness (adapted from fped)
- test/minpkg: test minimum package definition
- test/prereq: test basic prerequisite queries
This commit is contained in:
Werner Almesberger
2010-11-21 04:32:04 -03:00
parent 83c716424f
commit 2c953a5d1a
4 changed files with 212 additions and 1 deletions

43
qpkg/test/minpkg Executable file
View File

@@ -0,0 +1,43 @@
#!/bin/sh
. ./Common
###############################################################################
qpkg_fail "no Version field" <<EOF
Package: test
EOF
expect <<EOF
package test has no version
EOF
###############################################################################
qpkg_fail "no Architecture field" <<EOF
Package: test
Version: 1
EOF
expect <<EOF
package test version 1 has no architecture
EOF
###############################################################################
qpkg_fail "no Filename field" <<EOF
Package: whatever
Version: 1
Architecture: test
EOF
expect <<EOF
package whatever version 1 has no file name (nor is it installed)
EOF
###############################################################################
qpkg "minimum package definition" <<EOF
Package: whatever
Version: 1
Architecture: test
Filename: whatever_1_test.ipkg
EOF
expect <<EOF
EOF