| 
									
										
										
										
											2019-11-01 11:17:10 -07:00
										 |  |  | load("//tools:defaults.bzl", "protractor_web_test_suite") | 
					
						
							| 
									
										
										
										
											2019-02-06 18:03:58 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | """
 | 
					
						
							|  |  |  |   Macro that can be used to define a benchmark test. This differentiates from | 
					
						
							|  |  |  |   a normal Protractor test suite because we specify a custom "perf" configuration | 
					
						
							| 
									
										
										
										
											2020-01-13 18:57:06 +01:00
										 |  |  |   that sets up "@angular/benchpress". Benchmark test targets will not run on CI | 
					
						
							|  |  |  |   unless explicitly requested. | 
					
						
							| 
									
										
										
										
											2019-02-06 18:03:58 +01:00
										 |  |  | """
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-16 14:34:03 +01:00
										 |  |  | def benchmark_test(name, server, tags = [], **kwargs): | 
					
						
							| 
									
										
										
										
											2019-02-06 18:03:58 +01:00
										 |  |  |     protractor_web_test_suite( | 
					
						
							|  |  |  |         name = name, | 
					
						
							|  |  |  |         configuration = "//:protractor-perf.conf.js", | 
					
						
							|  |  |  |         data = [ | 
					
						
							|  |  |  |             "//packages/benchpress", | 
					
						
							|  |  |  |         ], | 
					
						
							|  |  |  |         on_prepare = "//modules/benchmarks:start-server.js", | 
					
						
							|  |  |  |         server = server, | 
					
						
							| 
									
										
										
										
											2020-01-13 18:57:06 +01:00
										 |  |  |         # Benchmark targets should not run on CI by default. | 
					
						
							| 
									
										
										
										
											2020-01-27 12:59:51 -08:00
										 |  |  |         tags = tags + [ | 
					
						
							|  |  |  |             "manual", | 
					
						
							|  |  |  |             "no-remote-exec", | 
					
						
							|  |  |  |         ], | 
					
						
							|  |  |  |         test_suite_tags = [ | 
					
						
							|  |  |  |             "manual", | 
					
						
							|  |  |  |             "no-remote-exec", | 
					
						
							|  |  |  |         ], | 
					
						
							| 
									
										
										
										
											2020-01-16 14:34:03 +01:00
										 |  |  |         **kwargs | 
					
						
							| 
									
										
										
										
											2019-02-06 18:03:58 +01:00
										 |  |  |     ) |