[tor-commits] [chutney/master] Check for src/app and src/or, and fail if they are both present

teor at torproject.org teor at torproject.org
Wed Aug 29 11:00:50 UTC 2018


commit de5b491b4b81c14bf3800da88952cfe7e550da0a
Author: teor <teor at torproject.org>
Date:   Wed Aug 29 20:57:46 2018 +1000

    Check for src/app and src/or, and fail if they are both present
    
    Otherwise, chutney can easily choose the wrong tor.
    
    Closes 27379.
---
 tools/test-network.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/test-network.sh b/tools/test-network.sh
index 31bf927..b55a737 100755
--- a/tools/test-network.sh
+++ b/tools/test-network.sh
@@ -213,7 +213,11 @@ fi
 
 # Now find the name of the Tor app dir, which changed in Tor 0.3.5
 if [ -d "$TOR_DIR" ]; then
-    if [ -d "$TOR_DIR/src/app" ]; then
+    if [ -d "$TOR_DIR/src/app" -a -d "$TOR_DIR/src/or" ]; then
+        $ECHO "$myname: \$TOR_DIR has a Tor 0.3.5 or later build directory, and a Tor 0.3.4 or earlier build directory"
+        $ECHO "$myname: Please remove $TOR_DIR/src/app or $TOR_DIR/src/or, or set \$CHUTNEY_TOR"
+        exit 1
+    elif [ -d "$TOR_DIR/src/app" ]; then
         $ECHO "$myname: \$TOR_DIR is a Tor 0.3.5 or later build directory"
         TOR_APP_DIR="$TOR_DIR/src/app"
     elif [ -d "$TOR_DIR/src/or" ]; then



More information about the tor-commits mailing list