]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
tests: drop for now
authorRay Strode <rstrode@redhat.com>
Tue, 3 Dec 2013 15:39:03 +0000 (10:39 -0500)
committerRay Strode <rstrode@redhat.com>
Tue, 3 Dec 2013 18:50:34 +0000 (13:50 -0500)
They're fairly bitrotten, don't tie into make check,
and aren't that useful.

Drop them for now, until we can come up with a better
story.

33 files changed:
src/Makefile.am
src/client/Makefile.am
src/client/ply-boot-client.c
src/client/tests/Makefile.am [deleted file]
src/client/tests/ply-boot-client-test.am [deleted file]
src/libply-splash-core/ply-boot-splash.c
src/libply/Makefile.am
src/libply/ply-array.c
src/libply/ply-bitarray.c
src/libply/ply-buffer.c
src/libply/ply-command-parser.c
src/libply/ply-event-loop.c
src/libply/ply-hashtable.c
src/libply/ply-list.c
src/libply/ply-logger.c
src/libply/ply-progress.c
src/libply/ply-region.c
src/libply/ply-terminal-session.c
src/libply/tests/Makefile.am [deleted file]
src/libply/tests/ply-array-test.am [deleted file]
src/libply/tests/ply-bitarray-test.am [deleted file]
src/libply/tests/ply-command-parser-test.am [deleted file]
src/libply/tests/ply-event-loop-test.am [deleted file]
src/libply/tests/ply-hashtable-test.am [deleted file]
src/libply/tests/ply-list-test.am [deleted file]
src/libply/tests/ply-logger-test.am [deleted file]
src/libply/tests/ply-progress-test.am [deleted file]
src/libply/tests/ply-region.am [deleted file]
src/libply/tests/ply-terminal-session-test.am [deleted file]
src/ply-boot-server.c
src/tests/Makefile.am [deleted file]
src/tests/ply-boot-server-test.am [deleted file]
src/tests/ply-boot-splash-test.am [deleted file]

index a9e6eb171df7fc050650dd85a4cc5ed6d4962cfb..150e959c3edb78e04277b1383ed5fe1299e91f0b 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = libply libply-splash-core libply-splash-graphics . plugins client viewer tests
+SUBDIRS = libply libply-splash-core libply-splash-graphics . plugins client viewer
 if ENABLE_UPSTART_MONITORING
 SUBDIRS += upstart-bridge
 endif
index 9487901ba10d918be1fb25625de1bc51c1c14005..ead574a9eab948b42fb8c0a1bb189915fa2d6320 100644 (file)
@@ -1,5 +1,3 @@
-SUBDIRS = . tests
-
 INCLUDES = -I$(top_srcdir)                                                    \
            -I$(top_srcdir)/src                                                \
            -I$(top_srcdir)/src/libply                                         \
index 56458cebcfd662974316146372ebb0f666e76c43..3480676aeb217494db1e3e83b9746c37b3fbe04a 100644 (file)
@@ -869,137 +869,4 @@ ply_boot_client_attach_to_event_loop (ply_boot_client_t *client,
 
 }
 
-#ifdef PLY_BOOT_CLIENT_ENABLE_TEST
-
-#include <stdio.h>
-
-#include "ply-event-loop.h"
-#include "ply-boot-client.h"
-
-static void
-on_pinged (ply_event_loop_t *loop)
-{
-  printf ("PING!\n");
-}
-
-static void
-on_ping_failed (ply_event_loop_t *loop)
-{
-  printf ("PING FAILED! %m\n");
-  ply_event_loop_exit (loop, 1);
-}
-
-static void
-on_update (ply_event_loop_t *loop)
-{
-  printf ("UPDATE!\n");
-}
-
-static void
-on_update_failed (ply_event_loop_t *loop)
-{
-  printf ("UPDATE FAILED! %m\n");
-  ply_event_loop_exit (loop, 1);
-}
-
-static void
-on_newroot (ply_event_loop_t *loop)
-{
-  printf ("NEWROOT!\n");
-}
-
-static void
-on_system_initialized (ply_event_loop_t *loop)
-{
-  printf ("SYSTEM INITIALIZED!\n");
-}
-
-static void
-on_system_initialized_failed (ply_event_loop_t *loop)
-{
-  printf ("SYSTEM INITIALIZATION REQUEST FAILED!\n");
-  ply_event_loop_exit (loop, 1);
-}
-
-static void
-on_quit (ply_event_loop_t *loop)
-{
-  printf ("QUIT!\n");
-  ply_event_loop_exit (loop, 0);
-}
-
-static void
-on_quit_failed (ply_event_loop_t *loop)
-{
-  printf ("QUIT FAILED! %m\n");
-  ply_event_loop_exit (loop, 2);
-}
-
-static void
-on_disconnect (ply_event_loop_t *loop)
-{
-  printf ("DISCONNECT!\n");
-  ply_event_loop_exit (loop, 1);
-}
-
-int
-main (int    argc,
-      char **argv)
-{
-  ply_event_loop_t *loop;
-  ply_boot_client_t *client;
-  int exit_code;
-
-  exit_code = 0;
-
-  loop = ply_event_loop_new ();
-
-  client = ply_boot_client_new ();
-
-  if (!ply_boot_client_connect (client, 
-                                (ply_boot_client_disconnect_handler_t) on_disconnect,
-                                loop))
-    {
-      perror ("could not start boot client");
-      return errno;
-    }
-
-  ply_boot_client_attach_to_event_loop (client, loop);
-  ply_boot_client_ping_daemon (client, 
-                               (ply_boot_client_response_handler_t) on_pinged,
-                               (ply_boot_client_response_handler_t) on_ping_failed,
-                               loop);
-
-  ply_boot_client_update_daemon (client, 
-                                 "loading",
-                                 (ply_boot_client_response_handler_t) on_update,
-                                 (ply_boot_client_response_handler_t) on_update_failed,
-                                 loop);
-
-  ply_boot_client_update_daemon (client, 
-                                 "loading more",
-                                 (ply_boot_client_response_handler_t) on_update,
-                                 (ply_boot_client_response_handler_t) on_update_failed,
-                                 loop);
-
-  ply_boot_client_tell_daemon_system_is_initialized (client, 
-                                       (ply_boot_client_response_handler_t) 
-                                       on_system_initialized,
-                                       (ply_boot_client_response_handler_t) 
-                                       on_system_initialized_failed,
-                                       loop);
-
-  ply_boot_client_tell_daemon_to_quit (client, 
-                                       (ply_boot_client_response_handler_t) on_quit,
-                                       (ply_boot_client_response_handler_t) on_quit_failed,
-                                       loop);
-
-  exit_code = ply_event_loop_run (loop);
-
-  ply_boot_client_free (client);
-
-  return exit_code;
-}
-
-#endif /* PLY_BOOT_CLIENT_ENABLE_TEST */
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
diff --git a/src/client/tests/Makefile.am b/src/client/tests/Makefile.am
deleted file mode 100644 (file)
index c6dbfdb..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-INCLUDES =                                                                    \
-           -I$(top_srcdir)                                                    \
-           -I$(srcdir)/..                                                     \
-           -I$(srcdir)/../..                                                  \
-           -I$(srcdir)
-TESTS = 
-
-noinst_PROGRAMS = $(TESTS)
-
-MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/client/tests/ply-boot-client-test.am b/src/client/tests/ply-boot-client-test.am
deleted file mode 100644 (file)
index f733032..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-TESTS += ply-boot-client-test
-
-ply_boot_client_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_BOOT_CLIENT_ENABLE_TEST
-ply_boot_client_test_LDADD = $(PLYMOUTH_LIBS)
-
-ply_boot_client_test_SOURCES =                                                \
-                          $(srcdir)/../ply-utils.h                            \
-                          $(srcdir)/../ply-utils.c                            \
-                          $(srcdir)/../ply-logger.h                           \
-                          $(srcdir)/../ply-logger.c                           \
-                          $(srcdir)/../ply-list.h                             \
-                          $(srcdir)/../ply-list.c                             \
-                          $(srcdir)/../ply-event-loop.h                       \
-                          $(srcdir)/../ply-event-loop.c                       \
-                          $(srcdir)/../ply-boot-client.h                      \
-                          $(srcdir)/../ply-boot-client.c
index 29247c7734f10d612c67961d73d262ea51e21c67..cf0529156dbc5525ce730295460c2f46af27dfc0 100644 (file)
@@ -682,148 +682,4 @@ ply_boot_splash_become_idle (ply_boot_splash_t                  *splash,
   splash->plugin_interface->become_idle (splash->plugin, splash->idle_trigger);
 }
 
-#ifdef PLY_BOOT_SPLASH_ENABLE_TEST
-
-#include <stdio.h>
-
-#include "ply-event-loop.h"
-#include "ply-boot-splash.h"
-
-typedef struct test_state test_state_t;
-struct test_state {
-  ply_event_loop_t *loop;
-  ply_boot_splash_t *splash;
-  ply_buffer_t *buffer;
-};
-
-static void
-on_timeout (ply_boot_splash_t *splash)
-{
-  ply_boot_splash_update_status (splash, "foo");
-  ply_event_loop_watch_for_timeout (splash->loop, 
-                                    5.0,
-                                   (ply_event_loop_timeout_handler_t)
-                                   on_timeout,
-                                   splash);
-}
-
-static void
-on_quit (test_state_t *state)
-{
-    ply_boot_splash_hide (state->splash);
-    ply_event_loop_exit (state->loop, 0);
-}
-
-static void
-add_displays_to_splash_from_renderer (test_state_t   *state,
-                                      ply_renderer_t *renderer)
-{
-  ply_list_t *heads;
-  ply_list_node_t *node;
-
-  heads = ply_renderer_get_heads (renderer);
-
-  node = ply_list_get_first_node (heads);
-  while (node != NULL)
-    {
-      ply_list_node_t *next_node;
-      ply_renderer_head_t *head;
-      ply_pixel_display_t *display;
-
-      head = ply_list_node_get_data (node);
-      next_node = ply_list_get_next_node (heads, node);
-
-      display = ply_pixel_display_new (renderer, head);
-
-      ply_boot_splash_add_pixel_display (state->splash, display);
-
-      node = next_node;
-    }
-}
-
-int
-main (int    argc,
-      char **argv)
-{
-  int exit_code;
-  test_state_t state;
-  char *tty_name;
-  const char *theme_path;
-  ply_text_display_t *text_display;
-  ply_renderer_t *renderer;
-  ply_terminal_t *terminal;
-  ply_keyboard_t *keyboard;
-
-  exit_code = 0;
-
-  state.loop = ply_event_loop_new ();
-
-  if (argc > 1)
-    theme_path = argv[1];
-  else
-    theme_path = PLYMOUTH_THEME_PATH "/fade-in/fade-in.plymouth";
-
-  if (argc > 2)
-    asprintf(&tty_name, "tty%s", argv[2]);
-  else
-    tty_name = strdup("tty0");
-
-  terminal = ply_terminal_new (tty_name);
-
-  if (!ply_terminal_open (terminal))
-    {
-      perror ("could not open tty");
-      return errno;
-    }
-
-  renderer = ply_renderer_new (PLY_RENDERER_TYPE_AUTO, NULL, terminal);
-  free(tty_name);
-
-  if (!ply_renderer_open (renderer))
-    {
-      perror ("could not open renderer /dev/fb");
-      ply_renderer_free (renderer);
-      return errno;
-    }
-
-  keyboard = ply_keyboard_new_for_renderer (renderer);
-  ply_keyboard_add_escape_handler (keyboard,
-                                   (ply_keyboard_escape_handler_t) on_quit, &state);
-
-  state.buffer = ply_buffer_new ();
-  state.splash = ply_boot_splash_new (theme_path, PLYMOUTH_PLUGIN_PATH, state.buffer);
-
-  if (!ply_boot_splash_load (state.splash))
-    {
-      perror ("could not load splash screen");
-      return errno;
-    }
-
-  ply_boot_splash_set_keyboard (state.splash, keyboard);
-  add_displays_to_splash_from_renderer (&state, renderer);
-
-  text_display = ply_text_display_new (terminal);
-  ply_boot_splash_add_text_display (state.splash, text_display);
-
-  ply_boot_splash_attach_to_event_loop (state.splash, state.loop);
-
-  if (!ply_boot_splash_show (state.splash, PLY_BOOT_SPLASH_MODE_BOOT_UP))
-    {
-      perror ("could not show splash screen");
-      return errno;
-    }
-
-  ply_event_loop_watch_for_timeout (state.loop, 
-                                    1.0,
-                                   (ply_event_loop_timeout_handler_t)
-                                   on_timeout,
-                                   state.splash);
-  exit_code = ply_event_loop_run (state.loop);
-  ply_boot_splash_free (state.splash);
-  ply_buffer_free (state.buffer);
-
-  return exit_code;
-}
-
-#endif /* PLY_BOOT_SPLASH_ENABLE_TEST */
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
index 302e47d19892b51205d1fe98d43bea2e9e6fe12b..41b3a46342b2d6e22cba4431278bd81565f9e73e 100644 (file)
@@ -1,4 +1,3 @@
-SUBDIRS = tests
 INCLUDES = -I$(top_srcdir)                                                    \
            -I$(srcdir)                                                        \
            -DPLYMOUTH_TIME_DIRECTORY=\"$(localstatedir)/lib/plymouth/\"       
index 41134b86ccbb65b281e2f093f616631eda2f3646..999c86e50f9566da9c61c9512c2aac9f8e8350e7 100644 (file)
@@ -171,34 +171,4 @@ ply_array_steal_uint32_elements (ply_array_t *array)
   return data;
 }
 
