-
Notifications
You must be signed in to change notification settings - Fork 122
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
Upgrade wagon and add tests #93
Open
silasdavis
wants to merge
3
commits into
perlin-network:master
Choose a base branch
from
silasdavis:upgrade-wagon
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
3 commits
Select commit
Hold shift + click to select a range
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: test | ||
on: [push, pull_request] | ||
jobs: | ||
unit: | ||
name: Unit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13 | ||
id: go | ||
- uses: actions/checkout@v1 | ||
- run: make test | ||
|
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 |
---|---|---|
|
@@ -10,3 +10,6 @@ coverage.txt | |
*.test | ||
|
||
go.sum | ||
test_runner | ||
tests/generated | ||
target/ |
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,3 @@ | ||
[submodule "testsuite"] | ||
path = testsuite | ||
url = [email protected]:WebAssembly/testsuite.git |
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,34 @@ | ||
JSON_DIR:=tests/generated | ||
WAST_DIR:=testsuite | ||
NO_TEST:=tests/skipped/%.no-test | ||
TEST_RUNNER:=target/test_runner | ||
|
||
# Run all test fixtures | ||
.PHONY: test | ||
test: build testsuite test_runner wast $(patsubst ${JSON_DIR}/%.json, ${NO_TEST}, $(wildcard ${JSON_DIR}/*.json)) | ||
|
||
.PHONY: build | ||
build: | ||
go build . | ||
|
||
target/test_runner: | ||
go build -o ${TEST_RUNNER} ./spec/test_runner | ||
|
||
# Pseudo target to run each test fixture | ||
${NO_TEST}: ${JSON_DIR}/%.json | ||
${TEST_RUNNER} $< | ||
|
||
# Get latest test suite as a git submodule | ||
.PHONY: testsuite | ||
testsuite: | ||
git submodule update --init testsuite | ||
|
||
# Build all JSON specs | ||
.PHONY: wast | ||
wast: $(patsubst ${WAST_DIR}/%.wast, ${JSON_DIR}/%.json, $(wildcard ${WAST_DIR}/*.wast)) | ||
|
||
# Build JSON specs - requires the wast2json binary to be on PATH, from wabt (https://github.com/WebAssembly/wabt) | ||
${JSON_DIR}/%.json: testsuite/%.wast | ||
wast2json $< -o $@ | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
module github.com/perlin-network/life | ||
|
||
replace github.com/go-interpreter/wagon v0.0.0 => github.com/perlin-network/wagon v0.3.1-0.20180825141017-f8cb99b55a39 | ||
go 1.13 | ||
|
||
require ( | ||
github.com/go-interpreter/wagon v0.0.0 | ||
github.com/go-interpreter/wagon v0.6.1-0.20190923081222-01d3d3376951 | ||
github.com/kr/pretty v0.1.0 // indirect | ||
github.com/vmihailenco/msgpack v4.0.4+incompatible | ||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e // indirect | ||
google.golang.org/appengine v1.6.5 // indirect | ||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect | ||
) |
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 @@ | ||
This file indicates that the corresponding JSON test in tests/generated is not yet passing and will be excluded. Remove this file to include the test. |
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 @@ | ||
This file indicates that the corresponding JSON test in tests/generated is not yet passing and will be excluded. Remove this file to include the test. |
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 @@ | ||
This file indicates that the corresponding JSON test in tests/generated is not yet passing and will be excluded. Remove this file to include the test. |
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 @@ | ||
This file indicates that the corresponding JSON test in tests/generated is not yet passing and will be excluded. Remove this file to include the test. |
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 @@ | ||
This file indicates that the corresponding JSON test in tests/generated is not yet passing and will be excluded. Remove this file to include the test. |
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.
We could avoid the strings in this switch if upstream merges: go-interpreter/wagon#172
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.
Agreed; I left a suggestion comment over in go-interpreter/wagon#172. It's not absolutely mandatory, though regardless of whichever option is chosen for converting an opcode into a string, we should definitely incorporate the change int a separate PR.