mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
Delete pytest
These tests have never been useful; drop them. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
9690f78356
commit
700afe1939
36
.travis.yml
36
.travis.yml
@ -1,36 +0,0 @@
|
|||||||
os: linux
|
|
||||||
dist: bionic
|
|
||||||
language: c
|
|
||||||
arch:
|
|
||||||
- amd64
|
|
||||||
# - arm64
|
|
||||||
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- valgrind
|
|
||||||
- python3-docutils
|
|
||||||
- python3-pytest
|
|
||||||
- python3-pytest-xdist
|
|
||||||
- meson
|
|
||||||
- ninja-build
|
|
||||||
- pkg-config
|
|
||||||
- libaio-dev
|
|
||||||
- libblkid-dev
|
|
||||||
- libkeyutils-dev
|
|
||||||
- liblz4-dev
|
|
||||||
- libsodium-dev
|
|
||||||
- liburcu-dev
|
|
||||||
- libzstd-dev
|
|
||||||
- libudev-dev
|
|
||||||
- uuid-dev
|
|
||||||
- zlib1g-dev
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- wget https://github.com/libfuse/libfuse/archive/fuse-3.7.0.tar.gz -O /tmp/fuse.tar.gz
|
|
||||||
- tar -C /tmp -zxvf /tmp/fuse.tar.gz
|
|
||||||
- mkdir /tmp/libfuse-fuse-3.7.0/build
|
|
||||||
- pushd /tmp/libfuse-fuse-3.7.0/build && meson .. && ninja && sudo ninja install && popd
|
|
||||||
- sudo ldconfig
|
|
||||||
|
|
||||||
script: ./smoke_test
|
|
24
INSTALL.md
24
INSTALL.md
@ -75,27 +75,3 @@ previously built without fuse support):
|
|||||||
```shell
|
```shell
|
||||||
BCACHEFS_FUSE=1 make && make install
|
BCACHEFS_FUSE=1 make && make install
|
||||||
```
|
```
|
||||||
|
|
||||||
Tests
|
|
||||||
-----
|
|
||||||
Some tests are available to validate the `bcachefs` binary. The tests depend
|
|
||||||
on python3 pytest.
|
|
||||||
|
|
||||||
On debian:
|
|
||||||
```shell
|
|
||||||
apt install -u python3-pytest
|
|
||||||
```
|
|
||||||
|
|
||||||
Then, you can run the tests via:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
make check
|
|
||||||
# or if pytest has a different name
|
|
||||||
make check PYTEST=pytest
|
|
||||||
```
|
|
||||||
|
|
||||||
Optionally, you may wish to run tests in parallel using python3-pytest-xdist:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
cd tests; pytest-3 -n4
|
|
||||||
```
|
|
16
Makefile
16
Makefile
@ -34,14 +34,6 @@ CFLAGS+=-std=gnu11 -O2 -g -MMD -Wall -fPIC \
|
|||||||
$(EXTRA_CFLAGS)
|
$(EXTRA_CFLAGS)
|
||||||
LDFLAGS+=$(CFLAGS) $(EXTRA_LDFLAGS)
|
LDFLAGS+=$(CFLAGS) $(EXTRA_LDFLAGS)
|
||||||
|
|
||||||
## Configure Tools
|
|
||||||
PYTEST_ARGS?=
|
|
||||||
PYTEST_CMD?=$(shell \
|
|
||||||
command -v pytest-3 \
|
|
||||||
|| which pytest-3 2>/dev/null \
|
|
||||||
)
|
|
||||||
PYTEST:=$(PYTEST_CMD) $(PYTEST_ARGS)
|
|
||||||
|
|
||||||
CARGO_ARGS=
|
CARGO_ARGS=
|
||||||
CARGO=cargo $(CARGO_ARGS)
|
CARGO=cargo $(CARGO_ARGS)
|
||||||
CARGO_PROFILE=release
|
CARGO_PROFILE=release
|
||||||
@ -99,14 +91,6 @@ debug: bcachefs
|
|||||||
.PHONY: tests
|
.PHONY: tests
|
||||||
tests: tests/test_helper
|
tests: tests/test_helper
|
||||||
|
|
||||||
.PHONY: check
|
|
||||||
check: tests bcachefs
|
|
||||||
ifneq (,$(PYTEST_CMD))
|
|
||||||
$(PYTEST)
|
|
||||||
else
|
|
||||||
@echo "WARNING: pytest not found or specified, tests could not be run."
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: TAGS tags
|
.PHONY: TAGS tags
|
||||||
TAGS:
|
TAGS:
|
||||||
ctags -e -R .
|
ctags -e -R .
|
||||||
|
81
smoke_test
81
smoke_test
@ -1,81 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# This is a smoke test of bcachefs-tools.
|
|
||||||
#
|
|
||||||
# It builds the source with multiple options (debug, release, valgrind, FUSE)
|
|
||||||
# and runs the test suite.
|
|
||||||
#
|
|
||||||
# Returns 0 on success, nonzero on any failure.
|
|
||||||
#
|
|
||||||
# Dependencies:
|
|
||||||
#
|
|
||||||
# valgrind, python3-pytest, python3-pytest-xdist
|
|
||||||
#
|
|
||||||
# On debian/ubuntu based systems, install with:
|
|
||||||
#
|
|
||||||
# apt install valgrind python3-pytest python3-pytest-xdist
|
|
||||||
#
|
|
||||||
# You also currently need fuse 3.7 or later. Fuse 3.7 unfortunately requires
|
|
||||||
# debian sid or bullseye at this time, so you may need to install from source.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
PYTEST="${PYTEST:-pytest-3}"
|
|
||||||
spam=$(mktemp)
|
|
||||||
unset BCACHEFS_FUSE BCACHEFS_TEST_USE_VALGRIND BCACHEFS_DEBUG
|
|
||||||
|
|
||||||
trap "set +x; cat ${spam}; rm -f ${spam} ; echo; echo FAILED." EXIT
|
|
||||||
|
|
||||||
echo -- Verify dependencies --
|
|
||||||
pkg-config --atleast-version 3.7.0 fuse3
|
|
||||||
python3 -c "import pytest"
|
|
||||||
python3 -c "import xdist"
|
|
||||||
which valgrind > /dev/null
|
|
||||||
echo OK
|
|
||||||
|
|
||||||
JOBS=$(nproc)
|
|
||||||
function build() {
|
|
||||||
echo Building.
|
|
||||||
make -j ${JOBS} clean > ${spam} 2>&1
|
|
||||||
make -j ${JOBS} tests bcachefs > ${spam} 2>&1
|
|
||||||
truncate -s0 ${spam}
|
|
||||||
}
|
|
||||||
|
|
||||||
function test() {
|
|
||||||
echo Running tests.
|
|
||||||
(
|
|
||||||
${PYTEST} -n${JOBS}
|
|
||||||
) > ${spam} 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_vg() {
|
|
||||||
echo Running tests with valgrind.
|
|
||||||
(
|
|
||||||
export BCACHEFS_TEST_USE_VALGRIND=yes
|
|
||||||
${PYTEST} -n${JOBS}
|
|
||||||
) > ${spam} 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
echo -- Test: default --
|
|
||||||
build
|
|
||||||
test
|
|
||||||
|
|
||||||
echo -- Test: debug --
|
|
||||||
export BCACHEFS_DEBUG=1
|
|
||||||
build
|
|
||||||
test
|
|
||||||
|
|
||||||
echo -- Test: debug with valgrind --
|
|
||||||
test_vg
|
|
||||||
|
|
||||||
#echo -- Test: fuse debug --
|
|
||||||
#export BCACHEFS_FUSE=1
|
|
||||||
#build
|
|
||||||
#test
|
|
||||||
|
|
||||||
#echo -- Test: fuse debug with valgrind --
|
|
||||||
#test_vg
|
|
||||||
|
|
||||||
rm -f ${spam}
|
|
||||||
trap "set +x; echo; echo SUCCESS." EXIT
|
|
Loading…
Reference in New Issue
Block a user