| 
									
										
										
										
											2015-01-22 00:37:58 +01:00
										 |  |  | #!/bin/bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # create random virtual machine test | 
					
						
							|  |  |  | #cd ~/software/Ethereum/pyethereum (python has local dependencies so only works from within the directory) | 
					
						
							| 
									
										
										
										
											2015-02-02 19:55:38 -08:00
										 |  |  | cd ~ | 
					
						
							| 
									
										
										
										
											2015-01-22 00:37:58 +01:00
										 |  |  | while [ 1 ] | 
					
						
							|  |  |  | do	 | 
					
						
							| 
									
										
										
										
											2015-02-02 19:55:38 -08:00
										 |  |  | 	TEST="$(docker run --rm --entrypoint="/cpp-ethereum/build/test/createRandomTest" cppjit)" | 
					
						
							| 
									
										
										
										
											2015-01-22 00:37:58 +01:00
										 |  |  | 	# echo "$TEST" | 
					
						
							|  |  |  | 	 | 
					
						
							| 
									
										
										
										
											2015-02-02 19:55:38 -08:00
										 |  |  | 	# test pyethereum | 
					
						
							|  |  |  | 	#OUTPUT_PYTHON="$(python ./tests/test_vm.py "$TEST")" | 
					
						
							|  |  |  | 	#RESULT_PYTHON=$? | 
					
						
							| 
									
										
										
										
											2015-01-22 00:37:58 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	# test go | 
					
						
							| 
									
										
										
										
											2015-02-02 19:55:38 -08:00
										 |  |  | 	OUTPUT_GO="$(docker run --rm go "$TEST")" | 
					
						
							|  |  |  | 	RESULT_GO=$? | 
					
						
							|  |  |  | 	 | 
					
						
							| 
									
										
										
										
											2015-01-22 00:37:58 +01:00
										 |  |  | 	# test cpp-jit | 
					
						
							| 
									
										
										
										
											2015-02-02 19:55:38 -08:00
										 |  |  | 	OUTPUT_CPPJIT="$(docker run --rm cppjit "$TEST")" | 
					
						
							|  |  |  | 	RESULT_CPPJIT=$? | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	# go fails | 
					
						
							|  |  |  | 	if [ "$RESULT_GO" -ne 0 ]; then | 
					
						
							|  |  |  | 		echo Failed: | 
					
						
							|  |  |  | 		echo Output_GO: | 
					
						
							|  |  |  | 		echo $OUTPUT_GO | 
					
						
							|  |  |  | 		echo Test: | 
					
						
							|  |  |  | 		echo "$TEST" | 
					
						
							|  |  |  | 		echo "$TEST" > FailedTest.json | 
					
						
							|  |  |  | 		mv FailedTest.json $(date -d "today" +"%Y%m%d%H%M")GO.json # replace with scp to central server | 
					
						
							|  |  |  | 	fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	# python fails | 
					
						
							|  |  |  | 	#if [ "$RESULT_PYTHON" -ne 0 ]; then | 
					
						
							|  |  |  | 	#	echo Failed: | 
					
						
							|  |  |  | 	#	echo Output_PYTHON: | 
					
						
							|  |  |  | 	#	echo $OUTPUT_PYTHON | 
					
						
							|  |  |  | 	#	echo Test: | 
					
						
							|  |  |  | 	#	echo "$TEST" | 
					
						
							|  |  |  | 	#	echo "$TEST" > FailedTest.json | 
					
						
							|  |  |  | 	#	mv FailedTest.json $(date -d "today" +"%Y%m%d%H%M")PYTHON.json | 
					
						
							|  |  |  | 	#fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	# cppjit fails | 
					
						
							|  |  |  | 	if [ "$RESULT_CPPJIT" -ne 0 ]; then | 
					
						
							|  |  |  | 		echo Failed: | 
					
						
							|  |  |  | 		echo Output_CPPJIT: | 
					
						
							|  |  |  | 		echo $OUTPUT_CPPJIT | 
					
						
							|  |  |  | 		echo Test: | 
					
						
							|  |  |  | 		echo "$TEST" | 
					
						
							|  |  |  | 		echo "$TEST" > FailedTest.json | 
					
						
							|  |  |  | 		mv FailedTest.json $(date -d "today" +"%Y%m%d%H%M")CPPJIT.json | 
					
						
							|  |  |  | 	fi | 
					
						
							| 
									
										
										
										
											2015-01-22 00:37:58 +01:00
										 |  |  | done |