diff options
author | Vladimír Čunát <v@cunat.cz> | 2024-05-05 17:31:58 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2024-05-05 17:31:58 +0200 |
commit | 93947b281226d5d89a39073b10caaf6c906070aa (patch) | |
tree | d55f8944fd90a3dd0d86e0f495f3d0bbdf795060 /pkgs/tools/system/skeema/default.nix | |
parent | 5dc079ed333c755fe000f2b86e97bf11f6f069a4 (diff) | |
parent | 100509c030faf7cca1582c5a7197b8d3a815d600 (diff) |
Merge branch 'staging' into staging-next
Diffstat (limited to 'pkgs/tools/system/skeema/default.nix')
-rw-r--r-- | pkgs/tools/system/skeema/default.nix | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/pkgs/tools/system/skeema/default.nix b/pkgs/tools/system/skeema/default.nix index 68d1a1c627b39..a7503baac14b5 100644 --- a/pkgs/tools/system/skeema/default.nix +++ b/pkgs/tools/system/skeema/default.nix @@ -17,32 +17,35 @@ buildGoModule rec { ldflags = [ "-s" "-w" ]; - preCheck = + preCheck = '' + # Fix tests expecting /usr/bin/printf and /bin/echo + substituteInPlace skeema_cmd_test.go \ + --replace /usr/bin/printf "${coreutils}/bin/printf" + + substituteInPlace internal/fs/dir_test.go \ + --replace /bin/echo "${coreutils}/bin/echo" \ + --replace /usr/bin/printf "${coreutils}/bin/printf" + + substituteInPlace internal/applier/ddlstatement_test.go \ + --replace /bin/echo "${coreutils}/bin/echo" + ''; + + checkFlags = let skippedTests = [ # Tests requiring network access to gitlab.com "TestDirRelPath" - "TestParseDirSymlinks" + "TestParseDir" # Flaky tests "TestCommandTimeout" "TestShellOutTimeout" + + # Fails with 'internal/fs/testdata/cfgsymlinks1/validrel/.skeema is a symlink pointing outside of its repo'. + "TestParseDirSymlinks" ]; in - '' - buildFlagsArray+=("-run" "[^(${builtins.concatStringsSep "|" skippedTests})]") - - # Fix tests expecting /usr/bin/printf and /bin/echo - substituteInPlace skeema_cmd_test.go \ - --replace /usr/bin/printf "${coreutils}/bin/printf" - - substituteInPlace internal/fs/dir_test.go \ - --replace /bin/echo "${coreutils}/bin/echo" \ - --replace /usr/bin/printf "${coreutils}/bin/printf" - - substituteInPlace internal/applier/ddlstatement_test.go \ - --replace /bin/echo "${coreutils}/bin/echo" - ''; + [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ]; passthru.tests.version = testers.testVersion { package = skeema; |