Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update unit-test && e2e to run on Mac #3506

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

yeahdongcn
Copy link
Contributor

I encountered several issues in make controller-gen, make unit-test, make e2e on Mac.

Please see the detailed error message here:

  • make controller-gen
    ➜ volcano (master) make controller-gen                       
    go: creating new go.mod: module tmp
    go: cannot install cross-compiled binaries when GOBIN is set
    make: *** [controller-gen] Error 1
  • make unit-test
    ➜ volcano (master) make unit-test
    go clean -testcache
    if [ Darwin = 'Darwin' ];then\
                    GOOS=darwin go list ./... | grep -v "/e2e" | xargs  go test;\
            else\
                    go test -p 8 -race $(find pkg cmd -type f -name '*_test.go' | sed -r 's|/[^/]+$||' | sort | uniq | sed "s|^|volcano.sh/volcano/|");\
            fi;
    ?       volcano.sh/volcano/cmd/cli      [no test files]
    ...
    ?       volcano.sh/volcano/example/kubecon-2019-china/scripts   [no test files]
    fork/exec /var/folders/p9/dbq3q88x7c39y7tmwqgj6yjr0000gn/T/go-build3785830628/b889/options.test: exec format error
    FAIL    volcano.sh/volcano/cmd/controller-manager/app/options   0.001s
    fork/exec /var/folders/p9/dbq3q88x7c39y7tmwqgj6yjr0000gn/T/go-build3785830628/b1041/options.test: exec format error
    FAIL    volcano.sh/volcano/cmd/scheduler/app/options    0.002s

This is because GOOS ?= linux is explicitly set in Makefile and consumed in making docker images, etc.

So I slightly update the OS env and access it whenever needed (e.g. go test/install, ginkgo) and everything works perfectly on Mac && Linux.

Testing done (on both Mac && Linux):

  1. make vcctl -> ok
  2. make unit-test -> ok
  3. make controller-gen -> ok
  4. make mirror-licenses -> ok
  5. make generate-code -> ok
  6. make e2e-test-jobp -> ok

@volcano-sh-bot
Copy link
Contributor

Welcome @yeahdongcn!

It looks like this is your first PR to volcano-sh/volcano.

Thank you, and welcome to Volcano. 😃

@volcano-sh-bot volcano-sh-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 3, 2024
Copy link
Member

@shinytang6 shinytang6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 3, 2024
@shinytang6
Copy link
Member

cc @Monokaix @hwdef @william-wang

@lowang-bh
Copy link
Member

fixes #2894

@volcano-sh-bot volcano-sh-bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 4, 2024
@yeahdongcn
Copy link
Contributor Author

Code rebase from upstream/master.

Copy link
Member

@hwdef hwdef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 4, 2024
@Monokaix
Copy link
Member

Monokaix commented Jun 6, 2024

/lgtm

Copy link
Member

@william-wang william-wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: william-wang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 7, 2024
@volcano-sh-bot volcano-sh-bot merged commit c61742d into volcano-sh:master Jun 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants