[svn r569] Beautify the test scripts, fixed some missing references to the gthread module. trunk
authorrosfran
Wed Apr 18 15:47:40 2007 +0100 (2007-04-18)
branchtrunk
changeset 5641b897f699097
parent 563 bfe33d404df5
child 565 ed34b1dab103
[svn r569] Beautify the test scripts, fixed some missing references to the gthread module.
gmyth/configure.ac
gmyth/gmyth.pc.in
gmyth/src/gmyth_livetv.c
gmyth/tests/Makefile.am
gmyth/tests/gmyth_test_connection.c
gmyth/tests/gmyth_test_epg.c
gmyth/tests/gmyth_test_http.c
gmyth/tests/gmyth_test_recorder.c
gmyth/tests/gmyth_test_vlc.c
gmyth/tests/main.c
     1.1 --- a/gmyth/configure.ac	Tue Apr 17 21:48:00 2007 +0100
     1.2 +++ b/gmyth/configure.ac	Wed Apr 18 15:47:40 2007 +0100
     1.3 @@ -126,6 +126,18 @@
     1.4  AC_SUBST(GOBJECT_CFLAGS)
     1.5  AC_SUBST(GOBJECT_LIBS)
     1.6  
     1.7 +# Check for GThread 
     1.8 +PKG_CHECK_MODULES(GTHREAD, gthread-2.0, HAVE_GTHREAD=yes,HAVE_GTHREAD=no)
     1.9 +
    1.10 +# Give error and exit if we don't have glib
    1.11 +if test "x$HAVE_GTHREAD" = "xno"; then
    1.12 +  AC_MSG_ERROR(you need gthread+-2.0 installed)
    1.13 +fi
    1.14 +
    1.15 +# make GTHREAD_CFLAGS and GTHREAD_LIBS available
    1.16 +AC_SUBST(GTHREAD_CFLAGS)
    1.17 +AC_SUBST(GTHREAD_LIBS)
    1.18 +
    1.19  # Check for libxml-2.0
    1.20  PKG_CHECK_MODULES(LIBXML, libxml-2.0, HAVE_LIBXML=yes,HAVE_LIBXML=no)
    1.21  
     2.1 --- a/gmyth/gmyth.pc.in	Tue Apr 17 21:48:00 2007 +0100
     2.2 +++ b/gmyth/gmyth.pc.in	Wed Apr 18 15:47:40 2007 +0100
     2.3 @@ -6,7 +6,7 @@
     2.4  Name: gmyth
     2.5  Description: Myth TV library based upon GLib/GObject paradigm
     2.6  Version: @VERSION@
     2.7 -Requires: gobject-2.0 glib-2.0 libcurl
     2.8 +Requires: gobject-2.0 glib-2.0 gthread-2.0 libcurl
     2.9  
    2.10  Libs: @MYSQL_LIBS@ -L${libdir} -lgmyth -lcurl
    2.11  Cflags: -I${includedir}/gmyth
     3.1 --- a/gmyth/src/gmyth_livetv.c	Tue Apr 17 21:48:00 2007 +0100
     3.2 +++ b/gmyth/src/gmyth_livetv.c	Wed Apr 18 15:47:40 2007 +0100
     3.3 @@ -530,7 +530,7 @@
     3.4  		/* Get program info from database using chanid and starttime */
     3.5  		livetv->proginfo = gmyth_tvchain_get_program_at (livetv->tvchain, tvchain_curr_index++ );
     3.6  		if ( livetv->proginfo == NULL ) {
     3.7 -			gmyth_debug ("[%s] LiveTV not successfully started.\n", __FUNCTION__ );
     3.8 +			gmyth_debug ("LiveTV not successfully started.\n");
     3.9  			res = FALSE;
    3.10  			goto error;
    3.11  		} else {
    3.12 @@ -548,7 +548,7 @@
    3.13  	{
    3.14  		res = FALSE;
    3.15  		gmyth_debug( "LiveTV MONITOR handler error on setup!" );
    3.16 -		goto error;		
    3.17 +		goto error;
    3.18  	}
    3.19  	
    3.20  	livetv->setup_done = TRUE;
    3.21 @@ -705,7 +705,7 @@
    3.22  	return res;
    3.23  
    3.24  error:
    3.25 -	gmyth_debug( "[%s] ERROR running LiveTV setup.\n", __FUNCTION__ );
    3.26 +	gmyth_debug( "ERROR running LiveTV setup.\n" );
    3.27  
    3.28      res = FALSE;
    3.29      
    3.30 @@ -847,4 +847,3 @@
    3.31  	// TODO
    3.32  
    3.33  }
    3.34 -
     4.1 --- a/gmyth/tests/Makefile.am	Tue Apr 17 21:48:00 2007 +0100
     4.2 +++ b/gmyth/tests/Makefile.am	Wed Apr 18 15:47:40 2007 +0100
     4.3 @@ -1,5 +1,9 @@
     4.4 +
     4.5  LDADD = \
     4.6 -	$(top_srcdir)/src/.libs/libgmyth.la @GLIB_LIBS@
     4.7 +	$(top_srcdir)/src/.libs/libgmyth.la
     4.8 +
     4.9 +LDFLAGS = \
    4.10 +	@GLIB_LIBS@ @GOBJECT_LIBS@ @GTHREAD_LIBS@ @LIBCURL_LIBS@ 
    4.11  
    4.12  INCLUDES = \
    4.13  	-I$(top_srcdir) \
    4.14 @@ -30,7 +34,7 @@
    4.15  	gmyth_test_vlc \
    4.16  	gmyth_test_http
    4.17  
    4.18 -#TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir)
    4.19 +#TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) @GLIB_LIBS@ @GOBJECT_LIBS@ @LIBCURL_LIBS@
    4.20  
    4.21  test_SOURCES = \
    4.22  	main.c
     5.1 --- a/gmyth/tests/gmyth_test_connection.c	Tue Apr 17 21:48:00 2007 +0100
     5.2 +++ b/gmyth/tests/gmyth_test_connection.c	Wed Apr 18 15:47:40 2007 +0100
     5.3 @@ -60,7 +60,7 @@
     5.4  
     5.5      GMythBackendInfo *backend_info;
     5.6      g_type_init ();
     5.7 -    //g_thread_init (NULL);
     5.8 +    g_thread_init (NULL);
     5.9  
    5.10      backend_info = gmyth_backend_info_new_with_uri (argv[1]);
    5.11  
     6.1 --- a/gmyth/tests/gmyth_test_epg.c	Tue Apr 17 21:48:00 2007 +0100
     6.2 +++ b/gmyth/tests/gmyth_test_epg.c	Wed Apr 18 15:47:40 2007 +0100
     6.3 @@ -48,7 +48,7 @@
     6.4  
     6.5      GMythBackendInfo *backend_info;
     6.6      g_type_init ();
     6.7 -    //g_thread_init (NULL);
     6.8 +    g_thread_init (NULL);
     6.9  
    6.10      backend_info = gmyth_backend_info_new_with_uri (argv[1]);
    6.11  
     7.1 --- a/gmyth/tests/gmyth_test_http.c	Tue Apr 17 21:48:00 2007 +0100
     7.2 +++ b/gmyth/tests/gmyth_test_http.c	Wed Apr 18 15:47:40 2007 +0100
     7.3 @@ -7,7 +7,7 @@
     7.4  {
     7.5      GMythBackendInfo *backend_info;
     7.6      g_type_init();
     7.7 -    //g_thread_init(NULL);
     7.8 +    g_thread_init(NULL);
     7.9  
    7.10      backend_info = gmyth_backend_info_new ();
    7.11  
     8.1 --- a/gmyth/tests/gmyth_test_recorder.c	Tue Apr 17 21:48:00 2007 +0100
     8.2 +++ b/gmyth/tests/gmyth_test_recorder.c	Wed Apr 18 15:47:40 2007 +0100
     8.3 @@ -106,7 +106,7 @@
     8.4  
     8.5      GMythBackendInfo *backend_info;
     8.6      g_type_init ();
     8.7 -    //g_thread_init (NULL);
     8.8 +    g_thread_init (NULL);
     8.9  
    8.10      backend_info = gmyth_backend_info_new_with_uri (argv[1]);
    8.11  
     9.1 --- a/gmyth/tests/gmyth_test_vlc.c	Tue Apr 17 21:48:00 2007 +0100
     9.2 +++ b/gmyth/tests/gmyth_test_vlc.c	Wed Apr 18 15:47:40 2007 +0100
     9.3 @@ -7,7 +7,7 @@
     9.4  {
     9.5      GMythBackendInfo *backend_info;
     9.6      g_type_init();
     9.7 -    //g_thread_init(NULL);
     9.8 +    g_thread_init(NULL);
     9.9  
    9.10      backend_info = gmyth_backend_info_new ();
    9.11  
    10.1 --- a/gmyth/tests/main.c	Tue Apr 17 21:48:00 2007 +0100
    10.2 +++ b/gmyth/tests/main.c	Wed Apr 18 15:47:40 2007 +0100
    10.3 @@ -10,7 +10,7 @@
    10.4      gboolean res;
    10.5      GMythBackendInfo *backend_info;
    10.6      g_type_init ();
    10.7 - //   g_thread_init (NULL);
    10.8 +    g_thread_init (NULL);
    10.9  
   10.10      backend_info = gmyth_backend_info_new ();
   10.11      gmyth_uri = gmyth_uri_new_with_value (uri);