X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Fatomicity.py;h=1ca52b9c4f73aad5966e44e3dff8505b1d9e348f;hp=01a420512af11ea4b57345ec27a3cbc1a7e1ac6c;hb=1db3244bf1b271633976cb74952367e530d27d3d;hpb=776684c7b6804388088cd787f7d5faff7cfbe4c2 diff --git a/test/atomicity.py b/test/atomicity.py index 01a42051..1ca52b9c 100644 --- a/test/atomicity.py +++ b/test/atomicity.py @@ -29,16 +29,19 @@ class RenameBreakpoint(gdb.Breakpoint): self.n = 0 def stop(self): - # As an optimization, only consider snapshots after a Xapian - # has really committed. Xapian overwrites record.base? as the - # last step in the commit, so keep an eye on their inumbers. - inodes = {} - for path in glob.glob('%s/.notmuch/xapian/record.base*' % maildir): - inodes[path] = os.stat(path).st_ino - if inodes == self.last_inodes: - # Continue - return False - self.last_inodes = inodes + xapiandir = '%s/.notmuch/xapian' % maildir + if os.path.isfile('%s/iamchert' % xapiandir): + # As an optimization, only consider snapshots after a + # Xapian has really committed. The chert backend + # overwrites record.base? as the last step in the commit, + # so keep an eye on their inumbers. + inodes = {} + for path in glob.glob('%s/record.base*' % xapiandir): + inodes[path] = os.stat(path).st_ino + if inodes == self.last_inodes: + # Continue + return False + self.last_inodes = inodes # Save a backtrace in case the test does fail backtrace = gdb.execute('backtrace', to_string=True)