summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-12-08 08:30:35 +0200
committerTimo Teräs <timo.teras@iki.fi>2014-12-08 08:30:35 +0200
commit6697ed5e86e64516ac56894d2f81c575ff72fd4f (patch)
treee50be9115b289efa63abbb783945394f798e22f4
parentcbfd1ec1ababda16155b03899ef686a62128a2fd (diff)
downloadapk-tools-6697ed5e86e64516ac56894d2f81c575ff72fd4f.tar.bz2
apk-tools-6697ed5e86e64516ac56894d2f81c575ff72fd4f.tar.xz
fix test mode
-rw-r--r--src/apk.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/apk.c b/src/apk.c
index c0a0871..17b8b69 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -39,6 +39,12 @@ static const struct apk_option_group *default_optgroups[] = { &optgroup_global,
static struct list_head apk_applet_list;
#define foreach_applet(iter) list_for_each_entry(iter, &apk_applet_list, node)
+#ifdef TEST_MODE
+static const char *test_installed_db = NULL;
+static const char *test_world = NULL;
+static struct apk_string_array *test_repos;
+#endif
+
char **apk_argv;
static void version(void)
@@ -434,14 +440,10 @@ int main(int argc, char **argv)
struct apk_db_options dbopts;
const struct apk_option_group **optgroups = default_optgroups;
struct apk_string_array *args;
-#ifdef TEST_MODE
- const char *test_installed_db = NULL;
- const char *test_world = NULL;
- struct apk_string_array *test_repos;
+#ifdef TEST_MODE
apk_string_array_init(&test_repos);
#endif
-
apk_applet_register_builtin();
apk_argv = malloc(sizeof(char*[argc+2]));