コード例 #1
0
    def test_default(self):
        """Tests when the build is not specified."""
        result = reproduce.get_definition('linux_asan_d8', '123', '')
        self.assertEqual(result, self.v8_definition)

        result = reproduce.get_definition('libfuzzer_chrome_msan', '123', '')
        self.assertEqual(result, self.chromium_definition)
コード例 #2
0
  def test_standalone(self):
    """Tests when the build is standalone."""
    result = reproduce.get_definition('linux_asan_d8', '123', 'standalone')
    self.assertEqual(result, self.v8_definition)

    with self.assertRaises(error.JobTypeNotSupportedError):
      result = reproduce.get_definition('fuzzlibber_nasm', '123', 'standalone')
コード例 #3
0
  def test_chromium(self):
    """Tests when the build is chromium."""
    result = reproduce.get_definition(
        'libfuzzer_chrome_msan', '123', 'chromium')
    self.assertEqual(result, self.chromium_definition)

    with self.assertRaises(error.JobTypeNotSupportedError):
      result = reproduce.get_definition('fuzzlibber_nasm', '123', 'chromium')
コード例 #4
0
    def test_build_param(self):
        """Tests when build_param is an option that requires building."""

        result = reproduce.get_definition('libfuzzer_chrome_msan', 'chromium')
        self.assertEqual(result.builder, binary_providers.ChromiumBuilder)

        with self.assertRaises(error.JobTypeNotSupportedError):
            result = reproduce.get_definition('fuzzlibber_nasm', 'chromium')
コード例 #5
0
    def test_download_param(self):
        """Tests when the build_param is download"""

        result = reproduce.get_definition('libfuzzer_chrome_msan', 'download')
        self.assertEqual(result.builder, binary_providers.ChromiumBuilder)

        with self.assertRaises(error.JobTypeNotSupportedError):
            result = reproduce.get_definition('fuzzlibber_nasm', 'download')
コード例 #6
0
    def test_download_param(self):
        """Tests when the build_param is download"""
        result = reproduce.get_definition('libfuzzer_chrome_msan', '123',
                                          'download')
        self.assertEqual(result, self.chromium_definition)

        result = reproduce.get_definition('linux_asan_d8', '123', 'download')
        self.assertEqual(result, self.v8_definition)

        with self.assertRaises(error.JobTypeNotSupportedError):
            result = reproduce.get_definition('fuzzlibber_nasm', '123',
                                              'download')