mirror of
https://github.com/qdrant/qdrant.git
synced 2026-07-23 11:11:00 -05:00
* Skip broken tests
* Add rocksdb dropper
This is a temporary tool. It will be removed later in this PR.
* [automated] Drop rocksdb
This commit is made by running tools/rocksdb/drop.sh
* Touch-up after ast-grep
The previous automated commit removed items, but not their comments.
Also, some blocks are left with only one item.
Also, ast-grep can't handle macros like `vec![]`.
This commit completes the job.
* Remove RocksDB dropper
* Remove mentions of rocksdb feature in CI
* Fix clippy warnings
These `FIXME` comments added previously in this PR by ast-grep by
"peeling" cfg_attr like this:
-#[cfg_attr(not(feature = "rocksdb"), expect(...))]
+#[expect(...)] // FIXME(rocksdb): ...
This commit removes these allow/expect attributes and fixes clippy
lints.
* Remove leftover rocksdb-related code
Removed:
- Cargo.toml: rocksdb cargo feature flag and dependencies.
- code: rocksdb-related items that was not under feature flag.
- flags.rs: rocksdb-related qdrant feature flags.
Disabled:
- Some benchmarks because these do not compile now.
* Print warning if rocksdb leftovers found in snapshots
* Remove Clone from tokenizer
* Regenerate openapi.json
47 lines
1.6 KiB
Bash
Executable File
47 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Usage: tools/coverage.sh
|
|
#
|
|
# For running on low RAM machines like Github CI, Use `RUN_PER_PACKAGE=true tools/coverage.sh`
|
|
#
|
|
# If using locally, occasionally run `cargo llvm-cov clean` to avoid bloating `target/llvm-cov-target` dir with .profraw files
|
|
|
|
RUN_PER_PACKAGE=${RUN_PER_PACKAGE:-"false"}
|
|
OUTPATH_PATH="unit-test-coverage.lcov"
|
|
|
|
# TODO: Try building with RUSTFLAG="-C instrument-coverage" instead of llvm-cov and see if that works faster or avoids OOM in CI
|
|
|
|
if [ "$RUN_PER_PACKAGE" == "false" ]; then
|
|
# Run for the entire workspace in one shot. This assumes that the machine has enough memory
|
|
cargo llvm-cov --no-clean nextest --profile ci --workspace --lcov --output-path "lcov.info"
|
|
cargo llvm-cov report --html
|
|
exit 0
|
|
fi
|
|
|
|
PACKAGES=($(cargo metadata --format-version 1 | jq -r '.workspace_members[] | split("/") | .[-1] | split("#")[0]' | sort))
|
|
REPORT_DIR="/tmp/llvm-cov-reports"
|
|
|
|
echo "Workspace packages: ${PACKAGES[*]}"
|
|
|
|
mkdir -p "$REPORT_DIR"
|
|
|
|
LCOV_COMMAND_ARGS=""
|
|
|
|
for PACKAGE in "${PACKAGES[@]}"; do
|
|
echo "Testing package with coverage: $PACKAGE"
|
|
PACKAGE_REPORT_PATH="$REPORT_DIR/$PACKAGE.info"
|
|
|
|
# Profile "ci" is configured in .config/nextest.toml
|
|
cargo llvm-cov --no-clean nextest --profile ci -p "$PACKAGE" --lcov --output-path "$PACKAGE_REPORT_PATH"
|
|
echo "Testing completed for package $PACKAGE. Cleaning artifacts"
|
|
cargo llvm-cov clean -p "$PACKAGE"
|
|
|
|
if [ -e "$PACKAGE_REPORT_PATH" ]; then # If file exists
|
|
LCOV_COMMAND_ARGS="${LCOV_COMMAND_ARGS} -a $PACKAGE_REPORT_PATH"
|
|
fi
|
|
done
|
|
|
|
if [ -n "$LCOV_COMMAND_ARGS" ]; then
|
|
lcov $LCOV_COMMAND_ARGS --output-file "$OUTPATH_PATH"
|
|
fi
|