 f633e0dcac
			
		
	
	f633e0dcac
	
	
	
		
			
			This adds support for running chrome in headless mode.
Support for running firefox in headless mode should work but currently
doesn't.
Moreover, i've added browser option handling to wct [1].
[1] b8388d1a8d
Bug: Issue 8023
Change-Id: I47cd9cd69fc78739219223c74d7b2edf2f97d6c7
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			760 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			760 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| npm_bin=$(which npm)
 | |
| if [[ -z "$npm_bin" ]]; then
 | |
|     echo "NPM must be on the path. (https://www.npmjs.com/)"
 | |
|     exit 1
 | |
| fi
 | |
| 
 | |
| wct_bin=$(which wct)
 | |
| if [[ -z "$wct_bin" ]]; then
 | |
|     echo "WCT must be on the path. (https://github.com/Polymer/web-component-tester)"
 | |
|     exit 1
 | |
| fi
 | |
| 
 | |
| # WCT tests are not hermetic, and need extra environment variables.
 | |
| # TODO(hanwen): does $DISPLAY even work on OSX?
 | |
| bazel test \
 | |
|       --test_env="HOME=$HOME" \
 | |
|       --test_env="WCT=${wct_bin}" \
 | |
|       --test_env="WCT_ARGS=${WCT_ARGS}" \
 | |
|       --test_env="NPM=${npm_bin}" \
 | |
|       --test_env="DISPLAY=${DISPLAY}" \
 | |
|       --test_env="WCT_HEADLESS_MODE=${WCT_HEADLESS_MODE}" \
 | |
|       "$@" \
 | |
|       //polygerrit-ui/app:embed_test \
 | |
|       //polygerrit-ui/app:wct_test
 |