diff --git a/pkgs/tools/system/skeema/default.nix b/pkgs/tools/system/skeema/default.nix index 6faf5172ca78..043285497e91 100644 --- a/pkgs/tools/system/skeema/default.nix +++ b/pkgs/tools/system/skeema/default.nix @@ -17,28 +17,38 @@ buildGoModule rec { ldflags = [ "-s" "-w" ]; - preCheck = '' - # Disable tests requiring network access to gitlab.com - buildFlagsArray+=("-run" "[^(Test(ParseDir(Symlinks|))|DirRelPath)]") + preCheck = + let + skippedTests = [ + # Tests requiring network access to gitlab.com + "TestDirRelPath" + "TestParseDirSymlinks" - # Fix tests expecting /usr/bin/printf and /bin/echo - substituteInPlace skeema_cmd_test.go \ - --replace /usr/bin/printf "${coreutils}/bin/printf" + # Flaky tests + "TestShellOutTimeout" + ]; + in + '' + buildFlagsArray+=("-run" "[^(${builtins.concatStringsSep "|" skippedTests})]") - substituteInPlace internal/fs/dir_test.go \ - --replace /bin/echo "${coreutils}/bin/echo" \ - --replace /usr/bin/printf "${coreutils}/bin/printf" + # Fix tests expecting /usr/bin/printf and /bin/echo + substituteInPlace skeema_cmd_test.go \ + --replace /usr/bin/printf "${coreutils}/bin/printf" - substituteInPlace internal/applier/ddlstatement_test.go \ - --replace /bin/echo "${coreutils}/bin/echo" + substituteInPlace internal/fs/dir_test.go \ + --replace /bin/echo "${coreutils}/bin/echo" \ + --replace /usr/bin/printf "${coreutils}/bin/printf" - substituteInPlace internal/util/shellout_unix_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" - substituteInPlace internal/util/shellout_unix.go \ - --replace /bin/sh "${runtimeShell}" - ''; + substituteInPlace internal/util/shellout_unix_test.go \ + --replace /bin/echo "${coreutils}/bin/echo" \ + --replace /usr/bin/printf "${coreutils}/bin/printf" + + substituteInPlace internal/util/shellout_unix.go \ + --replace /bin/sh "${runtimeShell}" + ''; passthru.tests.version = testers.testVersion { package = skeema;