mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Merge branch 'maint-0.3.5' into release-0.3.5
This commit is contained in:
+8
-21
@@ -39,7 +39,7 @@ env:
|
||||
- RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true
|
||||
|
||||
matrix:
|
||||
## include creates builds with gcc, linux, sudo: false
|
||||
## include creates builds with gcc, linux
|
||||
include:
|
||||
## We include a single coverage build with the best options for coverage
|
||||
- env: COVERAGE_OPTIONS="--enable-coverage" HARDENING_OPTIONS=""
|
||||
@@ -70,13 +70,11 @@ matrix:
|
||||
## Careful! We use global envs, which makes it hard to exclude or
|
||||
## allow failures by env:
|
||||
## https://docs.travis-ci.com/user/customizing-the-build#matching-jobs-with-allow_failures
|
||||
allow_failures:
|
||||
## test-stem sometimes hangs on Travis
|
||||
- env: TEST_STEM="yes"
|
||||
|
||||
exclude:
|
||||
## Clang doesn't work in containerized builds, see below.
|
||||
- compiler: clang
|
||||
sudo: false
|
||||
## Non-containerized gcc are slow and redundant.
|
||||
- compiler: gcc
|
||||
sudo: required
|
||||
## gcc on OSX is less useful, because the default compiler is clang.
|
||||
- compiler: gcc
|
||||
os: osx
|
||||
@@ -92,20 +90,6 @@ matrix:
|
||||
## TOR_RUST_DEPENDENCIES is spelt RUST_DEPENDENCIES in 0.3.2
|
||||
env: RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true HARDENING_OPTIONS=""
|
||||
|
||||
## We don't need sudo. (The "apt:" stanza after this allows us to not need
|
||||
## sudo; otherwise, we would need it for getting dependencies.)
|
||||
##
|
||||
## But we use "sudo: required" to force non-containerized builds, working
|
||||
## around a Travis CI environment issue: clang LeakAnalyzer fails
|
||||
## because it requires ptrace and the containerized environment no
|
||||
## longer allows ptrace.
|
||||
## https://github.com/travis-ci/travis-ci/issues/9033
|
||||
##
|
||||
## In the matrix above, we exclude redundant combinations.
|
||||
sudo:
|
||||
- false
|
||||
- required
|
||||
|
||||
## (Linux only) Use the latest Linux image (Ubuntu Trusty)
|
||||
dist: trusty
|
||||
|
||||
@@ -204,6 +188,8 @@ install:
|
||||
- if [[ "$TEST_STEM" != "" ]]; then pushd stem; python -c "from stem import stem; print(stem.__version__);"; git log -1; popd; fi
|
||||
|
||||
script:
|
||||
# Skip test_rebind on macOS
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export TOR_SKIP_TEST_REBIND=true; fi
|
||||
- ./autogen.sh
|
||||
- CONFIGURE_FLAGS="$ASCIIDOC_OPTIONS $COVERAGE_OPTIONS $HARDENING_OPTIONS $MODULES_OPTIONS $NSS_OPTIONS $OPENSSL_OPTIONS $RUST_OPTIONS --enable-fatal-warnings --disable-silent-rules"
|
||||
- echo "Configure flags are $CONFIGURE_FLAGS"
|
||||
@@ -225,6 +211,7 @@ after_failure:
|
||||
## `make distcheck` puts it somewhere different.
|
||||
- if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog || echo "make failed"; fi
|
||||
- if [[ "$DISTCHECK" != "" ]]; then make show-distdir-core || echo "make failed"; fi
|
||||
- if [[ "$TEST_STEM" != "" ]]; then cat "$STEM_SOURCE_DIR"/test/data/tor_log || echo "cat failed"; fi
|
||||
|
||||
before_cache:
|
||||
## Delete all gcov files.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
o Minor bugfixes (testing):
|
||||
- Skip test_rebind when the TOR_SKIP_TEST_REBIND environmental variable is
|
||||
set. Fixes bug 30713; bugfix on 0.3.5.1-alpha.
|
||||
- Skip test_rebind on macOS in Travis, because it is unreliable on
|
||||
macOS on Travis. Fixes bug 30713; bugfix on 0.3.5.1-alpha.
|
||||
@@ -0,0 +1,3 @@
|
||||
o Minor bugfixes (continuous integration):
|
||||
- Allow the test-stem job to fail in Travis, because it sometimes hangs.
|
||||
Fixes bug 30744; bugfix on 0.3.5.4-alpha.
|
||||
@@ -0,0 +1,4 @@
|
||||
o Testing:
|
||||
- Specify torrc paths (with empty files) when launching tor in
|
||||
integration tests; refrain from reading user and system torrcs.
|
||||
Resolves issue 29702.
|
||||
@@ -0,0 +1,3 @@
|
||||
o Minor features (continuous integration):
|
||||
- Remove sudo configuration lines from .travis.yml as they are no longer
|
||||
needed with current Travis build environment. Resolves issue 30213.
|
||||
@@ -0,0 +1,2 @@
|
||||
o Testing (continuous integration):
|
||||
- In Travis, show stem's tor log after failure. Closes ticket 30234.
|
||||
@@ -66,10 +66,11 @@ trap "rm -rf '$DATA_DIR'" 0
|
||||
DATA_DIR=`cd "${DATA_DIR}" && pwd`
|
||||
|
||||
touch "${DATA_DIR}/empty_torrc"
|
||||
touch "${DATA_DIR}/empty_defaults_torrc"
|
||||
|
||||
QUIETLY="--hush"
|
||||
SILENTLY="--quiet"
|
||||
TOR="${TOR_BINARY} --DisableNetwork 1 --ShutdownWaitLength 0 --ORPort 12345 --ExitRelay 0 -f ${DATA_DIR}/empty_torrc --DataDirectory ${DATA_DIR}"
|
||||
TOR="${TOR_BINARY} --DisableNetwork 1 --ShutdownWaitLength 0 --ORPort 12345 --ExitRelay 0 --DataDirectory ${DATA_DIR} -f ${DATA_DIR}/empty_torrc --defaults-torrc ${DATA_DIR}/empty_defaults_torrc"
|
||||
|
||||
##### SETUP
|
||||
#
|
||||
|
||||
@@ -83,10 +83,11 @@ trap "rm -rf '$DATA_DIR'" 0
|
||||
DATA_DIR=`cd "${DATA_DIR}" && pwd`
|
||||
|
||||
touch "${DATA_DIR}/empty_torrc"
|
||||
touch "${DATA_DIR}/empty_defaults_torrc"
|
||||
|
||||
QUIETLY="--hush"
|
||||
SILENTLY="--quiet"
|
||||
TOR="${TOR_BINARY} ${QUIETLY} --DisableNetwork 1 --ShutdownWaitLength 0 --ORPort 12345 --ExitRelay 0 -f ${DATA_DIR}/empty_torrc"
|
||||
TOR="${TOR_BINARY} ${QUIETLY} --DisableNetwork 1 --ShutdownWaitLength 0 --ORPort 12345 --ExitRelay 0 -f ${DATA_DIR}/empty_torrc --defaults-torrc ${DATA_DIR}/empty_defaults_torrc"
|
||||
|
||||
##### SETUP
|
||||
#
|
||||
|
||||
+16
-1
@@ -16,6 +16,10 @@ def fail(msg):
|
||||
logging.error('FAIL')
|
||||
sys.exit(msg)
|
||||
|
||||
def skip(msg):
|
||||
logging.warning('SKIP: {}'.format(msg))
|
||||
sys.exit(77)
|
||||
|
||||
def try_connecting_to_socksport():
|
||||
socks_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
if socks_socket.connect_ex(('127.0.0.1', socks_port)):
|
||||
@@ -65,6 +69,9 @@ if sys.hexversion < 0x02070000:
|
||||
if sys.hexversion > 0x03000000 and sys.hexversion < 0x03010000:
|
||||
fail("ERROR: unsupported Python3 version (should be >= 3.1)")
|
||||
|
||||
if 'TOR_SKIP_TEST_REBIND' in os.environ:
|
||||
skip('$TOR_SKIP_TEST_REBIND is set')
|
||||
|
||||
control_port = pick_random_port()
|
||||
socks_port = pick_random_port()
|
||||
|
||||
@@ -82,13 +89,21 @@ if not os.path.exists(sys.argv[2]):
|
||||
tor_path = sys.argv[1]
|
||||
data_dir = sys.argv[2]
|
||||
|
||||
empty_torrc_path = os.path.join(data_dir, 'empty_torrc')
|
||||
open(empty_torrc_path, 'w').close()
|
||||
empty_defaults_torrc_path = os.path.join(data_dir, 'empty_defaults_torrc')
|
||||
open(empty_defaults_torrc_path, 'w').close()
|
||||
|
||||
tor_process = subprocess.Popen([tor_path,
|
||||
'-DataDirectory', data_dir,
|
||||
'-ControlPort', '127.0.0.1:{}'.format(control_port),
|
||||
'-SOCKSPort', '127.0.0.1:{}'.format(socks_port),
|
||||
'-Log', 'debug stdout',
|
||||
'-LogTimeGranularity', '1',
|
||||
'-FetchServerDescriptors', '0'],
|
||||
'-FetchServerDescriptors', '0',
|
||||
'-f', empty_torrc_path,
|
||||
'--defaults-torrc', empty_defaults_torrc_path,
|
||||
],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
|
||||
|
||||
@@ -27,6 +27,6 @@ elif [ ! -d "$tmpdir" ]; then
|
||||
exit 3
|
||||
fi
|
||||
|
||||
"${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/test_rebind.py" "${TESTING_TOR_BINARY}" "$tmpdir" || exitcode=1
|
||||
"${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/test_rebind.py" "${TESTING_TOR_BINARY}" "$tmpdir"
|
||||
|
||||
exit ${exitcode}
|
||||
exit $?
|
||||
|
||||
@@ -43,10 +43,11 @@ fi
|
||||
trap "rm -rf '$DATA_DIR'" 0
|
||||
|
||||
touch "$DATA_DIR"/empty_torrc
|
||||
touch "$DATA_DIR"/empty_defaults_torrc
|
||||
|
||||
# DisableNetwork means that the ORPort won't actually be opened.
|
||||
# 'ExitRelay 0' suppresses a warning.
|
||||
TOR="${TOR_BINARY} --hush --DisableNetwork 1 --ShutdownWaitLength 0 --ORPort 12345 --ExitRelay 0 -f $DATA_DIR/empty_torrc"
|
||||
TOR="${TOR_BINARY} --hush --DisableNetwork 1 --ShutdownWaitLength 0 --ORPort 12345 --ExitRelay 0 -f $DATA_DIR/empty_torrc --defaults-torrc $DATA_DIR/empty_defaults_torrc"
|
||||
|
||||
if [ -s "$DATA_DIR"/keys/secret_id_key ] && [ -s "$DATA_DIR"/keys/secret_onion_key ] &&
|
||||
[ -s "$DATA_DIR"/keys/secret_onion_key_ntor ]; then
|
||||
|
||||
Reference in New Issue
Block a user