Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
# Dockerfile for flawd mutation testing - Rust
FROM rust:1.77-slim

RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y git curl ca-certificates && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# flawd.toml's [coverage] command runs `cargo llvm-cov`, which shells out to
# llvm-cov and llvm-profdata. The llvm-tools component supplies both, so the
# command needs no LLVM_COV/LLVM_PROFDATA overrides. rust-toolchain.toml lands
# first so the component is added to the toolchain the build actually uses
# rather than the image's default.
COPY rust-toolchain.toml ./
RUN rustup component add llvm-tools-preview

# cargo-llvm-cov ships prebuilt binaries; installing from source here would add
# several minutes to every image build.
RUN set -eux; \
case "$(uname -m)" in \
x86_64) target=x86_64-unknown-linux-gnu ;; \
aarch64) target=aarch64-unknown-linux-gnu ;; \
*) echo "no cargo-llvm-cov release for $(uname -m)" >&2; exit 1 ;; \
esac; \
curl -fsSL "https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-${target}.tar.gz" \
| tar xzf - -C "${CARGO_HOME}/bin"; \
cargo llvm-cov --version

# Pre-fetch and build dependencies for layer caching (debug/test profile)
COPY Cargo.toml Cargo.lock ./
COPY crates/lash-types/Cargo.toml crates/lash-types/Cargo.toml
Expand Down
6 changes: 1 addition & 5 deletions flawd.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ enabled = ["rs"]
inputs = [
{ format = "lcov", path = "coverage/lcov.info" }
]
command = "LLVM_COV=/opt/homebrew/opt/llvm/bin/llvm-cov LLVM_PROFDATA=/opt/homebrew/opt/llvm/bin/llvm-profdata cargo llvm-cov --lcov --output-path coverage/lcov.info"
command = "mkdir -p coverage && cargo llvm-cov --workspace --lcov --output-path coverage/lcov.info"
timeout_seconds = 300

[test]
Expand All @@ -24,10 +24,6 @@ dedupe = true
sampling = "weighted"
cache = true

[llm]
mode = "off"
max_edit_chars = 120

[docker]
dockerfile = "Dockerfile"
workdir = "/app"
Expand Down
Loading