@@ -4,6 +4,8 @@ const solc = require('../index.js');
4
4
const linker = require ( '../linker.js' ) ;
5
5
const execSync = require ( 'child_process' ) . execSync ;
6
6
7
+ var noRemoteVersions = ( process . argv . indexOf ( '--no-remote-versions' ) >= 0 ) ;
8
+
7
9
function runTests ( solc , versionText ) {
8
10
console . log ( `Running tests with ${ versionText } ${ solc . version ( ) } ` ) ;
9
11
@@ -759,7 +761,7 @@ function runTests (solc, versionText) {
759
761
} ) ;
760
762
761
763
// Only run on the latest version.
762
- if ( versionText === 'latest' ) {
764
+ if ( versionText === 'latest' && ! noRemoteVersions ) {
763
765
tape ( 'Loading Legacy Versions' , function ( t ) {
764
766
t . test ( 'loading remote version - development snapshot' , function ( st ) {
765
767
// getting the development snapshot
@@ -798,22 +800,24 @@ function runTests (solc, versionText) {
798
800
799
801
runTests ( solc , 'latest' ) ;
800
802
801
- // New compiler interface features 0.1.6, 0.2.1, 0.4.11, 0.5.0, etc.
802
- // 0.4.0 added pragmas (used in tests above)
803
- const versions = [
804
- 'v0.1.1+commit.6ff4cd6' ,
805
- 'v0.1.6+commit.d41f8b7' ,
806
- 'v0.2.0+commit.4dc2445' ,
807
- 'v0.2.1+commit.91a6b35' ,
808
- 'v0.3.6+commit.3fc68da' ,
809
- 'v0.4.0+commit.acd334c9' ,
810
- 'v0.4.11+commit.68ef5810' ,
811
- 'v0.4.12+commit.194ff033' ,
812
- 'v0.4.26+commit.4563c3fc'
813
- ] ;
814
- for ( var version in versions ) {
815
- version = versions [ version ] ;
816
- execSync ( `curl -L -o /tmp/${ version } .js https://solc-bin.ethereum.org/bin/soljson-${ version } .js` ) ;
817
- const newSolc = require ( '../wrapper.js' ) ( require ( `/tmp/${ version } .js` ) ) ;
818
- runTests ( newSolc , version ) ;
803
+ if ( ! noRemoteVersions ) {
804
+ // New compiler interface features 0.1.6, 0.2.1, 0.4.11, 0.5.0, etc.
805
+ // 0.4.0 added pragmas (used in tests above)
806
+ const versions = [
807
+ 'v0.1.1+commit.6ff4cd6' ,
808
+ 'v0.1.6+commit.d41f8b7' ,
809
+ 'v0.2.0+commit.4dc2445' ,
810
+ 'v0.2.1+commit.91a6b35' ,
811
+ 'v0.3.6+commit.3fc68da' ,
812
+ 'v0.4.0+commit.acd334c9' ,
813
+ 'v0.4.11+commit.68ef5810' ,
814
+ 'v0.4.12+commit.194ff033' ,
815
+ 'v0.4.26+commit.4563c3fc'
816
+ ] ;
817
+ for ( var version in versions ) {
818
+ version = versions [ version ] ;
819
+ execSync ( `curl -L -o /tmp/${ version } .js https://solc-bin.ethereum.org/bin/soljson-${ version } .js` ) ;
820
+ const newSolc = require ( '../wrapper.js' ) ( require ( `/tmp/${ version } .js` ) ) ;
821
+ runTests ( newSolc , version ) ;
822
+ }
819
823
}
0 commit comments