summaryrefslogtreecommitdiff
blob: f351092b2f80140aa9a306b12bbf863a24df35f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--- tests/Makefile.am
+++ tests/Makefile.am
@@ -11,7 +11,7 @@
 	test-thread.h \
 	test-unknown.h
 
-noinst_LTLIBRARIES = testhelper.la
+check_LTLIBRARIES = testhelper.la
 linked_LIBS = testhelper.la
 
 testhelper_la_LDFLAGS = -module -avoid-version
@@ -47,6 +47,7 @@
 	   cp $(top_srcdir)/gobject/*.py $(top_builddir)/gobject; \
 	   cp $(top_srcdir)/gio/*.py $(top_builddir)/gio; \
 	fi
+	$(LN_S) .libs/testhelper.so testhelper.so
 	@$(PYTHON) $(srcdir)/runtests.py $(top_builddir) $(top_srcdir)
 	@if test "$(top_builddir)" != "$(top_srcdir)"; then \
 	   rm -f $(top_builddir)/glib/*.py; \
@@ -58,8 +59,5 @@
 	@rm -fr $(top_builddir)/gio/*.pyc
 
 
-all: $(LTLIBRARIES:.la=.so)
 clean-local:
-	rm -f $(LTLIBRARIES:.la=.so)
-.la.so:
-	$(LN_S) .libs/$@ $@ || true
+	rm -f .libs/testhelper.so
--- tests/runtests.py
+++ tests/runtests.py
@@ -6,6 +6,9 @@
 
 import common
 
+# Some tests fail with translated messages.
+os.environ["LC_ALL"] = "C"
+
 program = None
 if len(sys.argv) == 3:
     buildDir = sys.argv[1]
--- tests/test_gio.py
+++ tests/test_gio.py
@@ -386,9 +386,10 @@
 
     def testQueryWritableNamespaces(self):
         infolist = self.file.query_writable_namespaces()
-        for info in infolist:
-            if info.name == "xattr":
-                self.assertEqual(info.type, gio.FILE_ATTRIBUTE_TYPE_STRING)
+        if infolist:
+            for info in infolist:
+                if info.name == "xattr":
+                    self.assertEqual(info.type, gio.FILE_ATTRIBUTE_TYPE_STRING)
 
     def testSetAttribute(self):
         self._f.write("testing attributes")