OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 set -eu | 2 set -eu |
3 DIR=$(dirname "${BASH_SOURCE[0]}") | 3 cd $( dirname "${BASH_SOURCE[0]}" )/.. |
4 | 4 |
5 # TODO(ochafik): Run pub serve + launch a browser on | 5 export CHROME_CANARY_BIN=`./tool/get_chrome_canary.sh` |
6 # http://localhost:8080/hello_app/web/ | 6 |
| 7 echo "*** Testing pub serve + DDC transformer" |
| 8 pub run test --timeout 120s test/transformer_e2e_test.dart |
| 9 |
| 10 echo "*** Testing pub build + DDC transformer" |
7 cd test/transformer/hello_app | 11 cd test/transformer/hello_app |
8 pub get | 12 pub get |
9 pub build | 13 pub build |
10 | 14 |
11 expected_files=( | 15 expected_files=( |
| 16 build/web/hello_app/web/index.html |
12 build/web/hello_app/web/main.js | 17 build/web/hello_app/web/main.js |
13 build/web/hello_dep/simple.js | 18 build/web/hello_dep/simple.js |
14 build/web/hello_dep/utils.js | 19 build/web/hello_dep/utils.js |
15 # This is not an exhaustive check: | 20 # This is not an exhaustive check: |
16 build/web/dev_compiler/runtime/dart/_runtime.js | 21 build/web/dev_compiler/runtime/dart/_runtime.js |
17 ) | 22 ) |
18 | 23 |
19 for file in "${expected_files[@]}" ; do | 24 for file in "${expected_files[@]}" ; do |
20 if [[ ! -f $file ]]; then | 25 if [[ ! -f $file ]]; then |
21 echo "Didn't find $file in build:" | 26 echo "Didn't find $file in build:" |
22 find build | grep -v /packages/ | 27 find build | grep -v /packages/ |
23 exit 1 | 28 exit 1 |
24 fi | 29 fi |
25 done | 30 done |
OLD | NEW |