-#ifdef PLY_ARRAY_ENABLE_TEST
-#include <stdio.h>
-
-int
-main (int    argc,
-      char **argv)
-{
-  ply_array_t *array;
-  int i;
-  char **data;
-
-  array = ply_array_new (PLY_ARRAY_ELEMENT_TYPE_POINTER);
-
-  ply_array_add_pointer_element (array, "foo");
-  ply_array_add_pointer_element (array, "bar");
-  ply_array_add_pointer_element (array, "baz");
-  ply_array_add_pointer_element (array, "qux");
-
-  data = (char **) ply_array_get_pointer_elements (array);
-  for (i = 0; data[i] != NULL; i++)
-    {
-      printf ("element '%d' has data '%s'\n", i, data[i]);
-      i++;
-    }
-
-  ply_array_free (array);
-  return 0;
-}
-
-#endif
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
index 89e221697e97ab32095e5e27e41adf7aee04ac70..3d0cdd0c6e9f88f2501d2778124b52009818f62b 100644 (file)
@@ -42,64 +42,4 @@ ply_bitarray_count (ply_bitarray_t *bitarray,
   return count;
 }
 
-
-
-
-#ifdef PLY_BITARRAY_ENABLE_TEST
-#include <stdio.h>
-
-int
-main (int    argc,
-      char **argv)
-{
-  ply_bitarray_t *bitarray;
-  int i, i2;
-  printf ("bitarray test start\n");
-  bitarray = ply_bitarray_new (134);
-  
-  for (i=0; i<64; i++)
-    {
-      if (ply_bitarray_lookup (bitarray, i))
-        printf ("1");
-      else
-        printf ("0");
-    }
-  printf ("\n");
-  
-  for (i=0; i<64; i++)
-    if ((6654654654654654654ll >> i) & 1)
-      ply_bitarray_set (bitarray, i);
-  
-  for (i=0; i<64; i++)
-    {
-      if (ply_bitarray_lookup (bitarray, i))
-        printf ("1");
-      else
-        printf ("0");
-    }
-  printf ("\n");
-    
-  for (i = 63; i > 0; i--)
-    {
-      if ((6654654654654654654ll >> i) & 1)
-        {
-          ply_bitarray_clear (bitarray, i);
-          for (i2 = 0; i2 < 64; i2++)
-            {
-              if (ply_bitarray_lookup (bitarray, i2))
-                printf ("1");
-              else
-                printf ("0"); 
-            }
-          printf ("\n");
-        }
-    }
-    
-  ply_bitarray_free (bitarray);
-  
-  printf ("bitarray test end\n");
-  return 0;
-}
-
-#endif
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
index c65634f5f2f2ca14f43a7c5e116f208a73bd78b0..0d0406ff5c28d5323adf0892e80c52012d56c5d8 100644 (file)
@@ -263,22 +263,4 @@ ply_buffer_clear (ply_buffer_t *buffer)
   buffer->size = 0;
 }
 
-#ifdef PLY_BUFFER_ENABLE_TEST
-int
-main (int    argc,
-      char **argv)
-{
-  int exit_code;
-  ply_buffer_t *buffer;
-
-  exit_code = 0;
-  buffer = ply_buffer_new ();
-
-  ply_buffer_append (buffer, "yo yo yo\n");
-  ply_buffer_free (buffer);
-
-  return exit_code;
-}
-
-#endif /* PLY_BUFFER_ENABLE_TEST */
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
index 6ab323bc594d3960be649861fb805c5161529b82..2768668a9f1ad7c2a979ab2e89fa4062af44818e 100644 (file)
@@ -968,100 +968,4 @@ ply_command_parser_parse_arguments (ply_command_parser_t *parser,
   return parsed_arguments;
 }
 
-#ifdef PLY_COMMAND_PARSER_ENABLE_TEST
-
-#include <stdio.h>
-
-#include "ply-command-parser.h"
-#include "ply-event-loop.h"
-#include "ply-logger.h"
-
-static void
-on_ask_for_password (ply_command_parser_t *parser,
-                     const char *command)
-{
-  char *prompt;
-  char *program;
-
-  prompt = NULL;
-  program = NULL;
-  ply_command_parser_get_command_options (parser, command, "prompt", &prompt, "command", &program, NULL);
-
-  printf ("ask for password with prompt '%s' feed result to '%s'\n", prompt, program);
-  free (prompt);
-  free (program);
-}
-
-static void
-on_show_splash (ply_command_parser_t *parser,
-                const char *command)
-{
-  char *plugin_name;
-
-  plugin_name = NULL;
-  ply_command_parser_get_command_options (parser, command, "plugin-name", &plugin_name, NULL);
-
-  printf ("show splash plugin '%s'\n", plugin_name);
-  free (plugin_name);
-}
-
-int
-main (int    argc,
-      char **argv)
-{
-  ply_event_loop_t *loop;
-  ply_command_parser_t *parser;
-  bool should_help;
-
-  loop = ply_event_loop_new ();
-  parser = ply_command_parser_new (argv[0], "Test Program");
-
-  ply_command_parser_add_options (parser,
-                                  "help", "This help message", PLY_COMMAND_OPTION_TYPE_FLAG,
-                                  NULL);
-
-  ply_command_parser_add_command (parser,
-                                  "ask-for-password",
-                                  "Ask user for password",
-                                  (ply_command_handler_t)
-                                  on_ask_for_password, parser,
-                                  "command", "command to pipe result to", PLY_COMMAND_OPTION_TYPE_STRING,
-                                  "prompt", "string to present to user", PLY_COMMAND_OPTION_TYPE_STRING,
-                                  "output-result", "print result", PLY_COMMAND_OPTION_TYPE_BOOLEAN,
-                                  NULL);
-
-  ply_command_parser_add_command (parser,
-                                  "show-splash",
-                                  "Show splash to user",
-                                  (ply_command_handler_t)
-                                  on_show_splash, parser,
-                                  "plugin-name", "name of the plugin to run", PLY_COMMAND_OPTION_TYPE_STRING,
-                                  NULL);
-
-  if (!ply_command_parser_parse_arguments (parser, loop, argv, argc))
-    {
-      ply_error ("couldn't parse arguments");
-      return 1;
-    }
-
-
-  ply_command_parser_get_options (parser, "help", &should_help, NULL);
-
-  if (should_help)
-    {
-      char *usage;
-      usage = ply_command_parser_get_help_string (parser);
-      printf ("%s\n", usage);
-      free (usage);
-      return 0;
-    }
-
-  ply_event_loop_run (loop);
-
-  ply_command_parser_free (parser);
-
-  return 0;
-}
-
-#endif
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
index 4abf25fc4fd45353707e9b4545f574c500b4435a..0c85cb93f364d37b7bc23091759e01e3cc2cb7fa 100644 (file)
@@ -1376,88 +1376,4 @@ ply_event_loop_run (ply_event_loop_t *loop)
   return loop->exit_code;
 }
 
