Skip to content

Commit

Permalink
Tests select when to use --cfg debug, regardless of configure settings.
Browse files Browse the repository at this point in the history
Remove directive, if present, from CFG_RUSTC_FLAGS.

Fix #7898.

(One alternative tack is to build up distinct CFG_TEST_RUSTC_FLAGS
alongside CFG_RUSTC_FLAGS; but currently debug is the only --cfg flag
ever added to CFG_RUSTC_FLAGS; the other contents of CFG_RUSTC_FLAGS
are a mix of -Z flags and a few other switches like O, which seem to
make sense to propogate to the tests.)
  • Loading branch information
pnkfelix committed Jul 24, 2013
1 parent 359755a commit 1f92557
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \

# Rules for the cfail/rfail/rpass/bench/perf test runner

# The tests select when to use debug configuration on their own;
# remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
CTEST_RUSTC_FLAGS = $$(subst --cfg debug,,$$(CFG_RUSTC_FLAGS))

CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
--compile-lib-path $$(HLIB$(1)_H_$(3)) \
--run-lib-path $$(TLIB$(1)_T_$(2)_H_$(3)) \
Expand All @@ -548,7 +552,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
--target $(2) \
--adb-path=$(CFG_ADB) \
--adb-test-dir=$(CFG_ADB_TEST_DIR) \
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CFG_RUSTC_FLAGS) --target=$(2)" \
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) --target=$(2)" \
$$(CTEST_TESTARGS)

CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)
Expand Down

5 comments on commit 1f92557

@bors
Copy link
Contributor

@bors bors commented on 1f92557 Jul 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at pnkfelix@1f92557

@bors
Copy link
Contributor

@bors bors commented on 1f92557 Jul 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging pnkfelix/rust/fsk-issue7898-dont-propagate-cfg-debug-to-tests = 1f92557 into auto

@bors
Copy link
Contributor

@bors bors commented on 1f92557 Jul 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnkfelix/rust/fsk-issue7898-dont-propagate-cfg-debug-to-tests = 1f92557 merged ok, testing candidate = b30a16c

@bors
Copy link
Contributor

@bors bors commented on 1f92557 Jul 25, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = b30a16c

Please sign in to comment.