Skip to content

Instantly share code, notes, and snippets.

@diracdeltas
Created June 27, 2014 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diracdeltas/1435f77aab64666b5c34 to your computer and use it in GitHub Desktop.
Save diracdeltas/1435f77aab64666b5c34 to your computer and use it in GitHub Desktop.
sample test script for https everywhere
#!/bin/bash
set -e
# should be the root of the HTTPS E git repo
cd "`dirname $0`"
# path to a dummy Jetpack addon that contains HTTPS-E tests
TEST_ADDON_PATH=../privacybadgerfirefox/
# remember to change this when new version is released
LATEST_SDK_VERSION=1.16
# profile that has HTTPS Everywhere installed
PROFILE_DIRECTORY=/tmp/test_profile
if ! type cfx > /dev/null; then
echo "Please activate the Firefox Addon SDK before running this script."
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
echo "running tests"
cfx test --profiledir=$PROFILE_DIRECTORY --verbose 2> /tmp/test_results.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment