-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat: add nim hole punching tests #322
Open
diegomrsantos
wants to merge
19
commits into
libp2p:master
Choose a base branch
from
diegomrsantos:feat/add-nim-hole-punch-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c830079
add nim test basic version
diegomrsantos 774a7c7
add ping
diegomrsantos 186e77a
Advancing the test
diegomrsantos 6a4d45e
finishing test
diegomrsantos fef9abc
gitignore
diegomrsantos 92da7e8
send logs to stderr
diegomrsantos 2453ca1
update nim version
diegomrsantos ea34a0c
update nim version
diegomrsantos 2f6a472
update nim version
diegomrsantos aa8b4aa
update nim version
diegomrsantos 8eb175e
update nim version
diegomrsantos dc544a1
remove flag
diegomrsantos 772fd3a
improve docker cache
diegomrsantos 53fb81f
update nim-libp2p version
diegomrsantos c9c2555
remove wrong clean
diegomrsantos 4d0b61e
improve clean
diegomrsantos 21fcab2
doesn't fail if file doesn't exist
diegomrsantos b7c59bf
move test to nim-libp2p
diegomrsantos b4787bf
improve make file and use new nim-libp2p version
diegomrsantos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
RUST_SUBDIRS := $(wildcard impl/rust/*/.) | ||
GO_SUBDIRS := $(wildcard impl/go/*/.) | ||
NIM_SUBDIRS := $(wildcard impl/nim/*/.) | ||
|
||
# Combine all sub-directory lists into a single list | ||
ALL_SUBDIRS := $(RUST_SUBDIRS) $(GO_SUBDIRS) $(NIM_SUBDIRS) | ||
|
||
all: rust-relay router $(ALL_SUBDIRS) | ||
|
||
all: rust-relay router $(RUST_SUBDIRS) $(GO_SUBDIRS) | ||
rust-relay: | ||
$(MAKE) -C rust-relay | ||
|
||
router: | ||
$(MAKE) -C router | ||
$(RUST_SUBDIRS): | ||
$(MAKE) -C $@ | ||
$(GO_SUBDIRS): | ||
|
||
$(ALL_SUBDIRS): | ||
$(MAKE) -C $@ | ||
|
||
clean: | ||
$(MAKE) -C rust-relay clean | ||
$(MAKE) -C router clean | ||
$(MAKE) -C $(RUST_SUBDIRS) clean | ||
$(MAKE) -C $(GO_SUBDIRS) clean | ||
for dir in $(ALL_SUBDIRS); do \ | ||
$(MAKE) -C $$dir clean; \ | ||
done | ||
|
||
.PHONY: rust-relay router all $(ALL_SUBDIRS) | ||
|
||
.PHONY: rust-relay router all $(RUST_SUBDIRS) $(GO_SUBDIRS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
nim-libp2p-*.zip | ||
nim-libp2p-* | ||
nim-libp2p | ||
nim-libp2p-*/* | ||
image.json | ||
hole_punching.nim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
image_name := nim-v1.1 | ||
commitSha := 93925ac28b04cd94d06a332412973e90f80f35df | ||
|
||
all: image.json | ||
|
||
image.json: nim-libp2p-${commitSha} | ||
cd nim-libp2p-${commitSha} && IMAGE_NAME=${image_name} ../../../../dockerBuildWrapper.sh -f tests/hole-punching-interop/Dockerfile . | ||
docker image inspect ${image_name} -f "{{.Id}}" | \ | ||
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@ | ||
|
||
nim-libp2p-${commitSha}: nim-libp2p-${commitSha}.zip | ||
unzip -o nim-libp2p-${commitSha}.zip | ||
|
||
nim-libp2p-${commitSha}.zip: | ||
wget -O $@ "https://github.com/status-im/nim-libp2p/archive/${commitSha}.zip" | ||
|
||
clean: | ||
rm -f image.json | ||
rm -rf nim-libp2p* | ||
|
||
.PHONY: all clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see, this is a commit that is not yet merged into
master
, correct? I am okay with that, assuming it will eventually be updated to one that sits onmaster
, ideally even one that points at a particular release.Given that you are adding the workflow in vacp2p/nim-libp2p#998, I'd suggest it is save to merge that PR first, given that it essentially tests the exact same version as what is referenced here.
Once that is merged into your master, we can update this commit hash here and merge this PR.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks.