bobuhiro11 / gokvm

KVM based tiny x86 hypervisor written in pure golang, which can boot Linux
https://blog.bobuhiro11.net/tags/gokvm.html
MIT License
206 stars 21 forks source link

Replace flag handling with alecthomas/kong. #152

Closed ChriMarMe closed 1 year ago

ChriMarMe commented 1 year ago

Reopen for review. will rebase on main and adapt accordingly.

ChriMarMe commented 1 year ago

This is much more convenient than using FlagSets and implementing all the support for the same functionality.

ChriMarMe commented 1 year ago

Last thing I need to move the Config struct to vmm and hopefully be done with it.

ChriMarMe commented 1 year ago

fails because coverage goes down by 3 %. Will fix tomorrow

ChriMarMe commented 1 year ago

-5% test coverage. no idea how to cope with it....

ChriMarMe commented 1 year ago

I placed the untestable code of kong (like the run functions of the command structs) into seperate file and made sure it is excluded from coverage until we find a better solution.

ChriMarMe commented 1 year ago

Coverage still under 82%. Dunno if i ever reach it again.

ChriMarMe commented 1 year ago

81%.....

bobuhiro11 commented 1 year ago

If we can test that the proposal in this PR is working as expected in the CI, then we don't need to be concerned about the value of coverage itself 😄

ChriMarMe commented 1 year ago

Wrote seperate tests for start and debug command parsing.

ChriMarMe commented 1 year ago

Well....i hope it works now as intended.

ChriMarMe commented 1 year ago
bad response status from coveralls: 500

{"message":"Build processing error.","error":true,"url":""}

idk

bobuhiro11 commented 1 year ago

https://app.travis-ci.com/github/bobuhiro11/gokvm/jobs/608550126 says The command "sudo -E env "PATH=$PATH" go mod tidy && git diff --no-patch --exit-code go.sum" exited with 1..

go mod tidy command would fix the CI.

ChriMarMe commented 1 year ago

Finally. Thanks for the hint to go mod tidy