mirror of https://github.com/google/oss-fuzz.git
Prepare for JavaScript fuzzing (#8325)
Prepare for JavaScript fuzzing Related: #8324
This commit is contained in:
parent
a335a00b84
commit
bbbbad5c07
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
FROM gcr.io/oss-fuzz-base/base-builder
|
||||
|
||||
RUN install_javascript.sh
|
|
@ -140,6 +140,7 @@ COPY cargo compile compile_afl compile_libfuzzer compile_honggfuzz \
|
|||
# Go, java, and swift installation scripts.
|
||||
install_go.sh \
|
||||
install_go_CodeIntelligenceTesting.sh \
|
||||
install_javascript.sh \
|
||||
install_java.sh \
|
||||
install_python.sh \
|
||||
install_rust.sh \
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash -eux
|
||||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
################################################################################
|
|
@ -27,6 +27,7 @@ BASE_IMAGES = [
|
|||
'base-builder',
|
||||
'base-builder-go',
|
||||
'base-builder-go-codeintelligencetesting',
|
||||
'base-builder-javascript',
|
||||
'base-builder-jvm',
|
||||
'base-builder-python',
|
||||
'base-builder-rust',
|
||||
|
|
|
@ -160,6 +160,7 @@ def build_and_push_images(test_image_suffix):
|
|||
[
|
||||
'base-runner-debug',
|
||||
'base-builder-go',
|
||||
'base-builder-javascript',
|
||||
'base-builder-jvm',
|
||||
'base-builder-python',
|
||||
'base-builder-rust',
|
||||
|
|
|
@ -299,6 +299,7 @@ def get_pull_test_images_steps(test_image_suffix):
|
|||
images = [
|
||||
'gcr.io/oss-fuzz-base/base-builder',
|
||||
'gcr.io/oss-fuzz-base/base-builder-swift',
|
||||
'gcr.io/oss-fuzz-base/base-builder-javascript',
|
||||
'gcr.io/oss-fuzz-base/base-builder-jvm',
|
||||
'gcr.io/oss-fuzz-base/base-builder-go',
|
||||
'gcr.io/oss-fuzz-base/base-builder-python',
|
||||
|
|
|
@ -42,6 +42,22 @@
|
|||
"gcr.io/oss-fuzz-base/base-builder-swift"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "gcr.io/cloud-builders/docker",
|
||||
"args": [
|
||||
"pull",
|
||||
"gcr.io/oss-fuzz-base/base-builder-javascript-testing-mybranch"
|
||||
],
|
||||
"waitFor": "-"
|
||||
},
|
||||
{
|
||||
"name": "gcr.io/cloud-builders/docker",
|
||||
"args": [
|
||||
"tag",
|
||||
"gcr.io/oss-fuzz-base/base-builder-javascript-testing-mybranch",
|
||||
"gcr.io/oss-fuzz-base/base-builder-javascript"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "gcr.io/cloud-builders/docker",
|
||||
"args": [
|
||||
|
|
|
@ -83,5 +83,8 @@ class TrialBuildMainTest(unittest.TestCase):
|
|||
with open(expected_build_steps_path, 'r') as file_handle:
|
||||
expected_build_steps = json.load(file_handle)
|
||||
|
||||
# Snippet for updating this:
|
||||
# f=open('/tmp/a', 'w')
|
||||
# json.dump(mock_run_build.call_args_list[0][0][1], f); f.close()
|
||||
self.assertEqual(mock_run_build.call_args_list[0][0][1],
|
||||
expected_build_steps)
|
||||
|
|
|
@ -234,6 +234,7 @@ def build_base_images():
|
|||
'base-builder',
|
||||
'base-builder-go',
|
||||
'base-builder-go-codeintelligencetesting',
|
||||
'base-builder-javascript',
|
||||
'base-builder-jvm',
|
||||
'base-builder-python',
|
||||
'base-builder-rust',
|
||||
|
|
|
@ -37,6 +37,7 @@ def delete_unneeded_docker_images(config):
|
|||
project_image,
|
||||
docker.BASE_BUILDER_TAG,
|
||||
docker.BASE_BUILDER_TAG + '-go',
|
||||
docker.BASE_BUILDER_TAG + '-javascript',
|
||||
docker.BASE_BUILDER_TAG + '-jvm',
|
||||
docker.BASE_BUILDER_TAG + '-python',
|
||||
docker.BASE_BUILDER_TAG + '-rust',
|
||||
|
|
|
@ -25,6 +25,7 @@ LANGUAGES = [
|
|||
'c',
|
||||
'c++',
|
||||
'go',
|
||||
'javascript',
|
||||
'jvm',
|
||||
'python',
|
||||
'rust',
|
||||
|
|
|
@ -46,6 +46,7 @@ BASE_IMAGES = {
|
|||
'gcr.io/oss-fuzz-base/base-runner-debug',
|
||||
],
|
||||
'go': ['gcr.io/oss-fuzz-base/base-builder-go'],
|
||||
'javascript': ['gcr.io/oss-fuzz-base/base-builder-javascript'],
|
||||
'jvm': ['gcr.io/oss-fuzz-base/base-builder-jvm'],
|
||||
'python': ['gcr.io/oss-fuzz-base/base-builder-python'],
|
||||
'rust': ['gcr.io/oss-fuzz-base/base-builder-rust'],
|
||||
|
|
Loading…
Reference in New Issue