mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Make solc-js.sh run its tests directly
- Its structure has diverged a lot from other external tests and there's not point in keeping it abstracted like this.
This commit is contained in:
		
							parent
							
								
									afc3d72e81
								
							
						
					
					
						commit
						b925250705
					
				| @ -323,20 +323,6 @@ function hardhat_clean | ||||
|     rm -rf artifacts/ cache/ | ||||
| } | ||||
| 
 | ||||
| function run_test | ||||
| { | ||||
|     local compile_fn="$1" | ||||
|     local test_fn="$2" | ||||
| 
 | ||||
|     replace_version_pragmas | ||||
| 
 | ||||
|     printLog "Running compile function..." | ||||
|     time $compile_fn | ||||
| 
 | ||||
|     printLog "Running test function..." | ||||
|     $test_fn | ||||
| } | ||||
| 
 | ||||
| function settings_from_preset | ||||
| { | ||||
|     local preset="$1" | ||||
|  | ||||
| @ -29,9 +29,6 @@ VERSION="$2" | ||||
| 
 | ||||
| [[ $SOLJSON != "" && -f "$SOLJSON" && $VERSION != "" ]] || fail "Usage: $0 <path to soljson.js> <version>" | ||||
| 
 | ||||
| function compile_fn { echo "Nothing to compile."; } | ||||
| function test_fn { npm test; } | ||||
| 
 | ||||
| function solcjs_test | ||||
| { | ||||
|     TEST_DIR=$(pwd) | ||||
| @ -60,7 +57,10 @@ function solcjs_test | ||||
|     echo "Updating package.json to version $VERSION" | ||||
|     npm version --allow-same-version --no-git-tag-version "$VERSION" | ||||
| 
 | ||||
|     run_test compile_fn test_fn | ||||
|     replace_version_pragmas | ||||
| 
 | ||||
|     printLog "Running test function..." | ||||
|     npm test | ||||
| } | ||||
| 
 | ||||
| external_test solc-js solcjs_test | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user