Opened 6 years ago

Closed 6 years ago

#14185 closed defect (fixed)

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

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

Description (last modified by teor)

Make src/test/ 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/ like:

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

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

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

Child Tickets

Change History (5)

comment:1 Changed 6 years ago by teor

Description: modified (diff)

teor needs to learn to count to 3 {'s

comment:2 Changed 6 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 6 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/
        ./src/test/test-bt-cl crash | $(PYTHON) $(top_srcdir)/src/test/


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

comment:4 Changed 6 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 6 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.