-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Also test gnosis contracts. #2818
Conversation
I had some local failures, we might need node 7. |
Fails with this:
|
@Georgi87 any idea why this fails?
|
Hmm, that error recently started to appear in the node 7 CI builds of gnosis contracts. I haven't figured why, but the test runner also generates the |
@cag thanks! We also tried node 6 to no avail (that is the version our CI runs on currently and everything else works). |
@axic Okay I think I got to the bottom of this. Basically, it's my fault and I'm very sorry 😅 Unfortunately, the test suite won't work with node 6 as it makes quite liberal use of As for the spawn testrpc ENOENT issue, it is from here: gnosis/run-with-testrpc#1 I have a PR to address this here: gnosis/pm-contracts#46 Hopefully that's all! |
@cag that seems to mean we could use with Node 7? That's great news! Can you ping us when it is merged? (We run our tests against master. Is there a release branch we should rather use?) |
@axic Yep, master is fine. Releases are just tagged. Fix branch is merged. LMK if you would like a release cut on NPM or anything. |
@cag it seems we still have some issues, are we doing something wrong?
|
I don't believe so. This is really strange. I'll have to try running that script. The testrpc failure didn't come with a lot of diagnostics unfortunately, so if there is a way to get more information, I'll push up a diagnostics upgrade. |
@axic This is really strange. I ran
I was thinking that maybe it had to do with the prepublish hook, but that seems unlikely, since the test-runner also relies on Another possibility that crossed my mind is that maybe the Zeppelin test runner's testrpc process had not finished terminating by the time the new testrpc for gnosis started getting spun up. Still, this seems like a very unlikely possibility since it takes quite a while for the Gnosis repo to get set up, and there's I doubt that the Zeppelin process wasn't successful at killing testrpc. Something weird I noticed is that the error I'm using node v7.10.1 and npm v4.2.0. Not going to lie... I am pretty stumped right now, esp. since I am unable to locally reproduce this. |
Rebased and pushed, lets see again. @cag tried locally on a mac (the first part seems to work, but it fails later):
|
That's because pragmas pin the contracts to a single version (0.4.15), as
per ConsenSys best practices. Otherwise, I'd expect this to work fine. I
could write a `sed` command to change the pinned version or something...
…On Sep 18, 2017 5:23 PM, "Alex Beregszaszi" ***@***.***> wrote:
Rebased and pushed, lets see again.
@cag <https://github.com/cag> tried locally on a mac (the first part
seems to work, but it fails later):
> @***@***.*** test /private/var/folders/8g/rhqxpd5s0f39vcp_gbhfk2p00000gn/T/tmp.3eNeVSTL
> run-with-testrpc -l 40000000 'truffle test'
No local truffle config found. Using all defaults...
Using network 'development'.
Compiling ./contracts/Utils/Math.sol...
Compiling ./test/solidity/TestMath.sol...
Compiling truffle/Assert.sol...
Compiling truffle/DeployedAddresses.sol...
Compilation warnings encountered:
Warning: This is a pre-release compiler version, please do not use it in production.
,/private/var/folders/8g/rhqxpd5s0f39vcp_gbhfk2p00000gn/T/tmp.3eNeVSTL/contracts/Utils/Math.sol:182:18: Warning: This declaration shadows an existing declaration.
returns (int max)
^-----^
/private/var/folders/8g/rhqxpd5s0f39vcp_gbhfk2p00000gn/T/tmp.3eNeVSTL/contracts/Utils/Math.sol:179:5: The shadowed declaration is here:
function max(int[] nums)
^
Spanning multiple lines.
,truffle/Assert.sol:114:20: Warning: This declaration shadows an existing declaration.
function equal(string A, string B, string message) constant returns (bool result) {
^------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:137:23: Warning: This declaration shadows an existing declaration.
function notEqual(string A, string B, string message) constant returns (bool result) {
^------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:206:20: Warning: This declaration shadows an existing declaration.
function equal(bytes32 A, bytes32 B, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:226:23: Warning: This declaration shadows an existing declaration.
function notEqual(bytes32 A, bytes32 B, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:286:20: Warning: This declaration shadows an existing declaration.
function equal(address A, address B, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:305:23: Warning: This declaration shadows an existing declaration.
function notEqual(address A, address B, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:403:20: Warning: This declaration shadows an existing declaration.
function equal(bool A, bool B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:426:23: Warning: This declaration shadows an existing declaration.
function notEqual(bool A, bool B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:451:20: Warning: This declaration shadows an existing declaration.
function equal(uint A, uint B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:474:23: Warning: This declaration shadows an existing declaration.
function notEqual(uint A, uint B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:497:22: Warning: This declaration shadows an existing declaration.
function isAbove(uint A, uint B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:520:24: Warning: This declaration shadows an existing declaration.
function isAtLeast(uint A, uint B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:543:22: Warning: This declaration shadows an existing declaration.
function isBelow(uint A, uint B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:566:23: Warning: This declaration shadows an existing declaration.
function isAtMost(uint A, uint B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:635:20: Warning: This declaration shadows an existing declaration.
function equal(int A, int B, string message) constant returns (bool result) {
^---^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:658:23: Warning: This declaration shadows an existing declaration.
function notEqual(int A, int B, string message) constant returns (bool result) {
^---^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:681:22: Warning: This declaration shadows an existing declaration.
function isAbove(int A, int B, string message) constant returns (bool result) {
^---^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:704:24: Warning: This declaration shadows an existing declaration.
function isAtLeast(int A, int B, string message) constant returns (bool result) {
^---^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:727:22: Warning: This declaration shadows an existing declaration.
function isBelow(int A, int B, string message) constant returns (bool result) {
^---^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:750:23: Warning: This declaration shadows an existing declaration.
function isAtMost(int A, int B, string message) constant returns (bool result) {
^---^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:1267:27: Warning: This declaration shadows an existing declaration.
function balanceEqual(address A, uint b, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:1287:30: Warning: This declaration shadows an existing declaration.
function balanceNotEqual(address A, uint b, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:1306:28: Warning: This declaration shadows an existing declaration.
function balanceIsZero(address A, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:1325:31: Warning: This declaration shadows an existing declaration.
function balanceIsNotZero(address A, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
Warning: This is a pre-release compiler version, please do not use it in production.
,/private/var/folders/8g/rhqxpd5s0f39vcp_gbhfk2p00000gn/T/tmp.3eNeVSTL/contracts/Utils/Math.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.4.17-nightly.2017.9.6 commit.59223061.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.4.15;
^---------------------^
,/private/var/folders/8g/rhqxpd5s0f39vcp_gbhfk2p00000gn/T/tmp.3eNeVSTL/test/solidity/TestMath.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.4.17-nightly.2017.9.6 commit.59223061.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.4.15;
^---------------------^
,/private/var/folders/8g/rhqxpd5s0f39vcp_gbhfk2p00000gn/T/tmp.3eNeVSTL/contracts/Utils/Math.sol:182:18: Warning: This declaration shadows an existing declaration.
returns (int max)
^-----^
/private/var/folders/8g/rhqxpd5s0f39vcp_gbhfk2p00000gn/T/tmp.3eNeVSTL/contracts/Utils/Math.sol:179:5: The shadowed declaration is here:
function max(int[] nums)
^
Spanning multiple lines.
,truffle/Assert.sol:114:20: Warning: This declaration shadows an existing declaration.
function equal(string A, string B, string message) constant returns (bool result) {
^------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:137:23: Warning: This declaration shadows an existing declaration.
function notEqual(string A, string B, string message) constant returns (bool result) {
^------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:206:20: Warning: This declaration shadows an existing declaration.
function equal(bytes32 A, bytes32 B, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:226:23: Warning: This declaration shadows an existing declaration.
function notEqual(bytes32 A, bytes32 B, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:286:20: Warning: This declaration shadows an existing declaration.
function equal(address A, address B, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:305:23: Warning: This declaration shadows an existing declaration.
function notEqual(address A, address B, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:403:20: Warning: This declaration shadows an existing declaration.
function equal(bool A, bool B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:426:23: Warning: This declaration shadows an existing declaration.
function notEqual(bool A, bool B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:451:20: Warning: This declaration shadows an existing declaration.
function equal(uint A, uint B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:474:23: Warning: This declaration shadows an existing declaration.
function notEqual(uint A, uint B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:497:22: Warning: This declaration shadows an existing declaration.
function isAbove(uint A, uint B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:520:24: Warning: This declaration shadows an existing declaration.
function isAtLeast(uint A, uint B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:543:22: Warning: This declaration shadows an existing declaration.
function isBelow(uint A, uint B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:566:23: Warning: This declaration shadows an existing declaration.
function isAtMost(uint A, uint B, string message) constant returns (bool result) {
^----^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:635:20: Warning: This declaration shadows an existing declaration.
function equal(int A, int B, string message) constant returns (bool result) {
^---^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:658:23: Warning: This declaration shadows an existing declaration.
function notEqual(int A, int B, string message) constant returns (bool result) {
^---^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:681:22: Warning: This declaration shadows an existing declaration.
function isAbove(int A, int B, string message) constant returns (bool result) {
^---^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:704:24: Warning: This declaration shadows an existing declaration.
function isAtLeast(int A, int B, string message) constant returns (bool result) {
^---^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:727:22: Warning: This declaration shadows an existing declaration.
function isBelow(int A, int B, string message) constant returns (bool result) {
^---^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:750:23: Warning: This declaration shadows an existing declaration.
function isAtMost(int A, int B, string message) constant returns (bool result) {
^---^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:1267:27: Warning: This declaration shadows an existing declaration.
function balanceEqual(address A, uint b, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:1287:30: Warning: This declaration shadows an existing declaration.
function balanceNotEqual(address A, uint b, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:1306:28: Warning: This declaration shadows an existing declaration.
function balanceIsZero(address A, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
,truffle/Assert.sol:1325:31: Warning: This declaration shadows an existing declaration.
function balanceIsNotZero(address A, string message) constant returns (bool result) {
^-------^
truffle/Assert.sol:64:5: The shadowed declaration is here:
uint8 constant A = uint8(byte('a'));
^---------------------------------^
Compiliation failed. See above.
{ Error: Command failed: truffle test
at checkExecSyncError (child_process.js:481:13)
at execSync (child_process.js:521:13)
at Promise.then (/private/var/folders/8g/rhqxpd5s0f39vcp_gbhfk2p00000gn/T/tmp.3eNeVSTL/node_modules/run-with-testrpc/bin/run-with-testrpc.js:49:5)
at process._tickCallback (internal/process/next_tick.js:109:7)
error: null,
cmd: 'truffle test',
file: '/bin/sh',
args: [ '/bin/sh', '-c', 'truffle test' ],
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2818 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASNz213_h_DuKcpD_A8i5frzPxUOWaWks5sju1-gaJpZM4PCrn2>
.
|
@cag good news, I think it is sorted now both on Travis and CircleCI, the only problem left is the code using |
Great! Something like Edit: bleh writing shell scripts on a phone |
test/externalTests.sh
Outdated
git clone --depth 1 "$repo" "$DIR" | ||
cd "$DIR" | ||
npm install | ||
cp "$SOLJSON" ./node_modules/solc/soljson.js |
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.
find contracts -type f -print0 | xargs -0 sed -i -e 's/pragma 0/pragma ^0/'
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.
Missed solidity
after pragma
:)
e750429
to
b605b21
Compare
^_^ solidity is not my native code-tongue
|
So it runs finally locally, but not sure what is going on. It seems to run it 3 times and from the second time on the pragma is back to unchanged. Lets see what will happen on Travis. |
@axic >_< I forgot to account for Solidity tests with the pragma directive. Here is a better command: Edit: It didn't run locally until I changed the command. It just passed for me. Hopefully that's what CI was concerned about. |
Getting closer :)
|
Also for some reason it runs twice plus some kind of gas estimation in the middle. |
It seems to also fail with stock version, without changing the compiler. @cag do you see that happening? |
The Travis build seems to be alright?? But yeah, it does run twice. Once is due to the Anyway, this is weird. The source repo has CI on it so it should still work...??? I'll look into it tomorrow. |
@cag it seems travis is fine (and will fix circle as it was running node 6). It still fails on my local computer, maybe it is a bug somewhere or my computer is broken. Do you want to investigate reasons? :) |
@axic I just did this: gnosis/pm-contracts#59 |
@cag I don't know what's going on but I can imagine this is very frustrating at this point (I am just running the script: After your latest changes (well, git master from 30 minutes ago):
|
It seems like I'm going to try doing this on a macOS. Maybe that'll give me more clues. @axic I just used a macOS Sierra VPS, put node 7.10.1 and npm 5.5.1 on it, and ran the tests with the nightly soljson.js from this branch with this result: So good/bad news: it worked. 😖 |
It works without problems on El Capitan 10.11.6 Xcode 8.0 node 8.9.0 npm 5.5.1. It doesn't work (for me) on latest Mac Xcode 9 I think node 7 something. Will need to try with a different node on that machine, but that wont happen for a week. |
Ahhh thanks for checking Alex! I'll look into getting the latest macOS to
test this...
…On Nov 4, 2017 3:31 PM, "Alex Beregszaszi" ***@***.***> wrote:
It works without problems on El Capitan 10.11.6 Xcode 8.0. It doesn't
work (for me) on latest Mac Xcode 9.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2818 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASNz-ImmDqcxrddYjH_gB36jIuMhcISks5szMmYgaJpZM4PCrn2>
.
|
The failing machine has Sierra 10.12.6 Xcode 9.0 node 7.1.0.1 npm 4.2.0. @cag did you had any success running it on such a setup? |
Not yet, but I'll look into procuring such a setup. |
Please rebase. |
@pirapira since you have a Mac would you be able to run this with either of the two mentioned configurations? The failure on one is blocking the merge of this, maybe it is an isolated issue to a single computer. |
@axic I'll try. |
I got stuck with an irrelevant issue
I'll solve this on |
I get
Somehow I need to build |
Just download the latest release from solc-bin. Well, better to download some nightly around 4th of November, because that definitely triggered it, but now I cannot test if the latest one triggers it. |
ffb00b3
to
9c3a680
Compare
Rebased. |
@@ -97,12 97,12 @@ matrix: | |||
sudo: required | |||
compiler: gcc | |||
node_js: | |||
- "6" | |||
- "7" |
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.
Probably should upgrade to 8 instead, see #3485
This works on CI as well as locally. Ready to merge! 🍾 |
@cag finally merged! Be prepared for complaints if you break something and that stalls the Solidity build pipeline 😉 |
Omg, thanks a bunch!! |
No description provided.