1#
2# Copyright (C) 2017 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17
18class ExitCode(object):
19    """Exit codes for test binaries."""
20    FUZZER_TEST_PASS = 0
21    # Default failure error code in LLVM libfuzzer.
22    FUZZER_TEST_FAIL = 77
23
24# Directory on the target where the tests are copied.
25FUZZER_TEST_DIR = "/data/local/tmp/libfuzzer_test"
26
27# Directory on the target where VTS specs are copied.
28FUZZER_SPEC_DIR = "/data/local/tmp/spec"
29
30# Directory under data_file_path on the host where fuzzer executables are.
31FUZZER_BIN_DIR = "DATA/bin"
32
33# File used to save crash-causing fuzzer input.
34FUZZER_TEST_CRASH_REPORT = FUZZER_TEST_DIR + "/crash_report"
35
36# Default parameters that will be passed to fuzzer executable.
37FUZZER_DEFAULT_PARAMS = {
38    "max_len": 100,
39    "max_total_time": 60,
40    "exact_artifact_path": FUZZER_TEST_CRASH_REPORT,
41    "timeout": 120,
42}
43