Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
3
gaia/tests/ci/build_integration/script
Executable file
3
gaia/tests/ci/build_integration/script
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/bash -e
|
||||
|
||||
make build-test-integration
|
||||
3
gaia/tests/ci/build_unit/script
Executable file
3
gaia/tests/ci/build_unit/script
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/bash -e
|
||||
|
||||
make build-test-unit
|
||||
3
gaia/tests/ci/csslint/script
Executable file
3
gaia/tests/ci/csslint/script
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/bash -vex
|
||||
|
||||
make csslint
|
||||
3
gaia/tests/ci/eslint/script
Executable file
3
gaia/tests/ci/eslint/script
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/bash -vex
|
||||
|
||||
make eslint
|
||||
11
gaia/tests/ci/gaia_ui_tests/script
Executable file
11
gaia/tests/ci/gaia_ui_tests/script
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#! /bin/bash -vex
|
||||
mkdir -p artifacts/logs/gaia_ui_tests_gecko/
|
||||
./bin/gaia-ui-tests \
|
||||
--type=b2g-external \
|
||||
--gecko-log artifacts/gaia_ui_tests_gecko/ \
|
||||
--html-output artifacts/gaia_ui_tests_report.html \
|
||||
--this-chunk=${THIS_CHUNK:=1} \
|
||||
--total-chunks=${TOTAL_CHUNKS:=1} \
|
||||
tests/python/gaia-ui-tests/gaiatest/tests/$SUITE/manifest.ini
|
||||
|
||||
ls -lah artifacts
|
||||
3
gaia/tests/ci/jshint/script
Executable file
3
gaia/tests/ci/jshint/script
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/bash -vex
|
||||
|
||||
make hint
|
||||
3
gaia/tests/ci/jsmarionette_unit_tests/script
Executable file
3
gaia/tests/ci/jsmarionette_unit_tests/script
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/bash -vex
|
||||
|
||||
make jsmarionette-unit-tests
|
||||
3
gaia/tests/ci/jsonlint/script
Executable file
3
gaia/tests/ci/jsonlint/script
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/bash -vex
|
||||
|
||||
make jsonlint
|
||||
2
gaia/tests/ci/linters/install
Executable file
2
gaia/tests/ci/linters/install
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#! /bin/bash -ve
|
||||
easy_install http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz
|
||||
2
gaia/tests/ci/linters/script
Executable file
2
gaia/tests/ci/linters/script
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#! /bin/bash -v
|
||||
make lint
|
||||
7
gaia/tests/ci/marionette_js/install
Executable file
7
gaia/tests/ci/marionette_js/install
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#! /bin/bash -ve
|
||||
|
||||
echo "Downloading Mulet"
|
||||
make mulet
|
||||
|
||||
# Install virtualenv and radicale on Travis.
|
||||
make caldav-server-install
|
||||
3
gaia/tests/ci/marionette_js/script
Executable file
3
gaia/tests/ci/marionette_js/script
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/bash -vex
|
||||
|
||||
make test-integration
|
||||
10
gaia/tests/ci/marionette_js_stable_check/install
Executable file
10
gaia/tests/ci/marionette_js_stable_check/install
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#! /bin/bash -ve
|
||||
|
||||
echo "Downloading Mulet"
|
||||
make mulet
|
||||
|
||||
# Install virtualenv and radicale on Travis.
|
||||
make caldav-server-install
|
||||
|
||||
echo "Building test profile"
|
||||
PROFILE_FOLDER=profile-test make
|
||||
75
gaia/tests/ci/marionette_js_stable_check/pull-request-marionette-test.js
Executable file
75
gaia/tests/ci/marionette_js_stable_check/pull-request-marionette-test.js
Executable file
|
|
@ -0,0 +1,75 @@
|
|||
'use strict';
|
||||
/* global require, process */
|
||||
|
||||
var fs = require('fs'),
|
||||
request = require('request');
|
||||
|
||||
var PULL_REQUEST_URL_PATTERN =
|
||||
'https://api.github.com/repos/mozilla-b2g/gaia/pulls/[id]/files',
|
||||
MARIONETTE_TEST_FILE_NAME_PATTERN =
|
||||
/apps\/[a-z]+\/test\/marionette\/[\w\/]+_test.js/;
|
||||
|
||||
/**
|
||||
* Get file name list of marionette test in the current pull request on Travis.
|
||||
*/
|
||||
var PullRequestMarionetteTest = (function() {
|
||||
/**
|
||||
* Get files in a pull request.
|
||||
*
|
||||
* @param {String|Number} id The pull request id.
|
||||
* @param {Function} callback Function with the pull request files array.
|
||||
*/
|
||||
function getPullRequestFiles(id, callback) {
|
||||
// Configure the request
|
||||
var options = {
|
||||
url: PULL_REQUEST_URL_PATTERN.replace('[id]', id),
|
||||
method: 'GET',
|
||||
headers: { 'User-Agent': 'FirefoxOS-Gaia-Travis' }
|
||||
};
|
||||
|
||||
request(options, function(error, response, body) {
|
||||
if (!error && response.statusCode == 200) {
|
||||
var json = JSON.parse(body),
|
||||
fileNames = [];
|
||||
|
||||
json.forEach(function(file) {
|
||||
fileNames.push(file.filename);
|
||||
});
|
||||
if (callback && typeof(callback) === 'function') {
|
||||
callback(fileNames);
|
||||
}
|
||||
} else {
|
||||
throw new Error('Cannot access GitHub API.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Main function.
|
||||
function execute() {
|
||||
// Pull request ID for the current Travis job.
|
||||
var pullRequestId = process.env.TRAVIS_PULL_REQUEST;
|
||||
|
||||
getPullRequestFiles(pullRequestId, function(fileNames) {
|
||||
var testFileNames = [],
|
||||
returnString = '';
|
||||
|
||||
testFileNames = fileNames.filter(function(filename) {
|
||||
// Get the marionette test file list in the patch.
|
||||
if (filename.match(MARIONETTE_TEST_FILE_NAME_PATTERN) &&
|
||||
fs.existsSync(filename)) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (testFileNames.length > 0) {
|
||||
returnString = testFileNames.toString().split(',').join(' ');
|
||||
}
|
||||
console.log(returnString);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
execute: execute
|
||||
};
|
||||
})();
|
||||
|
||||
PullRequestMarionetteTest.execute();
|
||||
33
gaia/tests/ci/marionette_js_stable_check/script
Executable file
33
gaia/tests/ci/marionette_js_stable_check/script
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#! /bin/bash -v
|
||||
|
||||
###############################################################################
|
||||
# For having stable marionette tests, #
|
||||
# we run specfic marionette tests for 30 times on Travis. #
|
||||
###############################################################################
|
||||
|
||||
MARIONETTE_TEST_FILE_NAMES=$(node tests/ci/marionette_js_stable_check/pull-request-marionette-test)
|
||||
|
||||
if [ ${#MARIONETTE_TEST_FILE_NAMES} -gt 0 ]; then
|
||||
TEST_RESULT=0
|
||||
MAKE_BUILD="PROFILE_FOLDER=profile-test make"
|
||||
RUN_SPECIFIC_TESTS="make test-integration-test TEST_FILES=\"$MARIONETTE_TEST_FILE_NAMES\" REPORTER=spec"
|
||||
|
||||
# We only build once
|
||||
eval ${MAKE_BUILD}
|
||||
|
||||
# Then we would run tests for six times
|
||||
for i in {1..6}
|
||||
do
|
||||
eval ${RUN_SPECIFIC_TESTS}
|
||||
if [ $? -ne 0 ]; then
|
||||
TEST_RESULT=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $TEST_RESULT -eq 1 ]; then
|
||||
echo "The marionette tests are not passed for 6 times continually."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "The pull request has no marionette test to run."
|
||||
fi
|
||||
5
gaia/tests/ci/s3upload/after_script
Executable file
5
gaia/tests/ci/s3upload/after_script
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#! /bin/bash -ve
|
||||
gem install travis-artifacts
|
||||
travis-artifacts upload --path artifacts/
|
||||
echo "Uploaded to:"
|
||||
echo "http://$ARTIFACTS_S3_BUCKET.s3.amazonaws.com/artifacts/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER/iupload.txt$"
|
||||
4
gaia/tests/ci/s3upload/script
Executable file
4
gaia/tests/ci/s3upload/script
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#! /bin/bash -e
|
||||
|
||||
mkdir -p artifacts
|
||||
echo "upload me" > artifacts/iupload.txt
|
||||
33
gaia/tests/ci/unit-tests-coverage/before_script
Executable file
33
gaia/tests/ci/unit-tests-coverage/before_script
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#! /bin/bash -v
|
||||
|
||||
# not using -e here because we use code failure for other things here.
|
||||
RETRY=30
|
||||
myself=`basename $0`
|
||||
|
||||
log() {
|
||||
echo "LOG $myself: $@"
|
||||
}
|
||||
|
||||
waiting_port() {
|
||||
log "Waiting for embedded httpd server on port $1..."
|
||||
for i in $(seq 1 $RETRY); do
|
||||
nc -z localhost $1
|
||||
if [ $? -eq 0 ]; then
|
||||
log "Success!"
|
||||
return
|
||||
fi
|
||||
log "Waited $i seconds."
|
||||
sleep 1
|
||||
done
|
||||
log "Failed :("
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "Starting test-agent-server"
|
||||
make test-agent-server &
|
||||
|
||||
echo 'Starting Firefox'
|
||||
|
||||
FIREFOX=`find firefox -name "firefox" | tail -n 1`
|
||||
$FIREFOX -profile `pwd`/profile-debug "http://test-agent.gaiamobile.org:8080" > /dev/null 2>&1 &
|
||||
waiting_port 8080
|
||||
12
gaia/tests/ci/unit-tests-coverage/install
Executable file
12
gaia/tests/ci/unit-tests-coverage/install
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#! /bin/bash -ve
|
||||
echo 'Downloading Firefox'
|
||||
./node_modules/.bin/mozilla-download --product firefox \
|
||||
--channel tinderbox \
|
||||
--branch mozilla-central \
|
||||
$PWD/firefox
|
||||
|
||||
echo 'Downloading & installing node dependencies'
|
||||
make common-install
|
||||
|
||||
echo 'Downloading xulrunner-sdk and making profile for testing (more than 5 minutes)'
|
||||
DEBUG=1 DESKTOP=0 WGET_OPTS=-nv make
|
||||
3
gaia/tests/ci/unit-tests-coverage/script
Executable file
3
gaia/tests/ci/unit-tests-coverage/script
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/bash -v
|
||||
|
||||
make test-agent-test REPORTER=Min COVERAGE=1
|
||||
45
gaia/tests/ci/unit-tests-in-b2g/before_script
Executable file
45
gaia/tests/ci/unit-tests-in-b2g/before_script
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
#! /bin/bash -v
|
||||
|
||||
# not using -e here because we use code failure for other things here.
|
||||
RETRY=30
|
||||
myself=`basename $0`
|
||||
|
||||
log() {
|
||||
echo "LOG $myself: $@"
|
||||
}
|
||||
|
||||
waiting_port() {
|
||||
log "Waiting for embedded httpd server on port $1..."
|
||||
for i in $(seq 1 $RETRY); do
|
||||
nc -z localhost $1
|
||||
if [ $? -eq 0 ]; then
|
||||
log "Success!"
|
||||
return
|
||||
fi
|
||||
log "Waited $i seconds."
|
||||
sleep 1
|
||||
done
|
||||
log "Failed :("
|
||||
exit 1
|
||||
}
|
||||
|
||||
make node_modules
|
||||
|
||||
echo "Starting test-agent-server"
|
||||
make test-agent-server &
|
||||
|
||||
echo 'Starting Mulet'
|
||||
|
||||
MULET_PATH="./firefox/firefox-bin"
|
||||
if [ ! -x "$MULET_PATH" ] ; then
|
||||
# set the path for Mac OS X
|
||||
MULET_PATH="./firefox/Contents/MacOS/firefox-bin"
|
||||
fi
|
||||
|
||||
# if we still don't have it, fail
|
||||
if [ ! -x "$MULET_PATH" ] ; then
|
||||
echo "mulet path doesn't exists"
|
||||
exit 1
|
||||
fi
|
||||
$MULET_PATH -profile `pwd`/profile-debug app://test-agent.gaiamobile.org/ &
|
||||
waiting_port 8080
|
||||
9
gaia/tests/ci/unit-tests-in-b2g/install
Executable file
9
gaia/tests/ci/unit-tests-in-b2g/install
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#! /bin/bash -ve
|
||||
echo 'Downloading Mulet'
|
||||
make mulet
|
||||
|
||||
echo 'Downloading & installing node dependencies'
|
||||
make common-install
|
||||
|
||||
echo 'Downloading xulrunner-sdk and making profile for testing (more than 5 minutes)'
|
||||
NO_LOCK_SCREEN=1 DEBUG=1 DESKTOP=0 WGET_OPTS=-nv make
|
||||
7
gaia/tests/ci/unit-tests-in-b2g/script
Executable file
7
gaia/tests/ci/unit-tests-in-b2g/script
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#! /bin/bash -vex
|
||||
|
||||
./node_modules/test-agent/bin/js-test-agent test \
|
||||
--this-chunk=${THIS_CHUNK:=1} \
|
||||
--total-chunks=${TOTAL_CHUNKS:=1} \
|
||||
--server ws://localhost:8789 \
|
||||
--reporter ${REPORTER:=spec}
|
||||
33
gaia/tests/ci/unit-tests-in-firefox/before_script
Executable file
33
gaia/tests/ci/unit-tests-in-firefox/before_script
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#! /bin/bash -v
|
||||
|
||||
# not using -e here because we use code failure for other things here.
|
||||
RETRY=30
|
||||
myself=`basename $0`
|
||||
|
||||
log() {
|
||||
echo "LOG $myself: $@"
|
||||
}
|
||||
|
||||
waiting_port() {
|
||||
log "Waiting for embedded httpd server on port $1..."
|
||||
for i in $(seq 1 $RETRY); do
|
||||
nc -z localhost $1
|
||||
if [ $? -eq 0 ]; then
|
||||
log "Success!"
|
||||
return
|
||||
fi
|
||||
log "Waited $i seconds."
|
||||
sleep 1
|
||||
done
|
||||
log "Failed :("
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "Starting test-agent-server"
|
||||
make test-agent-server &
|
||||
|
||||
echo 'Starting Firefox'
|
||||
|
||||
FIREFOX=`find firefox -name "firefox" | tail -n 1`
|
||||
$FIREFOX -profile `pwd`/profile-debug "app://test-agent.gaiamobile.org" &
|
||||
waiting_port 8080
|
||||
14
gaia/tests/ci/unit-tests-in-firefox/install
Executable file
14
gaia/tests/ci/unit-tests-in-firefox/install
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#! /bin/bash -ve
|
||||
make node_modules
|
||||
|
||||
echo 'Downloading Firefox'
|
||||
DEBUG=* ./node_modules/.bin/mozilla-download --product firefox \
|
||||
--channel tinderbox \
|
||||
--branch mozilla-central \
|
||||
$PWD/firefox
|
||||
|
||||
echo 'Downloading & installing node dependencies'
|
||||
make common-install
|
||||
|
||||
echo 'Downloading xulrunner-sdk and making profile for testing (more than 5 minutes)'
|
||||
DEBUG=1 DESKTOP=0 WGET_OPTS=-nv make
|
||||
3
gaia/tests/ci/unit-tests-in-firefox/script
Executable file
3
gaia/tests/ci/unit-tests-in-firefox/script
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/bash -v
|
||||
|
||||
make test-agent-test REPORTER=Dot
|
||||
30
gaia/tests/ci/venv.sh
Executable file
30
gaia/tests/ci/venv.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#! /bin/bash -e
|
||||
|
||||
# using a venv avoids the need for any root weirdness and makes it somewhat easy
|
||||
# to replicate this setup locally. Original script taken from the gaia-ui-tests
|
||||
# install.
|
||||
|
||||
DIR_TEST_ENV=$PWD/ci_venv
|
||||
VERSION_VIRTUALENV=1.11
|
||||
URL_VIRTUALENV=https://pypi.python.org/packages/source/v/virtualenv/virtualenv-${VERSION_VIRTUALENV}.tar.gz
|
||||
|
||||
setup_venv() {
|
||||
echo "creating virtual environment"
|
||||
if type virtualenv >/dev/null 2>&1; then
|
||||
virtualenv $DIR_TEST_ENV
|
||||
else
|
||||
echo "downloading virtualenv from ${URL_VIRTUALENV}"
|
||||
curl -O ${URL_VIRTUALENV}
|
||||
tar xvfz virtualenv-${VERSION_VIRTUALENV}.tar.gz
|
||||
python virtualenv-${VERSION_VIRTUALENV}/virtualenv.py ${DIR_TEST_ENV}
|
||||
fi
|
||||
|
||||
source $DIR_TEST_ENV/bin/activate
|
||||
}
|
||||
|
||||
if [ "$VIRTUAL_ENV" != "$DIR_TEST_ENV" ]
|
||||
then
|
||||
# don't rerun virutal env if already in the right venv
|
||||
setup_venv
|
||||
fi
|
||||
|
||||
Loading…
Reference in a new issue