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)
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')
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')
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')
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')
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')