diff options
Diffstat (limited to 'scripts/ci/ci-driver.sh')
-rwxr-xr-x | scripts/ci/ci-driver.sh | 75 |
1 files changed, 53 insertions, 22 deletions
diff --git a/scripts/ci/ci-driver.sh b/scripts/ci/ci-driver.sh index 6ab8b67a77..15eab04d41 100755 --- a/scripts/ci/ci-driver.sh +++ b/scripts/ci/ci-driver.sh @@ -37,6 +37,7 @@ ALL_BUGS_ARE_FATAL="${ALL_BUGS_ARE_FATAL:-no}" DISABLE_DIRAUTH="${DISABLE_DIRAUTH:-no}" DISABLE_RELAY="${DISABLE_RELAY:-no}" NSS="${NSS:-no}" +GPL="${GPL:-no}" # Options for which tests to run. All should be yes/no. CHECK="${CHECK:-yes}" @@ -200,6 +201,7 @@ yes_or_no ALL_BUGS_ARE_FATAL yes_or_no DISABLE_DIRAUTH yes_or_no DISABLE_RELAY yes_or_no NSS +yes_or_no GPL yes_or_no RUN_STAGE_CONFIGURE yes_or_no RUN_STAGE_BUILD @@ -262,6 +264,9 @@ fi if [[ "$NSS" == "yes" ]]; then configure_options+=("--enable-nss") fi +if [[ "$GPL" == "yes" ]]; then + configure_options+=("--enable-gpl") +fi ############################################################################# # Tell the user about our versions of different tools and packages. @@ -285,6 +290,24 @@ fi TOR_VERSION=$(grep -m 1 AC_INIT "${CI_SRCDIR}"/configure.ac | sed -e 's/.*\[//; s/\].*//;') +# Use variables like these when we need to behave differently depending on +# Tor version. Only create the variables we need. +TOR_VER_AT_LEAST_043=no +TOR_VER_AT_LEAST_044=no + +# These are the currently supported Tor versions; no need to work with anything +# ancient in this script. +case "$TOR_VERSION" in + 0.4.7.*) + TOR_VER_AT_LEAST_043=yes + TOR_VER_AT_LEAST_044=yes + ;; + 0.4.8.*) + TOR_VER_AT_LEAST_043=yes + TOR_VER_AT_LEAST_044=yes + ;; +esac + ############################################################################# # Make sure the directories are all there. @@ -376,10 +399,14 @@ FAILED_TESTS="" if [[ "${DOXYGEN}" = 'yes' ]]; then start_section Doxygen - if runcmd make doxygen; then - hooray "make doxygen has succeeded." + if [[ "${TOR_VER_AT_LEAST_043}" = 'yes' ]]; then + if runcmd make doxygen; then + hooray "make doxygen has succeeded." + else + FAILED_TESTS="${FAILED_TESTS} doxygen" + fi else - FAILED_TESTS="${FAILED_TESTS} doxygen" + skipping "make doxygen: doxygen is broken for Tor < 0.4.3" fi end_section Doxygen fi @@ -431,26 +458,30 @@ if [[ "${STEM}" = "yes" ]]; then # 0.3.5 and onward have now disabled onion service v2 so we need to exclude # these Stem tests from now on. EXCLUDE_TESTS="--exclude-test control.controller.test_ephemeral_hidden_services_v2 --exclude-test control.controller.test_hidden_services_conf --exclude-test control.controller.test_with_ephemeral_hidden_services_basic_auth --exclude-test control.controller.test_without_ephemeral_hidden_services --exclude-test control.controller.test_with_ephemeral_hidden_services_basic_auth_no_credentials --exclude-test control.controller.test_with_detached_ephemeral_hidden_services --exclude-test control.controller.test_with_invalid_ephemeral_hidden_service_port --exclude-test control.controller.test_ephemeral_hidden_services_v3" - # XXXX This should probably be part of some test-stem make target. - - # Disable the check around EXCLUDE_TESTS that requires double quote. We - # need it to be expanded. - # shellcheck disable=SC2086 - if runcmd timelimit -p -t 520 -s USR1 -T 30 -S ABRT \ - python3 "${STEM_PATH}/run_tests.py" \ - --tor src/app/tor \ - --integ --test control.controller \ - $EXCLUDE_TESTS \ - --test control.base_controller \ - --test process \ - --log TRACE \ - --log-file stem.log ; then - hooray "Stem tests have succeeded" + if [[ "${TOR_VER_AT_LEAST_044}" = 'yes' ]]; then + # XXXX This should probably be part of some test-stem make target. + + # Disable the check around EXCLUDE_TESTS that requires double quote. We + # need it to be expanded. + # shellcheck disable=SC2086 + if runcmd timelimit -p -t 520 -s USR1 -T 30 -S ABRT \ + python3 "${STEM_PATH}/run_tests.py" \ + --tor src/app/tor \ + --integ --test control.controller \ + $EXCLUDE_TESTS \ + --test control.base_controller \ + --test process \ + --log TRACE \ + --log-file stem.log ; then + hooray "Stem tests have succeeded" + else + error "Stem output:" + runcmd tail -1000 "${STEM_PATH}"/test/data/tor_log + runcmd grep -v "SocketClosed" stem.log | tail -1000 + FAILED_TESTS="${FAILED_TESTS} stem" + fi else - error "Stem output:" - runcmd tail -1000 "${STEM_PATH}"/test/data/tor_log - runcmd grep -v "SocketClosed" stem.log | tail -1000 - FAILED_TESTS="${FAILED_TESTS} stem" + skipping "Stem: broken with <= 0.4.3. See bug tor#40077" fi end_section "Stem" fi |