From 84e44dd0122cc4e532206bad01a25629deac3d9f Mon Sep 17 00:00:00 2001 From: iamamyth Date: Fri, 17 Jan 2025 02:48:48 -0800 Subject: tests: Fix tools::is_hdd unit tests Correct the unit tests for tools::is_hdd to avoid making assumptions about the configuration of a particular device based solely on the value of the __GLIBC__ preprocessor flag. Instead, rely on the test invoker to provide paths for devices of specific types via the process environment, thereby avoiding faulty assumptions and improving the specificity of test assertions. To ensure appropriate devices exist, add a script, tests/create_test_disks.sh, which configures loopback devices mirroring relevant configurations. --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26b2505df..6f7840dd1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -163,6 +163,8 @@ jobs: run: ${{env.APT_INSTALL_LINUX}} - name: install Python dependencies run: pip install requests psutil monotonic zmq deepdiff + - name: create dummy disk drives for testing + run: tests/create_test_disks.sh >> $GITHUB_ENV - name: tests env: CTEST_OUTPUT_ON_FAILURE: ON -- cgit v1.2.3