Skip to content

Commit 2d13f41

Browse files
committed
---
yaml --- r: 3478 b: refs/heads/master c: afabde1 h: refs/heads/master v: v3
1 parent eca40e1 commit 2d13f41

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: a82aeb7af6be8968c7575635283790a73b874118
2+
refs/heads/master: afabde19dcdae41fa60df37b4aa049f4dfe6ee5f

trunk/mk/tests.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ stage2/lib/$(FT_LIB): test/$(FT).rc $(SREQ2)
206206
@$(call E, compile_and_link: $@)
207207
$(STAGE2) --shared -o $@ $<
208208

209-
test/$(FT_DRIVER): test/$(FT_DRIVER).rs stage2/lib/$(FT_LIB) $(SREQ2)
209+
test/$(FT_DRIVER)$(X): test/$(FT_DRIVER).rs stage2/lib/$(FT_LIB) $(SREQ2)
210210
@$(call E, compile_and_link: $@)
211211
$(STAGE2) -o $@ $<
212212

213-
test/$(FT_DRIVER).out: test/$(FT_DRIVER) $(SREQ2)
213+
test/$(FT_DRIVER).out: test/$(FT_DRIVER)$(X) $(SREQ2)
214214
$(Q)$(call CFG_RUN_TEST, $<) | tee $@
215215

216216

trunk/src/comp/front/eval.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,11 @@ fn eval_crate_directive(ctx cx, env e, @ast::crate_directive cdir, str prefix,
285285
case (some(?f)) { file_path = f; }
286286
case (none) { }
287287
}
288-
auto full_path = prefix + std::fs::path_sep() + file_path;
288+
auto full_path = if (std::fs::path_is_absolute(file_path)) {
289+
file_path
290+
} else {
291+
prefix + std::fs::path_sep() + file_path
292+
};
289293
if (cx.mode == mode_depend) { cx.deps += [full_path]; ret; }
290294
auto p0 =
291295
new_parser(cx.sess, e, full_path, cx.chpos,
@@ -306,7 +310,11 @@ fn eval_crate_directive(ctx cx, env e, @ast::crate_directive cdir, str prefix,
306310
case (ast::cdir_dir_mod(?id, ?dir_opt, ?cdirs, ?attrs)) {
307311
auto path = id;
308312
alt (dir_opt) { case (some(?d)) { path = d; } case (none) { } }
309-
auto full_path = prefix + std::fs::path_sep() + path;
313+
auto full_path = if (std::fs::path_is_absolute(path)) {
314+
path
315+
} else {
316+
prefix + std::fs::path_sep() + path
317+
};
310318
auto m0 = eval_crate_directives_to_mod(cx, e, cdirs, full_path);
311319
auto i = @rec(ident=id,
312320
attrs=attrs,

trunk/src/etc/combine-tests.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def scrub(b):
1717
raise Exception("missing env var CFG_SRC_DIR")
1818

1919
run_pass = os.path.join(src_dir, "src", "test", "run-pass")
20+
run_pass = os.path.abspath(run_pass)
2021
stage2_tests = []
2122
take_args = {}
2223

@@ -32,17 +33,13 @@ def scrub(b):
3233

3334
stage2_tests.sort()
3435

35-
# add a .. prefix because we're about to write down into test/..
36-
parent_run_pass = os.path.join("..", run_pass);
37-
38-
3936
c = open("test/run_pass_stage2.rc", "w")
4037
i = 0
4138
c.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
4239
c.write("#[link(name=\"run_pass_stage2\", vers=\"0.1\")];\n")
4340
for t in stage2_tests:
4441
c.write("mod t_%d = \"%s\";\n"
45-
% (i, os.path.join(parent_run_pass, t)))
42+
% (i, os.path.join(run_pass, t)))
4643
i += 1
4744
c.close()
4845

0 commit comments

Comments
 (0)