Skip to content

Commit

Permalink
tests: Temporarily disable journal flight recorder
Browse files Browse the repository at this point in the history
The flight recorder should save entries in journal that occured
when running the tests but currently the code saves the entire
journal for every test case making the log around 500 MiB for
every test suite run. Until we can figure out what's happening we
need to disable this to protect our Jenkins from running out of
space.
  • Loading branch information
vojtechtrefny committed Jun 7, 2024
1 parent f39573f commit 3541d96
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/tests/dbus-tests/udiskstestcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,22 +271,22 @@ def tearDownClass(self):
self.bus.call_async = self._orig_call_async
self.bus.call_blocking = self._orig_call_blocking

def run(self, *args):
record = []
now = datetime.now()
now_mono = monotonic()
with open(FLIGHT_RECORD_FILE, "a") as record_f:
record_f.write("================%s[%0.8f] %s.%s.%s================\n" % (now.strftime('%Y-%m-%d %H:%M:%S'),
now_mono,
self.__class__.__module__,
self.__class__.__name__,
self._testMethodName))
with JournalRecorder("journal", record):
with CmdFlightRecorder("udisksctl monitor", ["udisksctl", "monitor"], record):
with CmdFlightRecorder("udevadm monitor", ["udevadm", "monitor"], record):
super(UdisksTestCase, self).run(*args)
record_f.write("".join(record))
self.udev_settle()
# def run(self, *args):
# record = []
# now = datetime.now()
# now_mono = monotonic()
# with open(FLIGHT_RECORD_FILE, "a") as record_f:
# record_f.write("================%s[%0.8f] %s.%s.%s================\n" % (now.strftime('%Y-%m-%d %H:%M:%S'),
# now_mono,
# self.__class__.__module__,
# self.__class__.__name__,
# self._testMethodName))
# with JournalRecorder("journal", record):
# with CmdFlightRecorder("udisksctl monitor", ["udisksctl", "monitor"], record):
# with CmdFlightRecorder("udevadm monitor", ["udevadm", "monitor"], record):
# super(UdisksTestCase, self).run(*args)
# record_f.write("".join(record))
# self.udev_settle()

@classmethod
def get_object(self, path_suffix):
Expand Down

0 comments on commit 3541d96

Please sign in to comment.