Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/firecracker
Path: blob/main/tests/framework/defs.py
1956 views
1
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
# SPDX-License-Identifier: Apache-2.0
3
"""Some common defines used in different modules of the testing framework."""
4
5
from pathlib import Path
6
7
# URL prefix used for the API calls through a UNIX domain socket
8
API_USOCKET_URL_PREFIX = 'http+unix://'
9
10
# Firecracker's binary name
11
FC_BINARY_NAME = 'firecracker'
12
13
# Jailer's binary name
14
JAILER_BINARY_NAME = 'jailer'
15
16
# The Firecracker sources workspace dir
17
FC_WORKSPACE_DIR = Path(__file__).parent.parent.parent.resolve()
18
19
# Cargo target dir for the Firecracker workspace. Set via .cargo/config
20
FC_WORKSPACE_TARGET_DIR = FC_WORKSPACE_DIR / "build/cargo_target"
21
22
# Cargo build directory for seccompiler
23
SECCOMPILER_TARGET_DIR = FC_WORKSPACE_DIR / "build/seccompiler"
24
25
# Folder containing JSON seccomp filters
26
SECCOMP_JSON_DIR = FC_WORKSPACE_DIR / "resources/seccomp"
27
28
# Maximum accepted duration of an API call, in milliseconds
29
MAX_API_CALL_DURATION_MS = 300
30
31
# Relative path to the location of the kernel file
32
MICROVM_KERNEL_RELPATH = 'kernel/'
33
34
# Relative path to the location of the filesystems
35
MICROVM_FSFILES_RELPATH = 'fsfiles/'
36
37
# The s3 bucket that holds global Firecracker specifications
38
SPEC_S3_BUCKET = 'spec.ccfc.min'
39
40
# The default s3 bucket that holds Firecracker microvm test images
41
DEFAULT_TEST_IMAGES_S3_BUCKET = 'spec.ccfc.min'
42
43
# Global directory for any of the pytest tests temporary files
44
ENV_TEST_IMAGES_S3_BUCKET = 'TEST_MICROVM_IMAGES_S3_BUCKET'
45
46
# Default test session root directory path
47
DEFAULT_TEST_SESSION_ROOT_PATH = "/srv"
48
49
# Absolute path to the test results folder
50
TEST_RESULTS_DIR = FC_WORKSPACE_DIR / "test_results"
51
52
# Name of the file that stores firecracker's PID when launched by jailer with
53
# `--new-pid-ns`.
54
FC_PID_FILE_NAME = "firecracker.pid"
55
56