File tree Expand file tree Collapse file tree 4 files changed +29
-5
lines changed
Expand file tree Collapse file tree 4 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 33# Build the extension and run a chromium extension with it installed.
44#
55set -o errexit -o xtrace
6+
67cd $( dirname $0 )
8+
79source makecrx.sh
10+ source utils/mktemp.sh
11+
812PROFILE_DIRECTORY=" $( mktemp -d) "
913trap ' rm -r "$PROFILE_DIRECTORY"' EXIT
1014chromium-browser \
Original file line number Diff line number Diff line change 33# Test that all rulesets modified after a certain date have sufficient test
44# coverage, according to the ruleset checker.
55#
6+
67cd $( dirname $0 )
7- TMP=` mktemp`
8+
9+ source utils/mktemp.sh
10+
11+ TMP=" $( mktemp) "
812trap ' rm "$TMP"' EXIT
913if ! [ -d https-everywhere-checker ] ; then
1014 echo " Submodule https-everywhere-checker is missing. Run"
Original file line number Diff line number Diff line change 11#! /bin/bash -ex
22# Run tests for HTTPS Everywhere
33
4- # We have to change to the right directory because this is sometimes invoked
5- # through a symlink in .git/hooks/pre-push.
6- cd $( dirname $( readlink -f $0 ) )
4+ # Get into the project-root. This script may be executed as `test.sh`
5+ # or as .git/hooks/pre-push, so we need to find the directory containing
6+ # test.sh before we can proceed. If $0 is not a symlink, `readlink` will
7+ # print nothing; if it is a symlink it will print the link target.
8+ cd $( dirname $0 ) /$( dirname $( readlink $0 ) )
9+
10+ source utils/mktemp.sh
711
812# dummy Jetpack addon that contains tests
913TEST_ADDON_PATH=./https-everywhere-tests/
@@ -65,4 +69,5 @@ bash test-ruleset-coverage.sh
6569echo " To reproduce this build (https://wiki.debian.org/ReproducibleBuilds)," \
6670 " please use this version of sqlite3:"
6771sqlite3 -version
68- echo -e " Git commit ` git rev-parse HEAD` \nsha256sum ` sha256sum $XPI_NAME ` "
72+ shasum=$( openssl sha -sha256 " $XPI_NAME " )
73+ echo -e " Git commit ` git rev-parse HEAD` \n$shasum "
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ #
3+ # BSD and GNU mktemp have slightly different invocation patterns.
4+ # BSD's needs a -t option specifying a "template." 'everywhere' will
5+ # end up in the temp-folder name, so in the event it doesn't get cleaned
6+ # up, there's some indication of where it originated.
7+
8+ MKTEMP=` which mktemp`
9+ function mktemp() {
10+ $MKTEMP $@ 2> /dev/null || $MKTEMP -t everywhere $@
11+ }
You can’t perform that action at this time.
0 commit comments