Commit 6697ed5e authored by Timo Teräs's avatar Timo Teräs
Browse files

fix test mode

parent cbfd1ec1
...@@ -39,6 +39,12 @@ static const struct apk_option_group *default_optgroups[] = { &optgroup_global, ...@@ -39,6 +39,12 @@ static const struct apk_option_group *default_optgroups[] = { &optgroup_global,
static struct list_head apk_applet_list; static struct list_head apk_applet_list;
#define foreach_applet(iter) list_for_each_entry(iter, &apk_applet_list, node) #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;
char **apk_argv; char **apk_argv;
static void version(void) static void version(void)
...@@ -434,14 +440,10 @@ int main(int argc, char **argv) ...@@ -434,14 +440,10 @@ int main(int argc, char **argv)
struct apk_db_options dbopts; struct apk_db_options dbopts;
const struct apk_option_group **optgroups = default_optgroups; const struct apk_option_group **optgroups = default_optgroups;
struct apk_string_array *args; 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); apk_string_array_init(&test_repos);
#endif #endif
apk_applet_register_builtin(); apk_applet_register_builtin();
apk_argv = malloc(sizeof(char*[argc+2])); apk_argv = malloc(sizeof(char*[argc+2]));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment