Commit 171fb3b9 authored by Michael Achenbach's avatar Michael Achenbach Committed by V8 LUCI CQ

[clusterfuzz] Split directory structure

After https://crrev.com/c/3416191 there are too many mixed concerns in
the clusterfuzz directory. We split it into js-fuzzer, foozzie and
trials.

Change-Id: I9a21ee83985e6113d77acba4583e99df88723c60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3443505
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarAlmothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78981}
parent 7b19d05b
...@@ -5931,7 +5931,7 @@ group("v8_clusterfuzz") { ...@@ -5931,7 +5931,7 @@ group("v8_clusterfuzz") {
deps = [ deps = [
":d8", ":d8",
":v8_simple_inspector_fuzzer", ":v8_simple_inspector_fuzzer",
"tools/clusterfuzz:v8_clusterfuzz_resources", "tools/clusterfuzz/trials:v8_clusterfuzz_resources",
] ]
if (v8_multi_arch_build) { if (v8_multi_arch_build) {
...@@ -5940,7 +5940,7 @@ group("v8_clusterfuzz") { ...@@ -5940,7 +5940,7 @@ group("v8_clusterfuzz") {
":d8(//build/toolchain/linux:clang_x64_v8_arm64)", ":d8(//build/toolchain/linux:clang_x64_v8_arm64)",
":d8(//build/toolchain/linux:clang_x86)", ":d8(//build/toolchain/linux:clang_x86)",
":d8(//build/toolchain/linux:clang_x86_v8_arm)", ":d8(//build/toolchain/linux:clang_x86_v8_arm)",
":d8(tools/clusterfuzz/toolchain:clang_x64_pointer_compression)", ":d8(tools/clusterfuzz/foozzie/toolchain:clang_x64_pointer_compression)",
] ]
} }
} }
...@@ -6156,7 +6156,7 @@ v8_executable("d8") { ...@@ -6156,7 +6156,7 @@ v8_executable("d8") {
} }
if (v8_correctness_fuzzer) { if (v8_correctness_fuzzer) {
deps += [ "tools/clusterfuzz:v8_correctness_fuzzer_resources" ] deps += [ "tools/clusterfuzz/foozzie:v8_correctness_fuzzer_resources" ]
} }
defines = [] defines = []
......
...@@ -13,9 +13,9 @@ group("v8_mjsunit") { ...@@ -13,9 +13,9 @@ group("v8_mjsunit") {
data = [ data = [
"./", "./",
"../../tools/arguments.mjs", "../../tools/arguments.mjs",
"../../tools/clusterfuzz/v8_mock.js", "../../tools/clusterfuzz/foozzie/v8_mock.js",
"../../tools/clusterfuzz/v8_mock_archs.js", "../../tools/clusterfuzz/foozzie/v8_mock_archs.js",
"../../tools/clusterfuzz/v8_mock_webassembly.js", "../../tools/clusterfuzz/foozzie/v8_mock_webassembly.js",
"../../tools/codemap.mjs", "../../tools/codemap.mjs",
"../../tools/sourcemap.mjs", "../../tools/sourcemap.mjs",
"../../tools/consarray.mjs", "../../tools/consarray.mjs",
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --allow-natives-syntax --correctness-fuzzer-suppressions // Flags: --allow-natives-syntax --correctness-fuzzer-suppressions
// Files: tools/clusterfuzz/v8_mock.js // Files: tools/clusterfuzz/foozzie/v8_mock.js
// Test foozzie mocks for differential fuzzing. // Test foozzie mocks for differential fuzzing.
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --allow-natives-syntax // Flags: --allow-natives-syntax
// Files: tools/clusterfuzz/v8_mock.js // Files: tools/clusterfuzz/foozzie/v8_mock.js
// Files: tools/clusterfuzz/v8_mock_archs.js // Files: tools/clusterfuzz/foozzie/v8_mock_archs.js
// Test foozzie architecture-specific mocks for differential fuzzing. // Test foozzie architecture-specific mocks for differential fuzzing.
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --allow-natives-syntax // Flags: --allow-natives-syntax
// Files: tools/clusterfuzz/v8_mock.js // Files: tools/clusterfuzz/foozzie/v8_mock.js
// Files: tools/clusterfuzz/v8_mock_webassembly.js // Files: tools/clusterfuzz/foozzie/v8_mock_webassembly.js
// Test foozzie webassembly-specfific mocks for differential fuzzing. // Test foozzie webassembly-specfific mocks for differential fuzzing.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("../../gni/v8.gni") import("../../../gni/v8.gni")
if (v8_correctness_fuzzer) { if (v8_correctness_fuzzer) {
copy("v8_correctness_fuzzer_resources") { copy("v8_correctness_fuzzer_resources") {
...@@ -23,8 +23,3 @@ if (v8_correctness_fuzzer) { ...@@ -23,8 +23,3 @@ if (v8_correctness_fuzzer) {
outputs = [ "$root_out_dir/{{source_file_part}}" ] outputs = [ "$root_out_dir/{{source_file_part}}" ]
} }
} }
copy("v8_clusterfuzz_resources") {
sources = [ "clusterfuzz_trials_config.json" ]
outputs = [ "$root_out_dir/{{source_file_part}}" ]
}
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
def _RunTests(input_api, output_api):
return input_api.RunTests(input_api.canned_checks.GetUnitTestsInDirectory(
input_api, output_api, '.', files_to_check=['v8_foozzie_test.py$']))
def _CommonChecks(input_api, output_api):
"""Checks common to both upload and commit."""
checks = [
_RunTests,
]
return sum([check(input_api, output_api) for check in checks], [])
def CheckChangeOnCommit(input_api, output_api):
return _CommonChecks(input_api, output_api)
def CheckChangeOnUpload(input_api, output_api):
return _CommonChecks(input_api, output_api)
# Copyright 2022 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
copy("v8_clusterfuzz_resources") {
sources = [ "clusterfuzz_trials_config.json" ]
outputs = [ "$root_out_dir/{{source_file_part}}" ]
}
# Copyright 2018 the V8 project authors. All rights reserved. # Copyright 2022 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -39,25 +39,16 @@ def _CheckTrialsConfig(input_api, output_api): ...@@ -39,25 +39,16 @@ def _CheckTrialsConfig(input_api, output_api):
return [output_api.PresubmitError(r) for r in results] return [output_api.PresubmitError(r) for r in results]
def _RunTests(input_api, output_api):
return input_api.RunTests(input_api.canned_checks.GetUnitTestsInDirectory(
input_api, output_api, '.', files_to_check=['v8_foozzie_test.py$']))
def _CommonChecks(input_api, output_api): def _CommonChecks(input_api, output_api):
"""Checks common to both upload and commit.""" """Checks common to both upload and commit."""
checks = [ checks = [
_CheckTrialsConfig, _CheckTrialsConfig,
_RunTests,
] ]
return sum([check(input_api, output_api) for check in checks], []) return sum([check(input_api, output_api) for check in checks], [])
def CheckChangeOnCommit(input_api, output_api): def CheckChangeOnCommit(input_api, output_api):
results = [] return _CommonChecks(input_api, output_api)
results.extend(_CommonChecks(input_api, output_api))
return results
def CheckChangeOnUpload(input_api, output_api): def CheckChangeOnUpload(input_api, output_api):
results = [] return _CommonChecks(input_api, output_api)
results.extend(_CommonChecks(input_api, output_api))
return results
...@@ -741,7 +741,7 @@ def CheckDeps(workspace): ...@@ -741,7 +741,7 @@ def CheckDeps(workspace):
def PyTests(workspace): def PyTests(workspace):
result = True result = True
for script in [ for script in [
join(workspace, 'tools', 'clusterfuzz', 'v8_foozzie_test.py'), join(workspace, 'tools', 'clusterfuzz', 'foozzie', 'v8_foozzie_test.py'),
join(workspace, 'tools', 'release', 'test_scripts.py'), join(workspace, 'tools', 'release', 'test_scripts.py'),
join(workspace, 'tools', 'unittests', 'run_tests_test.py'), join(workspace, 'tools', 'unittests', 'run_tests_test.py'),
join(workspace, 'tools', 'unittests', 'run_perf_test.py'), join(workspace, 'tools', 'unittests', 'run_perf_test.py'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment