コード例 #1
0
  def testWaterfallLayout(self):
    """Make sure that watefall_layout_dump.txt is kept current."""
    with self.OutputCapturer() as output:
      cros_show_waterfall_layout.main(['--format', 'text'])

    new_dump = output.GetStdout()
    old_dump = osutils.ReadFile(constants.WATERFALL_CONFIG_FILE)

    self.assertTrue(
        new_dump == old_dump, 'waterfall_layout_dump.txt does not match the '
        'configs defined in chromeos_config.py. Run '
        'bin/cros_show_waterfall_layout > cbuildbot/waterfall_layout_dump.txt')
コード例 #2
0
 def testTextDump(self):
     """Make sure text dumping is capable of being produced."""
     with self.OutputCapturer() as output:
         cros_show_waterfall_layout.main(['--format', 'text'])
     self.assertFalse(not output.GetStdout())
コード例 #3
0
 def testJSONDumpLoadable(self):
     """Make sure config export functionality works."""
     with self.OutputCapturer() as output:
         cros_show_waterfall_layout.main(['--format', 'json'])
         layout = json.loads(output.GetStdout())
     self.assertFalse(not layout)
コード例 #4
0
 def testTextDump(self):
   """Make sure text dumping is capable of being produced."""
   with self.OutputCapturer() as output:
     cros_show_waterfall_layout.main(['--format', 'text'])
   self.assertFalse(not output.GetStdout())
コード例 #5
0
 def testJSONDumpLoadable(self):
   """Make sure config export functionality works."""
   with self.OutputCapturer() as output:
     cros_show_waterfall_layout.main(['--format', 'json'])
     layout = json.loads(output.GetStdout())
   self.assertFalse(not layout)