Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
59 lines (49 loc) · 1.83 KB

File metadata and controls

executable file
·
59 lines (49 loc) · 1.83 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash -ex
cd "`dirname $0`"
# dummy Jetpack addon that contains tests
TEST_ADDON_PATH=./https-everywhere-tests/
LATEST_SDK_VERSION=1.16
# We'll create a Firefox profile here and install HTTPS Everywhere into it.
PROFILE_DIRECTORY="$(mktemp -d)"
trap 'rm -r "$PROFILE_DIRECTORY"' EXIT
HTTPSE_INSTALL_DIRECTORY=$PROFILE_DIRECTORY/extensions/https-everywhere@eff.org
# Build the XPI to run all the validations in makexpi.sh, and to ensure that
# we test what is actually getting built.
./makexpi.sh
XPI_NAME="pkg/`ls -tr pkg/ | tail -1`"
# Set up a skeleton profile and then install into it.
# The skeleton contains a few files required to trick Firefox into thinking
# that the extension was fully installed rather than just unpacked.
rsync -a https-everywhere-tests/test_profile_skeleton/ $PROFILE_DIRECTORY
unzip -qd $HTTPSE_INSTALL_DIRECTORY $XPI_NAME
if [ ! -d "$TEST_ADDON_PATH" ]; then
echo "Test addon path does not exist"
exit 1
fi
if [ ! -d "$PROFILE_DIRECTORY" ]; then
echo "Firefox profile directory does not exist"
exit 1
fi
if [ ! -d "$HTTPSE_INSTALL_DIRECTORY" ]; then
echo "Firefox profile does not have HTTPS Everywhere installed"
exit 1
fi
if ! type cfx > /dev/null; then
echo "Please activate the Firefox Addon SDK before running this script."
echo "https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-1.16.tar.gz"
echo "Unpack and run 'cd addon-adk-1.16; source bin/activate'"
exit 1
fi
if ! cfx --version | grep -q "$LATEST_SDK_VERSION"; then
echo "Please use the latest stable SDK version or edit this script to the current version."
exit 1
fi
cd $TEST_ADDON_PATH
# If you just want to run Firefox with the latest code:
if [ "$1" == "--justrun" ]; then
echo "running firefox"
firefox -profile "$PROFILE_DIRECTORY"
else
echo "running tests"
cfx test --profiledir="$PROFILE_DIRECTORY" --verbose
fi
Morty Proxy This is a proxified and sanitized view of the page, visit original site.