deskflow: Run tests sequentially to prevent race conditions
Deskflow writes to a config file and reads it back during `checkPhase` (specifically, the unit tests), and due to parallelism, this causes a race condition, and fails the unit tests. This commit disables the implicit tests that run during build with CMake, and *explicitly* runs the unit tests in `checkPhase`, with `-j1`, as well as the legacy tests, which mean the tests will not race against the same file. Relates to build failure in #503256.
This commit is contained in:
@@ -58,6 +58,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_SKIP_RPATH=ON" # Avoid generating incorrect RPATH
|
||||
"-DSKIP_BUILD_TESTS=ON" # Perform unit tests in `checkPhase` manually, with one job at a time.
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
@@ -99,6 +100,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
runHook preCheck
|
||||
|
||||
export QT_QPA_PLATFORM=offscreen
|
||||
ctest --test-dir "src/unittests" --output-on-failure
|
||||
./bin/legacytests
|
||||
|
||||
runHook postCheck
|
||||
|
||||
Reference in New Issue
Block a user