summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:23:29 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:23:29 (EST)
commit6a36527ec6863a6fe0f4019691fe70d3e78774a5 (patch)
tree2ecab3f5c4b428dcf97d2b80e659567bae6a89fa /tests
parent3c8103dbb9e9577ae3a6070d2f97064e64e576ed (diff)
opkg: adding repository check function
git-svn-id: http://opkg.googlecode.com/svn/trunk@136 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'tests')
-rw-r--r--tests/libopkg_test.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/libopkg_test.c b/tests/libopkg_test.c
index bf2cff9..bee3968 100644
--- a/tests/libopkg_test.c
+++ b/tests/libopkg_test.c
@@ -148,6 +148,7 @@ main (int argc, char **argv)
"\tlist all - List all available packages\n"
"\tlist installed - List all the installed packages\n"
"\tremove [package] - Remove the specified package\n"
+ "\trping - Reposiroties ping, check the accessibility of repositories\n"
"\ttest - Run test script\n"
, basename (argv[0]));
exit (0);
@@ -229,9 +230,17 @@ main (int argc, char **argv)
break;
case 'r':
- err = opkg_remove_package (opkg, argv[2], progress_callback, "Removing...");
- printf ("\nopkg_remove_package returned %d (%s)\n", err, errors[err]);
- break;
+ if (argv[1][1] == 'e')
+ {
+ err = opkg_remove_package (opkg, argv[2], progress_callback, "Removing...");
+ printf ("\nopkg_remove_package returned %d (%s)\n", err, errors[err]);
+ break;
+ }else if (argv[1][1] == 'p')
+ {
+ err = opkg_repository_accessibility_check(opkg);
+ printf("\nopkg_repository_accessibility_check returned (%d)\n", err);
+ break;
+ }
default:
printf ("Unknown command \"%s\"\n", argv[1]);