lint: clippy integration test in the normal place

There's no reason to run this in a VM.

Remove the now unused build-only xtask commands.
reviewable/pr644/r1
Tamir Duberstein 2 years ago
parent 8d6b0f90bb
commit 526ab1ea33
No known key found for this signature in database

@ -26,13 +26,10 @@ jobs:
components: rustfmt, clippy, miri, rust-src
- name: Check formatting
run: |
cargo fmt --all -- --check
run: cargo fmt --all -- --check
- name: Run clippy
run: |
cargo clippy --workspace --exclude integration-test -- --deny warnings
run: cargo clippy --workspace -- --deny warnings
- name: Run miri
run: |
cargo miri test --all-targets
run: cargo miri test --all-targets

@ -249,9 +249,6 @@ exec_vm "rm -rf aya/* libbpf"
rsync_vm "--exclude=target --exclude=.tmp $AYA_SOURCE_DIR"
rsync_vm "$LIBBPF_DIR"
# need to build or linting will fail trying to include object files
exec_vm "cd aya; cargo xtask build-integration-test --libbpf-dir ~/libbpf"
exec_vm "cd aya; cargo clippy -p integration-test -- --deny warnings"
exec_vm "cd aya; cargo xtask integration-test --libbpf-dir ~/libbpf"
# we rm and sync but it doesn't seem to work reliably - I guess we could sleep a

@ -1,32 +0,0 @@
use anyhow::Result;
use clap::Parser;
use std::process::Command;
use crate::{build_ebpf, utils::exec};
#[derive(Parser)]
pub struct Options {
/// Target triple for which the code is compiled
#[clap(long)]
pub musl_target: Option<String>,
#[clap(flatten)]
pub ebpf_options: build_ebpf::BuildEbpfOptions,
}
pub fn build_test(opts: Options) -> Result<()> {
let Options {
musl_target,
ebpf_options,
} = opts;
build_ebpf::build_ebpf(ebpf_options)?;
let mut cmd = Command::new("cargo");
cmd.args(["build", "-p", "integration-test"]);
if let Some(target) = musl_target {
cmd.args(["--target", &target]);
}
exec(&mut cmd)
}

@ -1,5 +1,4 @@
mod build_ebpf;
mod build_test;
mod codegen;
mod docs;
mod run;
@ -18,8 +17,6 @@ pub struct XtaskOptions {
enum Command {
Codegen(codegen::Options),
Docs,
BuildIntegrationTest(build_test::Options),
BuildIntegrationTestEbpf(build_ebpf::BuildEbpfOptions),
IntegrationTest(run::Options),
}
@ -29,8 +26,6 @@ fn main() {
let ret = match command {
Command::Codegen(opts) => codegen::codegen(opts),
Command::Docs => docs::docs(),
Command::BuildIntegrationTest(opts) => build_test::build_test(opts),
Command::BuildIntegrationTestEbpf(opts) => build_ebpf::build_ebpf(opts),
Command::IntegrationTest(opts) => run::run(opts),
};

Loading…
Cancel
Save