forked from Github_Repos/cvw
		
	Add busybear testbench to nightly regression checking
If you don't like how I did this please feel free to undo it
This commit is contained in:
		
							parent
							
								
									00d9e13d68
								
							
						
					
					
						commit
						b370be4a8a
					
				| @ -9,7 +9,7 @@ | |||||||
| ################################## | ################################## | ||||||
| 
 | 
 | ||||||
| # edit this line to add more configurations | # edit this line to add more configurations | ||||||
| confignames = ["rv32ic", "rv64ic"] | confignames = ["rv32ic", "rv64ic", "busybear"] | ||||||
| 
 | 
 | ||||||
| import multiprocessing, os | import multiprocessing, os | ||||||
| 
 | 
 | ||||||
| @ -18,18 +18,34 @@ fail = 0 | |||||||
| def test_config(config, print_res=True): | def test_config(config, print_res=True): | ||||||
|   """Run the given config, and return 0 if it suceeds and 1 if it fails""" |   """Run the given config, and return 0 if it suceeds and 1 if it fails""" | ||||||
|   logname = "wally_"+config+".log" |   logname = "wally_"+config+".log" | ||||||
|   cmd = "vsim -c >" + logname +" <<!\ndo wally-pipelined-batch-parallel.do ../config/" + config + " " + config + "\n!\n" |   if config == "busybear": | ||||||
|   os.system(cmd) |     cmd = "echo 'quit' | vsim -do wally-busybear.do -c >" + logname | ||||||
|  |     os.system(cmd) | ||||||
|  | 
 | ||||||
|  |     # check for success.  grep returns 0 if found, 1 if not found | ||||||
|  |     cmd = "grep -e 'no more .* to read' " + logname + "> /dev/null" | ||||||
|  |     grepval = os.system(cmd) | ||||||
|  |     if (grepval): | ||||||
|  |       if print_res:print(logname+": failures detected") | ||||||
|  |       return 1 | ||||||
|  |     else: | ||||||
|  |       if print_res:print(logname+": Success") | ||||||
|  |       return 0 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
|   # check for success.  grep returns 0 if found, 1 if not found |  | ||||||
|   cmd = "grep 'All tests ran without failures' " + logname + "> /dev/null" |  | ||||||
|   grepval = os.system(cmd) |  | ||||||
|   if (grepval): |  | ||||||
|     if print_res:print(logname+": failures detected") |  | ||||||
|     return 1 |  | ||||||
|   else: |   else: | ||||||
|     if print_res:print(logname+": Success") |     cmd = "vsim -c >" + logname +" <<!\ndo wally-pipelined-batch-parallel.do ../config/" + config + " " + config + "\n!\n" | ||||||
|     return 0 |     os.system(cmd) | ||||||
|  | 
 | ||||||
|  |     # check for success.  grep returns 0 if found, 1 if not found | ||||||
|  |     cmd = "grep 'All tests ran without failures' " + logname + "> /dev/null" | ||||||
|  |     grepval = os.system(cmd) | ||||||
|  |     if (grepval): | ||||||
|  |       if print_res:print(logname+": failures detected") | ||||||
|  |       return 1 | ||||||
|  |     else: | ||||||
|  |       if print_res:print(logname+": Success") | ||||||
|  |       return 0 | ||||||
| 
 | 
 | ||||||
| pool = multiprocessing.Pool(min(len(confignames), 12)) | pool = multiprocessing.Pool(min(len(confignames), 12)) | ||||||
| fail = sum(pool.map(test_config, confignames)) | fail = sum(pool.map(test_config, confignames)) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user