Skip to content

Commit e338a8c

Browse files
chronos: remove more unused code
Signed-off-by: David Korczynski <david@adalogics.com>
1 parent 14f6e46 commit e338a8c

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

infra/experimental/chronos/manager.py

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -21,46 +21,11 @@
2121
import json
2222
import subprocess
2323

24-
import requests
25-
2624
import bad_patch
2725
import logic_error_patch
2826

2927
logger = logging.getLogger(__name__)
3028

31-
OSS_FUZZ_BUILD_HISTORY_URL = (
32-
'https://oss-fuzz-build-logs.storage.googleapis.com/status.json')
33-
OSS_FUZZ_BUILD_HISTORY = []
34-
35-
RUN_TEST_HEURISTIC_0 = 'make test'
36-
RUN_TEST_HEURISTIC_1 = 'make tests'
37-
RUN_TEST_HEURISTIC_2 = 'make check'
38-
39-
RUN_TESTS_TO_TRY = [
40-
RUN_TEST_HEURISTIC_0, RUN_TEST_HEURISTIC_1, RUN_TEST_HEURISTIC_2
41-
]
42-
43-
44-
def _get_oss_fuzz_build_status(project):
45-
"""Returns the build status of a project in OSS-Fuzz."""
46-
if not OSS_FUZZ_BUILD_HISTORY:
47-
# Load the build history from a file or other source.
48-
# This is a placeholder for actual implementation.
49-
build_status = requests.get(OSS_FUZZ_BUILD_HISTORY_URL, timeout=30)
50-
OSS_FUZZ_BUILD_HISTORY.extend(
51-
json.loads(build_status.text).get('projects', []))
52-
53-
for project_data in OSS_FUZZ_BUILD_HISTORY:
54-
if project_data['name'] == project:
55-
logger.info('Found project %s in OSS-Fuzz build history.', project)
56-
return project_data.get('history', [{
57-
'success': False
58-
}])[0].get('success', False)
59-
60-
logger.info('Project %s not found in OSS-Fuzz build history.', project)
61-
return False
62-
63-
6429
def _get_project_cached_named(project, sanitizer='address'):
6530
"""Gets the name of the cached project image."""
6631
return f'us-central1-docker.pkg.dev/oss-fuzz/oss-fuzz-gen/{project}-ofg-cached-{sanitizer}'
@@ -394,25 +359,6 @@ def check_run_tests_script(project,
394359
'Error: %s run_test.sh does alter files or directories content.',
395360
project)
396361

397-
398-
def _get_project_language(project):
399-
"""Returns the language of the project."""
400-
project_path = os.path.join('projects', project)
401-
if not os.path.isdir(project_path):
402-
return ''
403-
404-
# Check for a .lang file or similar to determine the language
405-
project_yaml = os.path.join(project_path, 'project.yaml')
406-
if os.path.exists(project_yaml):
407-
with open(project_yaml, 'r', encoding='utf-8') as f:
408-
for line in f:
409-
if 'language' in line:
410-
return line.split(':')[1].strip()
411-
412-
# Default to C++ if no specific language file is found
413-
return ''
414-
415-
416362
def extract_test_coverage(project):
417363
"""Extract code coverage report from run_tests.sh script."""
418364
build_project_image(project)

0 commit comments

Comments
 (0)