diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2015-02-01 23:43:24 +0000 |
---|---|---|
committer | Ross Lagerwall <rosslagerwall@gmail.com> | 2015-02-18 18:31:36 +0000 |
commit | 5a4cc41acbf026fd640e16f6323482fb366bfb19 (patch) | |
tree | afbb893a2c69dab64ad047c29c332d32eb673172 /test | |
parent | f853403f050dde5df5a14c73bb61ec4f0553e64c (diff) | |
download | gvfs-5a4cc41acbf026fd640e16f6323482fb366bfb19.tar.gz |
test: Support /tmp on the same partition as test home
Fix a test failure in test_file_in_system where it fails if /tmp is the
same partition as $XDG_DATA_HOME by looking in a different place for the
trashed item.
https://bugzilla.gnome.org/show_bug.cgi?id=743820
Diffstat (limited to 'test')
-rwxr-xr-x | test/gvfs-test | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/gvfs-test b/test/gvfs-test index ef39e033..715d90cb 100755 --- a/test/gvfs-test +++ b/test/gvfs-test @@ -1673,8 +1673,12 @@ class Trash(GvfsTestCase): if trash.returncode == 0: self.assertFalse(os.path.exists(self.my_file)) - self.assertTrue(os.path.exists('/tmp/.Trash-%i/files/hello_gvfs_tests.txt' - % os.getuid())) + if os.stat('/tmp').st_dev == os.stat(os.environ['XDG_DATA_HOME']).st_dev: + self.assertTrue(os.path.exists(os.path.join(os.environ['XDG_DATA_HOME'], + 'Trash/files/hello_gvfs_tests.txt'))) + else: + self.assertTrue(os.path.exists('/tmp/.Trash-%i/files/hello_gvfs_tests.txt' + % os.getuid())) else: # file should still be there self.assertTrue(os.path.exists(self.my_file)) |