Loading system/test/suite/Android.mk +2 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,8 @@ LOCAL_SRC_FILES := \ LOCAL_SHARED_LIBRARIES += \ liblog \ libhardware \ libhardware_legacy libhardware_legacy \ libcutils LOCAL_STATIC_LIBRARIES += \ libbtcore \ Loading system/test/suite/main.c +16 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ * ******************************************************************************/ #include <cutils/properties.h> #include <pthread.h> #include <stdlib.h> #include <unistd.h> Loading Loading @@ -63,6 +64,16 @@ static void *watchdog_fn(void *arg) { return NULL; } // Is shell still running? bdtest must run with shell stopped. static bool is_shell_running() { char property_str[100]; property_get("init.svc.zygote", property_str, NULL); if (!strcmp("running", property_str)) { return true; } return false; } static void print_usage(const char *program_name) { printf("Usage: %s [options] [test name]\n", program_name); printf("\n"); Loading Loading @@ -123,6 +134,11 @@ int main(int argc, char **argv) { test_name = argv[i]; } if (is_shell_running()) { printf("Run 'adb shell stop' before running %s.\n", argv[0]); return -1; } config_t *config = config_new(CONFIG_FILE_PATH); if (!config) { printf("Error: unable to open stack config file.\n"); Loading Loading
system/test/suite/Android.mk +2 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,8 @@ LOCAL_SRC_FILES := \ LOCAL_SHARED_LIBRARIES += \ liblog \ libhardware \ libhardware_legacy libhardware_legacy \ libcutils LOCAL_STATIC_LIBRARIES += \ libbtcore \ Loading
system/test/suite/main.c +16 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ * ******************************************************************************/ #include <cutils/properties.h> #include <pthread.h> #include <stdlib.h> #include <unistd.h> Loading Loading @@ -63,6 +64,16 @@ static void *watchdog_fn(void *arg) { return NULL; } // Is shell still running? bdtest must run with shell stopped. static bool is_shell_running() { char property_str[100]; property_get("init.svc.zygote", property_str, NULL); if (!strcmp("running", property_str)) { return true; } return false; } static void print_usage(const char *program_name) { printf("Usage: %s [options] [test name]\n", program_name); printf("\n"); Loading Loading @@ -123,6 +134,11 @@ int main(int argc, char **argv) { test_name = argv[i]; } if (is_shell_running()) { printf("Run 'adb shell stop' before running %s.\n", argv[0]); return -1; } config_t *config = config_new(CONFIG_FILE_PATH); if (!config) { printf("Error: unable to open stack config file.\n"); Loading