Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ os::build::internal::build_binaries() {
for test in "${tests[@]:+${tests[@]}}"; do
local outfile="${OS_OUTPUT_BINPATH}/${platform}/$(basename ${test})"
# disabling cgo allows use of delve
CGO_ENABLED=0 GOOS=${platform%/*} GOARCH=${platform##*/} go test \
CGO_ENABLED="${OS_TEST_CGO_ENABLED:-}" GOOS=${platform%/*} GOARCH=${platform##*/} go test \
-pkgdir "${OS_OUTPUT_PKGDIR}/${platform}" \
-tags "${OS_GOFLAGS_TAGS-} ${!platform_gotags_test_envvar:-}" \
-ldflags "${version_ldflags}" \
Expand Down
5 changes: 5 additions & 0 deletions hack/test-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ name="$(basename ${package})"
dlv_debug="${DLV_DEBUG:-}"
verbose="${VERBOSE:-}"

# CGO must be disabled in order to debug
if [[ -n "${dlv_debug}" ]]; then
export OS_TEST_CGO_ENABLED=0
fi

# build the test executable
if [[ -n "${OPENSHIFT_SKIP_BUILD:-}" ]]; then
os::log::warn "Skipping build due to OPENSHIFT_SKIP_BUILD"
Expand Down