| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							|  |  |  | set -ex -o pipefail | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # These ones can be `npm link`ed for fast development | 
					
						
							|  |  |  | LINKABLE_PKGS=( | 
					
						
							| 
									
										
										
										
											2016-06-02 11:33:53 -07:00
										 |  |  |   $(pwd)/dist/packages-dist/{common,core,compiler,compiler-cli,platform-{browser,server}} | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  |   $(pwd)/dist/tools/@angular/tsc-wrapped | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | PKGS=( | 
					
						
							|  |  |  |   reflect-metadata | 
					
						
							|  |  |  |   typescript@next | 
					
						
							|  |  |  |   zone.js | 
					
						
							|  |  |  |   rxjs | 
					
						
							|  |  |  |   @types/{node,jasmine} | 
					
						
							|  |  |  |   jasmine | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | TMPDIR=${TMPDIR:-.} | 
					
						
							|  |  |  | readonly TMP=$TMPDIR/e2e_test.$(date +%s) | 
					
						
							|  |  |  | mkdir -p $TMP | 
					
						
							| 
									
										
										
										
											2016-06-02 11:33:53 -07:00
										 |  |  | cp -R -v modules/@angular/compiler-cli/integrationtest/* $TMP | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | # Try to use the same versions as angular, in particular, this will | 
					
						
							|  |  |  | # cause us to install the same rxjs version. | 
					
						
							|  |  |  | cp -v package.json $TMP | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # run in subshell to avoid polluting cwd | 
					
						
							|  |  |  | ( | 
					
						
							|  |  |  |   cd $TMP | 
					
						
							| 
									
										
										
										
											2016-06-14 19:04:24 -07:00
										 |  |  |   set -ex -o pipefail | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  |   npm install ${PKGS[*]} | 
					
						
							|  |  |  |   # TODO(alexeagle): allow this to be npm link instead | 
					
						
							|  |  |  |   npm install ${LINKABLE_PKGS[*]} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-02 11:33:53 -07:00
										 |  |  |   # Compile the compiler-cli integration tests | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  |   ./node_modules/.bin/ngc | 
					
						
							| 
									
										
										
										
											2016-06-01 14:58:11 -07:00
										 |  |  |   ./node_modules/.bin/ng-xi18n | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   ./node_modules/.bin/jasmine init | 
					
						
							| 
									
										
										
										
											2016-06-02 11:33:53 -07:00
										 |  |  |   # Run compiler-cli integration tests in node | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  |   ./node_modules/.bin/jasmine test/*_spec.js | 
					
						
							|  |  |  | ) |