Deprecate old dev tooling scripts

All of the developer tooling has moved to ./tools to make them
easier to discover.

BUG=None
TEST=None

Change-Id: I4daf6a0ca08c94a0c35ce8bc52f9d86e4cb15de9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3251781
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
Dennis Kempin 2021-10-28 11:18:39 -07:00 committed by Commit Bot
parent 57e4f542a2
commit ccb9014afb
7 changed files with 41 additions and 122 deletions

View file

@ -1 +0,0 @@
../tools/clippy

5
bin/clippy Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
echo "./bin/clippy is deprecated. Please use: ./tools/clippy"

View file

@ -1 +0,0 @@
../tools/fmt

5
bin/fmt Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
echo "./bin/fmt is deprecated. Please use: ./tools/fmt"

View file

@ -4,9 +4,8 @@ crosvm is included in the ChromeOS source tree at `src/platform/crosvm`. Crosvm
can be built with ChromeOS features using Portage or cargo.
If ChromeOS-specific features are not needed, or you want to run the full test
suite of crosvm, the [Building for Linux](#building-for-linux) and
[Running crosvm tests](#running-crosvm-tests) workflows can be used from the
crosvm repository of ChromeOS as well.
suite of crosvm, the [Building for Linux](#building-for-linux) workflows can be
used from the crosvm repository of ChromeOS as well.
## Using Portage
@ -29,4 +28,4 @@ Portage.
Since development using portage can be slow, it's possible to build crosvm for
ChromeOS using cargo for faster iteration times. To do so, the `Cargo.toml` file
needs to be updated to point to dependencies provided by ChromeOS using
`./setup_cros_cargo.sh`.
`./tools/chromeos/setup_cargo`.

View file

@ -1,93 +1,5 @@
#!/usr/bin/env python3
#!/bin/bash
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Runs tests for crosvm.
#
# See `ci/README.md` or `./run_tests -h` for more details.
from typing import List, Dict
from ci.test_runner import Requirements, main
# A list of all crates and their requirements
# See ci/test_runner.py for documentation on the requirements
CRATE_REQUIREMENTS: Dict[str, List[Requirements]] = {
"aarch64": [Requirements.AARCH64],
"acpi_tables": [],
"arch": [],
"assertions": [],
"base": [],
"bit_field": [],
"bit_field_derive": [],
"common/cros-fuzz": [Requirements.SEPARATE_WORKSPACE],
"common/p9": [Requirements.SEPARATE_WORKSPACE, Requirements.X86_64],
"cros_async": [Requirements.DISABLED],
"crosvm": [Requirements.DO_NOT_RUN],
"crosvm_plugin": [Requirements.X86_64],
"data_model": [],
"devices": [
Requirements.SINGLE_THREADED,
Requirements.PRIVILEGED,
Requirements.X86_64,
],
"disk": [Requirements.PRIVILEGED],
"enumn": [],
"fuse": [],
"fuzz": [Requirements.DISABLED],
"gpu_display": [],
"hypervisor": [Requirements.PRIVILEGED, Requirements.X86_64],
"integration_tests": [Requirements.DISABLED], # b/202196400
"io_uring": [
Requirements.SEPARATE_WORKSPACE,
Requirements.PRIVILEGED,
Requirements.SINGLE_THREADED,
],
"kernel_cmdline": [],
"kernel_loader": [Requirements.PRIVILEGED],
"kvm_sys": [Requirements.PRIVILEGED],
"kvm": [Requirements.PRIVILEGED, Requirements.X86_64],
"libcrosvm_control": [],
"linux_input_sys": [],
"net_sys": [],
"net_util": [Requirements.PRIVILEGED],
"power_monitor": [],
"protos": [],
"qcow_utils": [],
"resources": [],
"rutabaga_gfx": [Requirements.PRIVILEGED],
"sync": [],
"sys_util": [Requirements.SINGLE_THREADED, Requirements.PRIVILEGED],
"poll_token_derive": [],
"tpm2-sys": [],
"tpm2": [],
"usb_sys": [],
"usb_util": [],
"vfio_sys": [],
"vhost": [Requirements.PRIVILEGED],
"virtio_sys": [],
"vm_control": [],
"vm_memory": [Requirements.PRIVILEGED],
"x86_64": [Requirements.X86_64, Requirements.PRIVILEGED],
}
# Just like for crates, lists requirements for each cargo feature flag.
FEATURE_REQUIREMENTS: Dict[str, List[Requirements]] = {
"chromeos": [Requirements.DISABLED],
"audio": [],
"gpu": [],
"plugin": [Requirements.PRIVILEGED, Requirements.X86_64],
"power-monitor-powerd": [Requirements.DISABLED],
"tpm": [],
"video-decoder": [Requirements.DISABLED],
"video-encoder": [Requirements.DISABLED],
"wl-dmabuf": [Requirements.DISABLED],
"x": [],
"virgl_renderer_next": [],
"composite-disk": [],
"virgl_renderer": [],
"gfxstream": [Requirements.DISABLED],
"gdb": [],
}
main(CRATE_REQUIREMENTS, FEATURE_REQUIREMENTS)
echo "./run_tests is deprecated. Please run ./tools/run_tests"

View file

@ -1,24 +1,6 @@
#!/usr/bin/env bash
#!/bin/bash
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# To build crosvm using cargo against libraries and crates provided by ChromeOS
# use this script to update path references in Cargo.toml.
#
# TODO(b/194323235): Add documentation for ChromeOS developer workflows.
declare -A replacements=(
["libcras_stub"]="../../third_party/adhd/cras/client/libcras"
["system_api_stub"]="../../platform2/system_api"
["third_party/minijail"]="../../aosp/external/minijail"
["third_party/vmm_vhost"]="../../third_party/rust-vmm/vhost"
)
for crate in "${!replacements[@]}"; do
echo "Replacing '${crate}' with '${replacements[$crate]}'"
sed -i "s|path = \"${crate}|path = \"${replacements[$crate]}|g" \
Cargo.toml
done
echo "Modified Cargo.toml with new paths. Please do not commit those."
echo "./setup_cros_cargo.sh is deprecated. " \
"Please use: ./tools/chromeos/setup_cargo"

View file

@ -2,8 +2,4 @@
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Runs tests for both x86 and aarch64.
time ./ci/builder "$@" --vm ./run_tests &&
time ./ci/aarch64_builder "$@" --vm ./run_tests
echo "./test_all is deprecated. Please run ./tools/presubmit --quick"

22
tools/chromeos/setup_cargo Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# To build crosvm using cargo against libraries and crates provided by ChromeOS
# use this script to update path references in Cargo.toml.
declare -A replacements=(
["libcras_stub"]="../../third_party/adhd/cras/client/libcras"
["system_api_stub"]="../../platform2/system_api"
["third_party/minijail"]="../../aosp/external/minijail"
["third_party/vmm_vhost"]="../../third_party/rust-vmm/vhost"
)
for crate in "${!replacements[@]}"; do
echo "Replacing '${crate}' with '${replacements[$crate]}'"
sed -i "s|path = \"${crate}|path = \"${replacements[$crate]}|g" \
Cargo.toml
done
echo "Modified Cargo.toml with new paths. Please do not commit those."