-#ifdef PLY_EVENT_LOOP_ENABLE_TEST
-
-static ply_event_loop_t *loop;
-
-static void
-alrm_signal_handler (void)
-{
-  write (1, "times up!\n", sizeof ("times up!\n") - 1);
-  ply_event_loop_exit (loop, 0);
-}
-
-static void
-usr1_signal_handler (void)
-{
-  write (1, "got sigusr1\n", sizeof ("got sigusr1\n") - 1);
-}
-
-static void
-hangup_signal_handler (void)
-{
-  write (1, "got hangup\n", sizeof ("got hangup\n") - 1);
-}
-
-static void
-terminate_signal_handler (void)
-{
-  write (1, "got terminate\n", sizeof ("got terminate\n") - 1);
-  ply_event_loop_exit (loop, 0);
-}
-
-static void
-line_received_handler (void)
-{
-  char line[512] = { 0 };
-  printf ("Received line: ");
-  fflush (stdout);
-
-  fgets (line, sizeof (line), stdin);
-  printf ("%s", line);
-}
-
-static void
-on_timeout (ply_event_loop_t *loop)
-{
-  printf ("timeout elapsed\n");
-}
-
-int
-main (int    argc,
-      char **argv)
-{
-  int exit_code;
-
-  loop = ply_event_loop_new ();
-
-  ply_event_loop_watch_signal (loop, SIGHUP,
-                             (ply_event_handler_t) hangup_signal_handler,
-                             NULL);
-  ply_event_loop_watch_signal (loop, SIGTERM,
-                             (ply_event_handler_t)
-                             terminate_signal_handler, NULL);
-  ply_event_loop_watch_signal (loop, SIGUSR1,
-                             (ply_event_handler_t)
-                             usr1_signal_handler, NULL);
-  ply_event_loop_watch_signal (loop, SIGALRM,
-                             (ply_event_handler_t)
-                             alrm_signal_handler, NULL);
-
-  ply_event_loop_watch_for_timeout (loop, 2.0,
-                                    (ply_event_loop_timeout_handler_t)
-                                    on_timeout, loop);
-  ply_event_loop_watch_fd (loop, 0, PLY_EVENT_LOOP_FD_STATUS_HAS_DATA,
-                          (ply_event_handler_t) line_received_handler,
-                          (ply_event_handler_t) line_received_handler,
-                          NULL);
-
-  alarm (5);
-  exit_code = ply_event_loop_run (loop);
-
-  ply_event_loop_free (loop);
-
-  return exit_code;
-}
-#endif /* PLY_EVENT_LOOP_ENABLE_TEST */
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
index 7f20a53432f0aa0e89ed057a2f54294838a4be39..7b03d876588dd6a976cbc2d20b0b6e22cae649b2 100644 (file)
@@ -130,14 +130,6 @@ ply_hashtable_insert_internal (ply_hashtable_t *hashtable,
 {
   unsigned int hash_index;
   int step = 0;
-  
-#ifdef PLY_HASHTABLE_ENABLE_TEST
-    /* Make sure the counts are synchronised with bitmap */
-  assert (ply_bitarray_count (hashtable->dirty_node_bitmap, hashtable->total_node_count) ==
-          (int) hashtable->dirty_node_count);
-  assert (ply_bitarray_count (hashtable->live_node_bitmap, hashtable->total_node_count) ==
-          (int) hashtable->live_node_count);
-#endif /* PLY_HASHTABLE_ENABLE_TEST */
 
   hash_index = hashtable->hash_func (key);
   hash_index &= hashtable->total_node_count - 1;
@@ -287,55 +279,4 @@ ply_hashtable_get_size (ply_hashtable_t *hashtable)
   return hashtable->live_node_count;
 }
 
-#ifdef PLY_HASHTABLE_ENABLE_TEST
-#include <stdio.h>
-
-static void
-foreach_func (void *key,
-              void *data,
-              void *user_data)
-{
-  printf ("foreach key:%s data:%s\n", (char*) key, (char*) data);
-}
-
-
-int
-main (int    argc,
-      char **argv)
-{
-  ply_hashtable_t *hashtable;
-  int i;
-  const char* key[10] =  {"k1", "k2", "k3", "k4", "k5", "k6", "k7", "k8", "k9", "k10"};
-  const char* data[10] = {"d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10"};
-  char* reply_key = NULL;
-  char* reply_data = NULL;
-  
-  printf ("hashtable test start\n");
-  hashtable = ply_hashtable_new (ply_hashtable_string_hash, ply_hashtable_string_compare);
-  for (i=0; i<10; i++)
-    {
-      ply_hashtable_insert (hashtable, (void *) key[i], (void *) data[9-i]);
-    }
-  for (i=0; i<10; i++)
-    {
-      reply_data = ply_hashtable_lookup (hashtable, (void *) key[i]);
-      printf ("got:%s\n", reply_data);
-    }
-  for (i=0; i<10; i++)
-    {
-      ply_hashtable_remove (hashtable, (void *) key[i]);
-      ply_hashtable_insert (hashtable, (void *) key[i], (void *) data[i]);
-    }
-  for (i=0; i<10; i++)
-    {
-      if (ply_hashtable_lookup_full (hashtable, (void *) key[i], (void**) &reply_key, (void**) &reply_data))
-        printf ("got key:%s data:%s\n", reply_key, reply_data);
-    }
-  ply_hashtable_foreach (hashtable, foreach_func, NULL);
-  ply_hashtable_free(hashtable);
-  printf ("hashtable test end\n");
-  return 0;
-}
-
-#endif
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
index 85262ab6660cd06f183c17499d9fe435a2c42993..8c589c21b902841ff608e9a2c4920de057f467af 100644 (file)
@@ -375,85 +375,4 @@ ply_list_node_get_data (ply_list_node_t *node)
   return node->data;
 }
 
-#ifdef PLY_LIST_ENABLE_TEST
-#include <stdio.h>
-
-static int
-compare_int_ptr (void *element_a,
-                 void *element_b)
-{
-  int *int_a = element_a;
-  int *int_b = element_b;
-  return *int_a - *int_b;
-
-}
-
-int
-main (int    argc,
-      char **argv)
-{
-  ply_list_t *list;
-  ply_list_node_t *node;
-  int i, lastval;
-  int *value;
-  int errors;
-
-  errors = 0;
-
-  list = ply_list_new ();
-
-  ply_list_append_data (list, (void *) "foo");
-  ply_list_append_data (list, (void *) "bar");
-  ply_list_append_data (list, (void *) "baz");
-  ply_list_prepend_data (list, (void *) "qux");
-  ply_list_prepend_data (list, (void *) "quux");
-  ply_list_remove_data (list, (void *) "baz");
-  ply_list_remove_data (list, (void *) "foo");
-
-  node = ply_list_get_first_node (list);
-  i = 0;
-  while (node != NULL)
-    {
-      printf ("node '%d' has data '%s'\n", i,
-              (char *) ply_list_node_get_data (node));
-      node = ply_list_get_next_node (list, node);
-      i++;
-    }
-
-  printf ("\n");
-  ply_list_remove_all_nodes (list);
-  srandom(1);
-
-  for (i = 0; i<100; i++)
-    {
-      value = malloc (sizeof (int));
-      *value = random() % 100;
-      ply_list_append_data (list, (void *) value);
-    }
-
-  ply_list_sort (list, compare_int_ptr);
-
-  node = ply_list_get_first_node (list);
-  i = 0;
-  lastval = 0;
-
-  while (node != NULL)
-    {
-      value = (int *) ply_list_node_get_data (node);
-      if (*value < lastval)
-        {
-          printf ("ERROR: incorrect order\n");
-          errors = 1;
-        }
-      lastval = *value;
-      printf ("node '%d' has data '%d'\n", i, *value);
-      node = ply_list_get_next_node (list, node);
-      i++;
-    }
-
-  ply_list_free (list);
-  return errors;
-}
-
-#endif
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
index ec5b6e5278361e173abbe4cfd0fffc040ead8a95..740c30eadf330d2d93e7c6dac43b3bb9e956bdf0 100644 (file)
@@ -598,26 +598,4 @@ ply_logger_is_tracing_enabled (ply_logger_t *logger)
 }
 #endif /* PLY_ENABLE_TRACING */
 
