skeema: Fix build on x86_64-darwin
This commit is contained in:
parent
f6bbab1940
commit
fb83752113
1 changed files with 27 additions and 17 deletions
|
@ -17,28 +17,38 @@ buildGoModule rec {
|
||||||
|
|
||||||
ldflags = [ "-s" "-w" ];
|
ldflags = [ "-s" "-w" ];
|
||||||
|
|
||||||
preCheck = ''
|
preCheck =
|
||||||
# Disable tests requiring network access to gitlab.com
|
let
|
||||||
buildFlagsArray+=("-run" "[^(Test(ParseDir(Symlinks|))|DirRelPath)]")
|
skippedTests = [
|
||||||
|
# Tests requiring network access to gitlab.com
|
||||||
|
"TestDirRelPath"
|
||||||
|
"TestParseDirSymlinks"
|
||||||
|
|
||||||
# Fix tests expecting /usr/bin/printf and /bin/echo
|
# Flaky tests
|
||||||
substituteInPlace skeema_cmd_test.go \
|
"TestShellOutTimeout"
|
||||||
--replace /usr/bin/printf "${coreutils}/bin/printf"
|
];
|
||||||
|
in
|
||||||
|
''
|
||||||
|
buildFlagsArray+=("-run" "[^(${builtins.concatStringsSep "|" skippedTests})]")
|
||||||
|
|
||||||
substituteInPlace internal/fs/dir_test.go \
|
# Fix tests expecting /usr/bin/printf and /bin/echo
|
||||||
--replace /bin/echo "${coreutils}/bin/echo" \
|
substituteInPlace skeema_cmd_test.go \
|
||||||
--replace /usr/bin/printf "${coreutils}/bin/printf"
|
--replace /usr/bin/printf "${coreutils}/bin/printf"
|
||||||
|
|
||||||
substituteInPlace internal/applier/ddlstatement_test.go \
|
substituteInPlace internal/fs/dir_test.go \
|
||||||
--replace /bin/echo "${coreutils}/bin/echo"
|
--replace /bin/echo "${coreutils}/bin/echo" \
|
||||||
|
--replace /usr/bin/printf "${coreutils}/bin/printf"
|
||||||
|
|
||||||
substituteInPlace internal/util/shellout_unix_test.go \
|
substituteInPlace internal/applier/ddlstatement_test.go \
|
||||||
--replace /bin/echo "${coreutils}/bin/echo" \
|
--replace /bin/echo "${coreutils}/bin/echo"
|
||||||
--replace /usr/bin/printf "${coreutils}/bin/printf"
|
|
||||||
|
|
||||||
substituteInPlace internal/util/shellout_unix.go \
|
substituteInPlace internal/util/shellout_unix_test.go \
|
||||||
--replace /bin/sh "${runtimeShell}"
|
--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 {
|
passthru.tests.version = testers.testVersion {
|
||||||
package = skeema;
|
package = skeema;
|
||||||
|
|
Loading…
Reference in a new issue