Opened 5 years ago

Closed 5 years ago

#14185 closed defect (fixed)

Make src/test/test-network.sh and friends handle out-of-tree builds

Reported by: teor Owned by:
Priority: Medium Milestone:
Component: Core Tor/Tor Version: Tor: 0.2.6.2-alpha
Severity: Keywords: easy chutney
Cc: nickm, weasel Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by teor)

Make src/test/test-network.sh handle out-of-tree builds by removing the assumption that we will always be in the tor directory when building.

Add code to src/test/test-network.sh like:

TOR_PATH="`dirname $0`/../or/tor"

A similar change was made to src/test/zero_length_keys.sh in #13111.

Review other scripts to see if they have the same issue.

Child Tickets

Change History (5)

comment:1 Changed 5 years ago by teor

Description: modified (diff)

teor needs to learn to count to 3 {'s

comment:2 Changed 5 years ago by nickm

I think that's backwards; the scripts should be fine as they stand. Instead, they need to get invoked differently from the makefile, using $(top_srcdir).

To test out-of-tree builds, do "make distclean" on a tor checkout, and then in a different directory, say "$path_to_tor_dir/configure" and then make

comment:3 Changed 5 years ago by teor

Status: newneeds_revision

I see.

Do we need to use $(top_srcdir) twice in these lines:

        ./src/test/test-bt-cl assert | $(PYTHON) $(top_srcdir)/src/test/bt_test.py
        ./src/test/test-bt-cl crash | $(PYTHON) $(top_srcdir)/src/test/bt_test.py

Becomes:

        $(top_srcdir)/src/test/test-bt-cl assert | $(PYTHON) $(top_srcdir)/src/test/bt_test.py
        $(top_srcdir)/src/test/test-bt-cl crash | $(PYTHON) $(top_srcdir)/src/test/bt_test.py

comment:4 Changed 5 years ago by nickm

No, because test-bt-cl isn't from the source; it's a generated file, and is therefore relative to the cwd.

comment:5 Changed 5 years ago by teor

Resolution: fixed
Status: needs_revisionclosed

Well, I think you fixed all these as part of the latest patch in #13111 then.

Note: See TracTickets for help on using tickets.