
committed by
Kara Erickson

parent
7b3bcc23af
commit
5eb7426216
31
packages/zone.js/scripts/closure/closure_compiler.sh
Executable file
31
packages/zone.js/scripts/closure/closure_compiler.sh
Executable file
@ -0,0 +1,31 @@
|
||||
# compile closure test source file
|
||||
$(npm bin)/tsc -p .
|
||||
# Run the Google Closure compiler java runnable with zone externs
|
||||
java -jar node_modules/google-closure-compiler/compiler.jar --flagfile 'scripts/closure/closure_flagfile' --externs 'lib/closure/zone_externs.js'
|
||||
|
||||
# the names of Zone exposed API should be kept correctly with zone externs, test program should exit with 0.
|
||||
node build/closure/closure-bundle.js
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "Successfully pass closure compiler with zone externs"
|
||||
else
|
||||
echo "failed to pass closure compiler with zone externs"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run the Google Closure compiler java runnable without zone externs.
|
||||
java -jar node_modules/google-closure-compiler/compiler.jar --flagfile 'scripts/closure/closure_flagfile'
|
||||
|
||||
# the names of Zone exposed API should be renamed and fail to be executed, test program should exit with 1.
|
||||
node build/closure/closure-bundle.js
|
||||
|
||||
if [ $? -eq 1 ]
|
||||
then
|
||||
echo "Successfully detect closure compiler error without zone externs"
|
||||
else
|
||||
echo "failed to detect closure compiler error without zone externs"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
5
packages/zone.js/scripts/closure/closure_flagfile
Normal file
5
packages/zone.js/scripts/closure/closure_flagfile
Normal file
@ -0,0 +1,5 @@
|
||||
--compilation_level ADVANCED_OPTIMIZATIONS
|
||||
--js_output_file "build/closure/closure-bundle.js"
|
||||
--rewrite_polyfills false
|
||||
--js "build/test/closure/zone.closure.js"
|
||||
--formatting PRETTY_PRINT
|
36
packages/zone.js/scripts/grab-blink-idl.sh
Executable file
36
packages/zone.js/scripts/grab-blink-idl.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
trap "echo Exit; exit;" SIGINT SIGTERM
|
||||
|
||||
CORE_URL="https://src.chromium.org/blink/trunk/Source/core/"
|
||||
MODULE_URL="https://src.chromium.org/blink/trunk/Source/modules/"
|
||||
|
||||
mkdir -p blink-idl/core
|
||||
mkdir -p blink-idl/modules
|
||||
|
||||
|
||||
echo "Fetching core idl files..."
|
||||
|
||||
rm tmp/ -rf
|
||||
svn co $CORE_URL tmp -q
|
||||
|
||||
for IDL in $(find tmp/ -iname '*.idl' -type f -printf '%P\n')
|
||||
do
|
||||
echo "- $IDL"
|
||||
mv "tmp/$IDL" blink-idl/core
|
||||
done
|
||||
|
||||
echo "Fetching modules idl files..."
|
||||
|
||||
rm tmp/ -rf
|
||||
svn co $MODULE_URL tmp -q
|
||||
|
||||
for IDL in $(find tmp/ -iname '*.idl' -type f -printf '%P\n')
|
||||
do
|
||||
echo "- $IDL"
|
||||
mv "tmp/$IDL" blink-idl/modules
|
||||
done
|
||||
|
||||
rm tmp/ -rf
|
10
packages/zone.js/scripts/sauce/sauce_connect_block.sh
Executable file
10
packages/zone.js/scripts/sauce/sauce_connect_block.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Wait for Connect to be ready before exiting
|
||||
printf "Connecting to Sauce."
|
||||
while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
|
||||
printf "."
|
||||
#dart2js takes longer than the travis 10 min timeout to complete
|
||||
sleep .5
|
||||
done
|
||||
echo "Connected"
|
49
packages/zone.js/scripts/sauce/sauce_connect_setup.sh
Executable file
49
packages/zone.js/scripts/sauce/sauce_connect_setup.sh
Executable file
@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -o pipefail
|
||||
|
||||
# Setup and start Sauce Connect for your TravisCI build
|
||||
# This script requires your .travis.yml to include the following two private env variables:
|
||||
# SAUCE_USERNAME
|
||||
# SAUCE_ACCESS_KEY
|
||||
# Follow the steps at https://saucelabs.com/opensource/travis to set that up.
|
||||
#
|
||||
# Curl and run this script as part of your .travis.yml before_script section:
|
||||
# before_script:
|
||||
# - curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash
|
||||
|
||||
CONNECT_URL="https://saucelabs.com/downloads/sc-4.3.14-linux.tar.gz"
|
||||
CONNECT_DIR="/tmp/sauce-connect-$RANDOM"
|
||||
CONNECT_DOWNLOAD="sc-latest-linux.tar.gz"
|
||||
|
||||
CONNECT_LOG="$LOGS_DIR/sauce-connect"
|
||||
CONNECT_STDOUT="$LOGS_DIR/sauce-connect.stdout"
|
||||
CONNECT_STDERR="$LOGS_DIR/sauce-connect.stderr"
|
||||
|
||||
# Get Connect and start it
|
||||
mkdir -p $CONNECT_DIR
|
||||
cd $CONNECT_DIR
|
||||
curl $CONNECT_URL -o $CONNECT_DOWNLOAD 2> /dev/null 1> /dev/null
|
||||
mkdir sauce-connect
|
||||
tar --extract --file=$CONNECT_DOWNLOAD --strip-components=1 --directory=sauce-connect > /dev/null
|
||||
rm $CONNECT_DOWNLOAD
|
||||
|
||||
SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`
|
||||
|
||||
ARGS=""
|
||||
|
||||
# Set tunnel-id only on Travis, to make local testing easier.
|
||||
if [ ! -z "$TRAVIS_JOB_NUMBER" ]; then
|
||||
ARGS="$ARGS --tunnel-identifier $TRAVIS_JOB_NUMBER"
|
||||
fi
|
||||
if [ ! -z "$BROWSER_PROVIDER_READY_FILE" ]; then
|
||||
ARGS="$ARGS --readyfile $BROWSER_PROVIDER_READY_FILE"
|
||||
fi
|
||||
|
||||
|
||||
echo "Starting Sauce Connect in the background, logging into:"
|
||||
echo " $CONNECT_LOG"
|
||||
echo " $CONNECT_STDOUT"
|
||||
echo " $CONNECT_STDERR"
|
||||
sauce-connect/bin/sc -u $SAUCE_USERNAME -k $SAUCE_ACCESS_KEY $ARGS \
|
||||
--reconnect 100 --no-ssl-bump-domains all --logfile $CONNECT_LOG 2> $CONNECT_STDERR 1> $CONNECT_STDOUT &
|
Reference in New Issue
Block a user