summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:20:28 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:20:28 (EST)
commit04c02d72227f9fddc95741a0a936ed0f7ac33c39 (patch)
tree1ea88e7fb842c8f3379e7156a41f42c8d371a05e /tests
parent01bf197b2a64323371fbd3bc09dc98c5c1ed6a0f (diff)
opkg: improve opkg_install error reporting and include a check to verify repository signature during install
git-svn-id: http://opkg.googlecode.com/svn/trunk@123 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'tests')
-rw-r--r--tests/libopkg_test.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/libopkg_test.c b/tests/libopkg_test.c
index 7033ced..d9bd0ef 100644
--- a/tests/libopkg_test.c
+++ b/tests/libopkg_test.c
@@ -4,7 +4,7 @@
opkg_package_t *find_pkg = NULL;
-char *errors[8] = {
+char *errors[10] = {
"No Error",
"Unknown Eror",
"Download failed",
@@ -12,9 +12,14 @@ char *errors[8] = {
"Package already installed",
"Package not available",
"Package not found",
- "Package not installed"
+ "Package not installed",
+ "Signature check failed",
+ "MD5 sum failed"
};
+
+#define TEST_PACKAGE "aspell"
+
void
progress_callback (opkg_t *opkg, const opkg_progress_data_t *progress, void *data)
{
@@ -112,13 +117,13 @@ main (int argc, char **argv)
else
printf ("No package available to test find_package.\n");
- err = opkg_install_package (opkg, "aspell", progress_callback, "Installing...");
+ err = opkg_install_package (opkg, TEST_PACKAGE, progress_callback, "Installing...");
printf ("\nopkg_install_package returned %d (%s)\n", err, errors[err]);
- err = opkg_upgrade_package (opkg, "aspell", progress_callback, "Upgrading...");
+ err = opkg_upgrade_package (opkg, TEST_PACKAGE, progress_callback, "Upgrading...");
printf ("\nopkg_upgrade_package returned %d (%s)\n", err, errors[err]);
- err = opkg_remove_package (opkg, "aspell", progress_callback, "Removing...");
+ err = opkg_remove_package (opkg, TEST_PACKAGE, progress_callback, "Removing...");
printf ("\nopkg_remove_package returned %d (%s)\n", err, errors[err]);
printf ("Listing upgradable packages...\n");