-#ifdef PLY_LOGGER_ENABLE_TEST
-
-int
-main (int    argc,
-      char **argv)
-{
-  int exit_code;
-  ply_logger_t *logger;
-
-  exit_code = 0;
-  logger = ply_logger_new ();
-
-  ply_logger_inject (logger, "yo yo yo\n");
-  ply_logger_set_output_fd (logger, 1);
-  ply_logger_inject (logger, "yo yo yo yo\n");
-  ply_logger_flush (logger);
-  ply_logger_free (logger);
-
-  return exit_code;
-}
-
-#endif /* PLY_LOGGER_ENABLE_TEST */
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
index cf372cdd7948bbf8dae06e94146b7cda49bced8d..a88aa28b8292c661c1bda1bf17bd86ebde8a7138 100644 (file)
@@ -330,75 +330,5 @@ ply_progress_status_update (ply_progress_t* progress,
     }
 }
 
-#ifdef PLY_PROGRESS_ENABLE_TEST
-
-#include <stdio.h>
-
-int
-main (int    argc,
-      char **argv)
-{
-  double percent;
-  int slowness;
-  double time;
-  int i;
-  const char* strings[10]={"foobar", "barfoo", "barbar", "foo", "foo", "bar", "foo", "more", "even more", "even even more"};
-  ply_progress_t* progress = ply_progress_new ();
-  
-  progress->scalar = 1.0/5;  /* Original time estimate is 5 sec*/
-
-  percent = ply_progress_get_percentage (progress);
-  time = ply_progress_get_time (progress);
-  printf("Time:%f   \t Percentage: %f%%\n", time, percent*100);
-  srand ((int) ply_get_timestamp ());
-  
-  slowness = rand () % 500000 + 50000;
-
-  for (i=0; i<2; i++)
-    {
-      usleep ((rand () % slowness+slowness));
-      percent = ply_progress_get_percentage (progress);
-      time = ply_progress_get_time (progress);
-      printf("Time:%f   \t Percentage: %f%%\n", time, percent*100);
-    }
-  printf("Load cache\n");
-  ply_progress_load_cache (progress, PLYMOUTH_TIME_DIRECTORY "/boot-duration");
-
-  for (i=0; i<10; i++)
-    {
-      ply_progress_status_update (progress, strings[i]);
-      usleep ((rand () % slowness+slowness));
-      percent = ply_progress_get_percentage (progress);
-      time = ply_progress_get_time (progress);
-      printf("Time:%f   \t Percentage: %f%% \tScalar:%f\n", time, percent*100, progress->scalar);
-    }
-  printf("Save and free cache\n");
-  ply_progress_save_cache (progress, PLYMOUTH_TIME_DIRECTORY "/boot-duration");
-  ply_progress_free(progress);
-
-  printf("\nManual set percentage run\n\n");
-
-  progress = ply_progress_new ();
-  progress->scalar = 1.0/5;  /* Original time estimate is 5 sec*/
-
-  percent = ply_progress_get_percentage (progress);
-  time = ply_progress_get_time (progress);
-  printf("Time:%f   \t Percentage: %f%%\n", time, percent*100);
-  srand ((int) ply_get_timestamp ());
-
-  for (i=0; i<12; i++)
-    {
-      ply_progress_set_percentage (progress, (double)i/12);
-      usleep ((rand () % slowness+slowness));
-      percent = ply_progress_get_percentage (progress);
-      time = ply_progress_get_time (progress);
-      printf("Time:%f   \t Percentage: %f%% (%f%%)\tScalar:%f\n", time, percent*100, (double)i/12*100, progress->scalar);
-    }
-  ply_progress_free(progress);
-
-  return 0;
-}
-
-#endif /* PLY_PROGRESS_ENABLE_TEST */
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
     
index cbaca40391e815eeda80cbb6b3191483703e6301..92d357431c7542746d99b07c2a549a9224853482 100644 (file)
@@ -467,141 +467,4 @@ ply_region_get_sorted_rectangle_list (ply_region_t *region)
   return region->rectangle_list;
 }
 
-#ifdef PLY_REGION_ENABLE_TEST
-#include <stdio.h>
-
-#define COVER_SIZE 100
-#define RECTANGLE_COUNT 1000
-
-static void
-cover_with_rect(char             cover[COVER_SIZE][COVER_SIZE],
-                ply_rectangle_t *rectangle,
-                char             value)
-{      /* is value is not zero, the entry will be set to the value,
-          otherwise entry is incremented*/
-  unsigned long x, y;
-  for (y=0; y<rectangle->height; y++)
-    {
-      for (x=0; x<rectangle->width; x++)
-        {
-          if (rectangle->x + x < COVER_SIZE &&
-              rectangle->y + y < COVER_SIZE)
-            {
-              if (value)
-                cover[rectangle->y + y][rectangle->x + x] = value;
-              else
-                cover[rectangle->y + y][rectangle->x + x]++;
-            }
-        }
-    }
-}
-
-static int
-do_test (void)
-{
-  ply_rectangle_t rectangle;
-  char cover[COVER_SIZE][COVER_SIZE];
-  int i;
-  unsigned long x, y;
-  ply_region_t *region;
-  ply_list_node_t *node;
-
-  region = ply_region_new ();
-
-  for (y = 0; y < COVER_SIZE; y++)
-    {
-      for (x = 0; x < COVER_SIZE; x++)
-        {
-          cover[y][x] = 0;
-        }
-    }
-
-  for (i = 0; i < RECTANGLE_COUNT; i++)
-    {
-      rectangle.x = random() % COVER_SIZE-5;
-      rectangle.y = random() % COVER_SIZE-5;
-      rectangle.width = 1 + random() % 20;
-      rectangle.height = 1 + random() % 20;
-      printf("Adding X=%ld Y=%ld W=%ld H=%ld\n",
-              rectangle.x,
-              rectangle.y,
-              rectangle.width,
-              rectangle.height);
-      cover_with_rect(cover, &rectangle, 100); /* 100 means covered by origial squares */
-      ply_region_add_rectangle (region, &rectangle);
-    }
-
-  printf("Converted to:\n");
-  int count = 0;
-
-  ply_list_t *rectangle_list = ply_region_get_rectangle_list (region);
-  for (node = ply_list_get_first_node (rectangle_list);
-       node;
-       node = ply_list_get_next_node (rectangle_list, node))
-    {
-      ply_rectangle_t *small_rectangle = ply_list_node_get_data (node);
-      printf("Processed X=%ld Y=%ld W=%ld H=%ld\n",
-             small_rectangle->x,
-             small_rectangle->y, 
-             small_rectangle->width, 
-             small_rectangle->height);
-      cover_with_rect(cover, small_rectangle, 0);
-      count++;
-    }
-  printf("Rectangles in:%d out:%d\n", RECTANGLE_COUNT, count);
-
-  count=0;
-
-  for (y = 0; y < COVER_SIZE; y++)
-    {
-      printf("%03ld ", y);
-      for (x = 0; x < COVER_SIZE; x++)
-        {
-          if (cover[y][x] >= 100)
-            {
-              if (cover[y][x] == 100)
-                {
-                  printf("-");  /* "-" means should have been covered but wasn't */
-                  count++;
-                }
-              else
-                {
-                  if (cover[y][x] == 101)
-                    printf("O");  /* "O" means correctly covered */
-                  else
-                    {
-                      printf("%d", cover[y][x] - 101);
-                      count++;  /* 1+ means covered multiple times*/
-                    }
-                }
-            }
-          else
-            {
-              if (cover[y][x] == 0)
-                printf("o");  /* "o" means not involved*/
-              else
-                {
-                  printf("%c", 'A' - 1 + cover[y][x]);
-                  count++;  /* A+ means covered despite being not involved*/
-                }
-            }
-        }
-      printf("\n");
-    }
-  printf("errors:%d\n", count);
-  return count;
-}
-int
-main (int    argc,
-      char **argv)
-{
-  int i;
-  srandom(312);
-  for (i=0; i<100; i++)
-    {
-      if (do_test ()) return 1;
-    }
-  return 0;
-}
-#endif
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
index 0bdb985bf81ffa811e08f195c4d961daf9775f4d..379035ccb900bab5ad85084a6857070cea9066ac 100644 (file)
@@ -587,57 +587,4 @@ ply_terminal_session_close_log (ply_terminal_session_t *session)
   return ply_logger_close_file (session->logger);
 }
 
