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

Add makefile for testing #71

Merged
merged 2 commits into from
Jun 23, 2022

Conversation

rst0git
Copy link
Member

@rst0git rst0git commented Jun 21, 2022

Running tests with CRIU requires root privileges, however, building go binaries does not. This patch separates the build steps from the steps used to run tests. This allows to build applications such as crit using make without root privileges.

@rst0git rst0git force-pushed the test-makefile branch 2 times, most recently from 289b3d4 to 0e21146 Compare June 21, 2022 07:38
@rst0git rst0git requested a review from adrianreber June 22, 2022 03:10
@codecov-commenter
Copy link

codecov-commenter commented Jun 22, 2022

Codecov Report

Merging #71 (1bb06aa) into master (0353fd7) will increase coverage by 35.88%.
The diff coverage is n/a.

❗ Current head 1bb06aa differs from pull request most recent head 3d4f0e6. Consider uploading reports for the commit 3d4f0e6 to get more accurate results

@@             Coverage Diff             @@
##           master      #71       +/-   ##
===========================================
+ Coverage   26.15%   62.04%   +35.88%     
===========================================
  Files          11        1       -10     
  Lines        2015      137     -1878     
===========================================
- Hits          527       85      -442     
+ Misses       1390       37     -1353     
+ Partials       98       15       -83     
Impacted Files Coverage Δ
notify.go
stats/stats.pb.go
test/main.go
main.go
rpc/rpc.pb.go
stats/utils.go
features.go
phaul/images.go
phaul/server.go
phaul/client.go

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0353fd7...3d4f0e6. Read the comment docs.

Makefile Outdated Show resolved Hide resolved
Copy link
Member

@snprajwal snprajwal left a comment

Choose a reason for hiding this comment

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

LGTM

Makefile Show resolved Hide resolved
test/Makefile Outdated Show resolved Hide resolved
rst0git added 2 commits June 22, 2022 11:25
Running tests with CRIU requires root privileges, however, building
go binaries does not. This patch separates the build steps from the
steps used to run tests. This allows to build applications such as
crit using `make` without root privileges.

Signed-off-by: Radostin Stoyanov <[email protected]>
Signed-off-by: Radostin Stoyanov <[email protected]>
@adrianreber adrianreber merged commit bc6e263 into checkpoint-restore:master Jun 23, 2022
@rst0git rst0git deleted the test-makefile branch June 23, 2022 11:46
rst0git added a commit to rst0git/go-criu that referenced this pull request Jun 24, 2022
The current default target in test/Makefile is `test-bin` [1] as this is
the first target in the makefile. This was unintentional change
introduced in [2]. The default target should be `all`.

However, `test-bin` does not appear to be used anywhere and thus, we can
remove it.

[1] https://www.gnu.org/software/make/manual/html_node/Rules.html
[2] checkpoint-restore#71

Signed-off-by: Radostin Stoyanov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants