aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-01-29 12:53:56 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2017-01-29 19:05:59 +0200
commit66fbcde96e4dd3782d5289b4faf2479335bdf7b1 (patch)
tree159c8196341fd9cadd665afd8036e7067a4f2692 /run_unittests.py
parentc63b92f8efaf226c2431a057a822bf00e0bf3189 (diff)
downloadmeson-66fbcde96e4dd3782d5289b4faf2479335bdf7b1.zip
meson-66fbcde96e4dd3782d5289b4faf2479335bdf7b1.tar.gz
meson-66fbcde96e4dd3782d5289b4faf2479335bdf7b1.tar.bz2
Cope with files created with a different umask.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 81bcd47..a1d99f3 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -675,10 +675,12 @@ class LinuxlikeTests(unittest.TestCase):
f = os.path.join(self.installdir, 'usr', 'share', 'progname',
'fileobject_datafile.dat')
+ orig = os.path.join(testdir, 'fileobject_datafile.dat')
statf = os.stat(f)
+ statorig = os.stat(orig)
found_mode = stat.filemode(statf.st_mode)
- want_mode = 'rw-rw-r--'
- self.assertEqual(want_mode, found_mode[1:])
+ orig_mode = stat.filemode(statorig.st_mode)
+ self.assertEqual(orig_mode[1:], found_mode[1:])
self.assertEqual(os.getuid(), statf.st_uid)
if os.getuid() == 0:
# The chown failed nonfatally if we're not root