-#ifdef PLY_TERMINAL_SESSION_ENABLE_TEST
-
-#include <stdio.h>
-
-#include "ply-event-loop.h"
-#include "ply-terminal-session.h"
-
-static void
-on_finished (ply_event_loop_t *loop)
-{
-  ply_event_loop_exit (loop, 0);
-}
-
-int
-main (int    argc,
-      char **argv)
-{
-  ply_event_loop_t *loop;
-  ply_terminal_session_t *session;
-  int exit_code;
-  ply_terminal_session_flags_t flags;
-
-  exit_code = 0;
-
-  loop = ply_event_loop_new ();
-
-  session = ply_terminal_session_new ((const char * const *) (argv + 1));
-
-  flags = PLY_TERMINAL_SESSION_FLAGS_RUN_IN_PARENT;
-  flags |= PLY_TERMINAL_SESSION_FLAGS_LOOK_IN_PATH;
-
-  ply_terminal_session_attach_to_event_loop (session, loop);
-
-  if (!ply_terminal_session_run (session, flags, 
-                                 (ply_terminal_session_begin_handler_t) NULL,
-                                 (ply_terminal_session_output_handler_t) NULL,
-                                 (ply_terminal_session_hangup_handler_t) 
-                                 on_finished, loop))
-    {
-      perror ("could not start terminal session");
-      return errno;
-    }
-
-  ply_terminal_session_open_log (session, "foo.log");
-
-  exit_code = ply_event_loop_run (loop);
-
-  ply_terminal_session_free (session);
-
-  return exit_code;
-}
-
-#endif /* PLY_TERMINAL_SESSION_ENABLE_TEST */
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
diff --git a/src/libply/tests/Makefile.am b/src/libply/tests/Makefile.am
deleted file mode 100644 (file)
index bc4da58..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-INCLUDES =                                                                    \
-           -I$(top_srcdir)                                                    \
-           -I$(srcdir)/..                                                     \
-           -I$(srcdir)
-TESTS = 
-
-if ENABLE_TESTS
-include $(srcdir)/ply-terminal-session-test.am
-include $(srcdir)/ply-logger-test.am
-include $(srcdir)/ply-array-test.am
-include $(srcdir)/ply-bitarray-test.am
-include $(srcdir)/ply-list-test.am
-include $(srcdir)/ply-hashtable-test.am
-include $(srcdir)/ply-event-loop-test.am
-include $(srcdir)/ply-command-parser-test.am
-include $(srcdir)/ply-progress-test.am
-include $(srcdir)/ply-region.am
-endif
-
-noinst_PROGRAMS = $(TESTS)
-
-# Our tests aren't unit tests so clear for now
-TESTS =
-
-MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/libply/tests/ply-array-test.am b/src/libply/tests/ply-array-test.am
deleted file mode 100644 (file)
index 4f8ecc4..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-TESTS += ply-array-test
-
-ply_array_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_ARRAY_ENABLE_TEST
-ply_array_test_LDADD = $(PLYMOUTH_LIBS)
-
-ply_array_test_SOURCES =                                                     \
-                          $(srcdir)/../ply-buffer.h                          \
-                          $(srcdir)/../ply-buffer.c                          \
-                          $(srcdir)/../ply-list.h                            \
-                          $(srcdir)/../ply-list.c                            \
-                          $(srcdir)/../ply-logger.h                          \
-                          $(srcdir)/../ply-logger.c                          \
-                          $(srcdir)/../ply-utils.h                           \
-                          $(srcdir)/../ply-utils.c                           \
-                          $(srcdir)/../ply-array.h                           \
-                          $(srcdir)/../ply-array.c
diff --git a/src/libply/tests/ply-bitarray-test.am b/src/libply/tests/ply-bitarray-test.am
deleted file mode 100644 (file)
index 85c3608..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-TESTS += ply-bitarray-test
-
-ply_bitarray_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_BITARRAY_ENABLE_TEST
-ply_bitarray_test_LDADD = $(PLYMOUTH_LIBS)
-
-ply_bitarray_test_SOURCES =                                                     \
-                          $(srcdir)/../ply-bitarray.h                           \
-                          $(srcdir)/../ply-bitarray.c
diff --git a/src/libply/tests/ply-command-parser-test.am b/src/libply/tests/ply-command-parser-test.am
deleted file mode 100644 (file)
index 91649d5..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-TESTS += ply-command-parser-test
-
-ply_command_parser_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_COMMAND_PARSER_ENABLE_TEST
-ply_command_parser_test_LDADD = $(PLYMOUTH_LIBS)
-
-ply_command_parser_test_SOURCES =                                            \
-                          $(srcdir)/../ply-buffer.h                          \
-                          $(srcdir)/../ply-buffer.c                          \
-                          $(srcdir)/../ply-event-loop.h                      \
-                          $(srcdir)/../ply-event-loop.c                      \
-                          $(srcdir)/../ply-list.h                            \
-                          $(srcdir)/../ply-list.c                            \
-                          $(srcdir)/../ply-logger.h                          \
-                          $(srcdir)/../ply-logger.c                          \
-                          $(srcdir)/../ply-utils.h                           \
-                          $(srcdir)/../ply-utils.c                           \
-                          $(srcdir)/../ply-command-parser.h                  \
-                          $(srcdir)/../ply-command-parser.c
diff --git a/src/libply/tests/ply-event-loop-test.am b/src/libply/tests/ply-event-loop-test.am
deleted file mode 100644 (file)
index c666ea6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-TESTS += ply-event-loop-test
-
-ply_event_loop_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_EVENT_LOOP_ENABLE_TEST
-ply_event_loop_test_LDADD = $(PLYMOUTH_LIBS)
-
-ply_event_loop_test_SOURCES =                                               \
-                          $(srcdir)/../ply-utils.h                          \
-                          $(srcdir)/../ply-utils.c                          \
-                          $(srcdir)/../ply-list.h                           \
-                          $(srcdir)/../ply-list.c                           \
-                          $(srcdir)/../ply-logger.h                         \
-                          $(srcdir)/../ply-logger.c                         \
-                          $(srcdir)/../ply-event-loop.h                     \
-                          $(srcdir)/../ply-event-loop.c
diff --git a/src/libply/tests/ply-hashtable-test.am b/src/libply/tests/ply-hashtable-test.am
deleted file mode 100644 (file)
index d3410fc..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-TESTS += ply-hashtable-test
-
-ply_hashtable_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_HASHTABLE_ENABLE_TEST
-ply_hashtable_test_LDADD = $(PLYMOUTH_LIBS)
-
-ply_hashtable_test_SOURCES =                                                     \
-                          $(srcdir)/../ply-hashtable.h                           \
-                          $(srcdir)/../ply-hashtable.c                           \
-                          $(srcdir)/../ply-bitarray.h                            \
-                          $(srcdir)/../ply-bitarray.c
diff --git a/src/libply/tests/ply-list-test.am b/src/libply/tests/ply-list-test.am
deleted file mode 100644 (file)
index 8beb578..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-TESTS += ply-list-test
-
-ply_list_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_LIST_ENABLE_TEST
-ply_list_test_LDADD = $(PLYMOUTH_LIBS)
-
-ply_list_test_SOURCES =                                                     \
-                          $(srcdir)/../ply-list.h                           \
-                          $(srcdir)/../ply-list.c
diff --git a/src/libply/tests/ply-logger-test.am b/src/libply/tests/ply-logger-test.am
deleted file mode 100644 (file)
index a589fb9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-TESTS += ply-logger-test
-
-ply_logger_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_LOGGER_ENABLE_TEST
-ply_logger_test_LDADD = $(PLYMOUTH_LIBS)
-
-ply_logger_test_SOURCES =                                                     \
-                          $(srcdir)/../ply-list.h                             \
-                          $(srcdir)/../ply-list.c                             \
-                          $(srcdir)/../ply-utils.h                            \
-                          $(srcdir)/../ply-utils.c                            \
-                          $(srcdir)/../ply-logger.h                           \
-                          $(srcdir)/../ply-logger.c
diff --git a/src/libply/tests/ply-progress-test.am b/src/libply/tests/ply-progress-test.am
deleted file mode 100644 (file)
index 6279fac..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-TESTS += ply-progress-test
-
-ply_progress_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_PROGRESS_ENABLE_TEST      \
-           -DPLYMOUTH_TIME_DIRECTORY=\"$(localstatedir)/lib/plymouth/\"
-ply_progress_test_LDADD = $(PLYMOUTH_LIBS)
-
-ply_progress_test_SOURCES =                                     \
-                          $(srcdir)/../ply-progress.h           \
-                          $(srcdir)/../ply-progress.c           \
-                          $(srcdir)/../ply-list.h               \
-                          $(srcdir)/../ply-list.c               \
-                          $(srcdir)/../ply-logger.h             \
-                          $(srcdir)/../ply-logger.c             \
-                          $(srcdir)/../ply-utils.h              \
-                          $(srcdir)/../ply-utils.c
diff --git a/src/libply/tests/ply-region.am b/src/libply/tests/ply-region.am
deleted file mode 100644 (file)
index 1883833..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-TESTS += ply-region-test
-
-ply_region_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_REGION_ENABLE_TEST
-ply_region_test_LDADD = $(PLYMOUTH_LIBS)
-
-ply_region_test_SOURCES =                                                   \
-                          $(srcdir)/../ply-region.h                         \
-                          $(srcdir)/../ply-region.c                         \
-                          $(srcdir)/../ply-rectangle.h                      \
-                          $(srcdir)/../ply-rectangle.c                      \
-                          $(srcdir)/../ply-list.h                           \
-                          $(srcdir)/../ply-list.c                           
diff --git a/src/libply/tests/ply-terminal-session-test.am b/src/libply/tests/ply-terminal-session-test.am
deleted file mode 100644 (file)
index decb531..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-TESTS += ply-terminal-session-test
-
-ply_terminal_session_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_TERMINAL_SESSION_ENABLE_TEST
-ply_terminal_session_test_LDADD = $(PLYMOUTH_LIBS)
-
-ply_terminal_session_test_SOURCES =                                                   \
-                          $(srcdir)/../ply-utils.h                                    \
-                          $(srcdir)/../ply-utils.c                                    \
-                          $(srcdir)/../ply-buffer.h                                   \
-                          $(srcdir)/../ply-buffer.c                                   \
-                          $(srcdir)/../ply-logger.h                                   \
-                          $(srcdir)/../ply-logger.c                                   \
-                          $(srcdir)/../ply-list.h                                     \
-                          $(srcdir)/../ply-list.c                                     \
-                          $(srcdir)/../ply-event-loop.h                               \
-                          $(srcdir)/../ply-event-loop.c                               \
-                          $(srcdir)/../ply-terminal-session.h                         \
-                          $(srcdir)/../ply-terminal-session.c
index 2d2a5b85f21ecf68d878cd47f284b43456e91f02..3e67bfbf2fa7de00e507a2914b4ada3bc4a534b1 100644 (file)
@@ -831,183 +831,4 @@ ply_boot_server_attach_to_event_loop (ply_boot_server_t *server,
                                  server); 
 }
 
