From 700afe193945e7c55bee0d6c16089f33d3c45f03 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Thu, 20 Apr 2023 12:18:25 -0400 Subject: [PATCH] Delete pytest These tests have never been useful; drop them. Signed-off-by: Kent Overstreet --- .travis.yml | 36 ------------------------ INSTALL.md | 24 ---------------- Makefile | 16 ----------- smoke_test | 81 ----------------------------------------------------- 4 files changed, 157 deletions(-) delete mode 100644 .travis.yml delete mode 100755 smoke_test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e66f0c2..0000000 --- a/.travis.yml +++ /dev/null @@ -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 diff --git a/INSTALL.md b/INSTALL.md index ec5d67b..94b2877 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -75,27 +75,3 @@ previously built without fuse support): ```shell 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 -``` \ No newline at end of file diff --git a/Makefile b/Makefile index 8a85e01..0793f2a 100644 --- a/Makefile +++ b/Makefile @@ -34,14 +34,6 @@ CFLAGS+=-std=gnu11 -O2 -g -MMD -Wall -fPIC \ $(EXTRA_CFLAGS) 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=cargo $(CARGO_ARGS) CARGO_PROFILE=release @@ -99,14 +91,6 @@ debug: bcachefs .PHONY: tests 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 TAGS: ctags -e -R . diff --git a/smoke_test b/smoke_test deleted file mode 100755 index 1122808..0000000 --- a/smoke_test +++ /dev/null @@ -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 -- 2.39.2