[lasem] tests: don't abort on non existent data directory.



commit a5dff3ecadbfdaf3404cee61252c91b6bc2baa5b
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Sun Nov 7 22:26:16 2010 +0100

    tests: don't abort on non existent data directory.
    
    I don't want to distribute the test suites in the tarball, and
    make distcheck must pass.

 tests/suite.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/tests/suite.c b/tests/suite.c
index 0acf285..a975eba 100644
--- a/tests/suite.c
+++ b/tests/suite.c
@@ -12,7 +12,12 @@ build_file_list (const char *path, GRegex *filename_regex)
 	char *filename;
 
 	directory = g_dir_open (path, 0, &error);
-	g_assert (error == NULL);
+	if (error != NULL) {
+		if (directory != NULL)
+			g_dir_close (directory);
+		g_error_free (error);
+		return NULL;
+	}
 
 	do {
 		entry = g_dir_read_name (directory);



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