-#ifdef PLY_BOOT_SERVER_ENABLE_TEST
-
-#include <stdio.h>
-
-#include "ply-event-loop.h"
-#include "ply-boot-server.h"
-
-static void 
-on_update (ply_event_loop_t  *loop,
-           const char        *status)
-{
-  printf ("new status is '%s'\n", status);
-}
-
-static void
-on_newroot (ply_event_loop_t *loop)
-{
-  printf ("got newroot request\n");
-}
-
-static void
-on_system_initialized (ply_event_loop_t *loop)
-{
-  printf ("got sysinit done request\n");
-}
-
-static void
-on_show_splash (ply_event_loop_t *loop)
-{
-  printf ("got show splash request\n");
-}
-
-static void
-on_hide_splash (ply_event_loop_t *loop)
-{
-  printf ("got hide splash request\n");
-}
-
-static void
-on_deactivate (ply_event_loop_t *loop)
-{
-  printf ("got deactivate request\n");
-}
-
-static void
-on_reactivate (ply_event_loop_t *loop)
-{
-  printf ("got reactivate request\n");
-}
-
-static void
-on_quit (ply_event_loop_t *loop)
-{
-  printf ("got quit request, quiting...\n");
-  ply_event_loop_exit (loop, 0);
-}
-
-static void
-on_error (ply_event_loop_t *loop)
-{
-  printf ("got error starting service\n");
-}
-
-static char *
-on_ask_for_password (ply_event_loop_t *loop)
-{
-  printf ("got password request, returning 'password'...\n");
-
-  return strdup ("password");
-}
-
-static void
-on_ask_question (ply_event_loop_t *loop)
-{
-  printf ("got question request\n");
-  return;
-}
-
-static void
-on_display_message (ply_event_loop_t *loop)
-{
-  printf ("got display message request\n");
-  return;
-}
-
-static void
-on_hide_message (ply_event_loop_t *loop)
-{
-  printf ("got hide message request\n");
-  return;
-}
-
-static void
-on_watch_for_keystroke (ply_event_loop_t *loop)
-{
-  printf ("got keystroke request\n");
-
-  return;
-}
-
-static void
-on_progress_pause (ply_event_loop_t *loop)
-{
-  printf ("got progress pause request\n");
-
-  return;
-}
-
-static void
-on_progress_unpause (ply_event_loop_t *loop)
-{
-  printf ("got progress unpause request\n");
-
-  return;
-}
-
-static void
-on_ignore_keystroke (ply_event_loop_t *loop)
-{
-  printf ("got keystroke ignore request\n");
-
-  return;
-}
-
-static bool
-on_has_active_vt (ply_event_loop_t *loop)
-{
-  printf ("got has_active vt? request\n");
-  return true;
-}
-
-int
-main (int    argc,
-      char **argv)
-{
-  ply_event_loop_t *loop;
-  ply_boot_server_t *server;
-  int exit_code;
-
-  exit_code = 0;
-
-  loop = ply_event_loop_new ();
-
-  server = ply_boot_server_new ((ply_boot_server_update_handler_t) on_update,
-                                (ply_boot_server_change_mode_handler_t) on_change_mode,
-                                (ply_boot_server_system_update_handler_t) on_system_update,
-                                (ply_boot_server_ask_for_password_handler_t) on_ask_for_password,
-                                (ply_boot_server_ask_question_handler_t) on_ask_question,
-                                (ply_boot_server_display_message_handler_t) on_display_message,
-                                (ply_boot_server_hide_message_handler_t) on_hide_message,
-                                (ply_boot_server_watch_for_keystroke_handler_t) on_watch_for_keystroke,
-                                (ply_boot_server_ignore_keystroke_handler_t) on_ignore_keystroke,
-                                (ply_boot_server_progress_pause_handler_t) on_progress_pause,
-                                (ply_boot_server_progress_unpause_handler_t) on_progress_unpause,
-                                (ply_boot_server_show_splash_handler_t) on_show_splash,
-                                (ply_boot_server_hide_splash_handler_t) on_hide_splash,
-                                (ply_boot_server_newroot_handler_t) on_newroot,
-                                (ply_boot_server_system_initialized_handler_t) on_system_initialized,
-                                (ply_boot_server_error_handler_t) on_error,
-                                (ply_boot_server_deactivate_handler_t) on_deactivate,
-                                (ply_boot_server_reactivate_handler_t) on_reactivate,
-                                (ply_boot_server_quit_handler_t) on_quit,
-                                (ply_boot_server_has_active_vt_handler_t) on_has_active_vt,
-                                loop);
-
-  if (!ply_boot_server_listen (server))
-    {
-      perror ("could not start boot status daemon");
-      return errno;
-    }
-
-  ply_boot_server_attach_to_event_loop (server, loop);
-  exit_code = ply_event_loop_run (loop);
-  ply_boot_server_free (server);
-
-  return exit_code;
-}
-
-#endif /* PLY_BOOT_SERVER_ENABLE_TEST */
 /* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
deleted file mode 100644 (file)
index 86a8ea6..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-INCLUDES =                                                                    \
-           -I$(top_srcdir)                                                    \
-           -I$(srcdir)/..                                                     \
-           -I$(srcdir)/../libply                                              \
-           -I$(srcdir)/../libply-splash-core                                  \
-           -I$(srcdir)
-TESTS =
-
-if ENABLE_TESTS
-include $(srcdir)/ply-boot-server-test.am
-include $(srcdir)/ply-boot-splash-test.am
-endif
-
-noinst_PROGRAMS = $(TESTS)
-
-# our tests aren't unit tests, so clear for now
-TESTS =
-MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/tests/ply-boot-server-test.am b/src/tests/ply-boot-server-test.am
deleted file mode 100644 (file)
index cc28348..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-TESTS += ply-boot-server-test
-
-ply_boot_server_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_BOOT_SERVER_ENABLE_TEST
-ply_boot_server_test_LDADD = $(PLYMOUTH_LIBS) ../libply/libply.la
-
-ply_boot_server_test_SOURCES =                                                \
-                          $(srcdir)/../ply-boot-server.h                      \
-                          $(srcdir)/../ply-boot-server.c
diff --git a/src/tests/ply-boot-splash-test.am b/src/tests/ply-boot-splash-test.am
deleted file mode 100644 (file)
index 9dd1598..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-TESTS += ply-boot-splash-test
-
-ply_boot_splash_test_CFLAGS = $(PLYMOUTH_CFLAGS) -DPLY_BOOT_SPLASH_ENABLE_TEST  \
-                        -DPLYMOUTH_TIME_DIRECTORY=\"/var/lib/plymouth\"         \
-                        -DPLYMOUTH_PLUGIN_PATH=\"$(PLYMOUTH_PLUGIN_PATH)\"      \
-                        -DPLYMOUTH_THEME_PATH=\"$(PLYMOUTH_THEME_PATH)/\"
-
-ply_boot_splash_test_LDADD = $(PLYMOUTH_LIBS) ../libply/libply.la
-
-ply_boot_splash_test_SOURCES =                                                   \
-                          $(srcdir)/../libply-splash-core/ply-boot-splash-plugin.h \
-                          $(srcdir)/../libply-splash-core/ply-keyboard.h           \
-                          $(srcdir)/../libply-splash-core/ply-keyboard.c           \
-                          $(srcdir)/../libply-splash-core/ply-pixel-buffer.h       \
-                          $(srcdir)/../libply-splash-core/ply-pixel-buffer.c       \
-                          $(srcdir)/../libply-splash-core/ply-pixel-display.h      \
-                          $(srcdir)/../libply-splash-core/ply-pixel-display.c      \
-                          $(srcdir)/../libply-splash-core/ply-renderer.h           \
-                          $(srcdir)/../libply-splash-core/ply-renderer.c           \
-                          $(srcdir)/../libply-splash-core/ply-terminal.h           \
-                          $(srcdir)/../libply-splash-core/ply-terminal.c           \
-                          $(srcdir)/../libply-splash-core/ply-text-display.h       \
-                          $(srcdir)/../libply-splash-core/ply-text-display.c       \
-                          $(srcdir)/../libply-splash-core/ply-boot-splash.h        \
-                          $(srcdir)/../libply-splash-core/ply-boot-splash.c