[libsoup] distcheck fixes for sniffing-test



commit 610d57f7d31a52a12c8093cd158f4a496f75e920
Author: Dan Winship <danw gnome org>
Date:   Mon Jul 13 11:04:34 2009 -0400

    distcheck fixes for sniffing-test

 tests/Makefile.am     |   26 +++++++++++++++++---------
 tests/sniffing-test.c |   12 ++++++------
 2 files changed, 23 insertions(+), 15 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ca8158d..20716c2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -98,15 +98,23 @@ TESTS =			\
 	$(SSL_TESTS)	\
 	$(XMLRPC_TESTS)
 
-EXTRA_DIST =		\
-	libsoup.supp	\
-	test-cert.pem	\
-	test-key.pem	\
-	htdigest	\
-	htpasswd	\
-	httpd.conf.in	\
-	index.txt	\
-	xmlrpc-server.php
+SNIFFING_FILES =		\
+	resources/atom.xml	\
+	resources/home.gif	\
+	resources/mbox		\
+	resources/rss20.xml	\
+	resources/test.html
+
+EXTRA_DIST =			\
+	htdigest		\
+	htpasswd		\
+	httpd.conf.in		\
+	index.txt		\
+	libsoup.supp		\
+	test-cert.pem		\
+	test-key.pem		\
+	xmlrpc-server.php	\
+	$(SNIFFING_FILES)
 
 if MISSING_REGRESSION_TEST_PACKAGES
 check-local: check-TESTS
diff --git a/tests/sniffing-test.c b/tests/sniffing-test.c
index 26a1d52..a5c9587 100644
--- a/tests/sniffing-test.c
+++ b/tests/sniffing-test.c
@@ -50,7 +50,7 @@ server_callback (SoupServer *server, SoupMessage *msg,
 			contents = g_strdup ("");
 			length = 0;
 		} else {
-			g_file_get_contents ("resources/mbox",
+			g_file_get_contents (SRCDIR "/resources/mbox",
 					     &contents, &length,
 					     &error);
 		}
@@ -67,7 +67,7 @@ server_callback (SoupServer *server, SoupMessage *msg,
 
 	if (g_str_has_prefix (path, "/text_or_binary/")) {
 		char *base_name = g_path_get_basename (path);
-		char *file_name = g_strdup_printf ("resources/%s", base_name);
+		char *file_name = g_strdup_printf (SRCDIR "/resources/%s", base_name);
 
 		g_file_get_contents (file_name,
 				     &contents, &length,
@@ -88,7 +88,7 @@ server_callback (SoupServer *server, SoupMessage *msg,
 
 	if (g_str_has_prefix (path, "/unknown/")) {
 		char *base_name = g_path_get_basename (path);
-		char *file_name = g_strdup_printf ("resources/%s", base_name);
+		char *file_name = g_strdup_printf (SRCDIR "/resources/%s", base_name);
 
 		g_file_get_contents (file_name,
 				     &contents, &length,
@@ -112,7 +112,7 @@ server_callback (SoupServer *server, SoupMessage *msg,
 		char *ptr;
 
 		char *base_name = g_path_get_basename (path);
-		char *file_name = g_strdup_printf ("resources/%s", base_name);
+		char *file_name = g_strdup_printf (SRCDIR "/resources/%s", base_name);
 
 		g_file_get_contents (file_name,
 				     &contents, &length,
@@ -138,7 +138,7 @@ server_callback (SoupServer *server, SoupMessage *msg,
 
 	if (g_str_has_prefix (path, "/multiple_headers/")) {
 		char *base_name = g_path_get_basename (path);
-		char *file_name = g_strdup_printf ("resources/%s", base_name);
+		char *file_name = g_strdup_printf (SRCDIR "/resources/%s", base_name);
 
 		g_file_get_contents (file_name,
 				     &contents, &length,
@@ -306,7 +306,7 @@ do_signals_test (gboolean should_content_sniff,
 		contents = g_strdup ("");
 		length = 0;
 	} else {
-		g_file_get_contents ("resources/mbox",
+		g_file_get_contents (SRCDIR "/resources/mbox",
 				     &contents, &length,
 				     &error);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]