Skip to content

Commit f57a90c

Browse files
committed
---
yaml --- r: 189020 b: refs/heads/tmp c: da03392 h: refs/heads/master v: v3
1 parent 47d2596 commit f57a90c

File tree

393 files changed

+2464
-3448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

393 files changed

+2464
-3448
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: bb459bf95b67c482a9ddcba4bca5f8b433444e60
37+
refs/heads/tmp: da03392e1f65f51867c9680fe29972f2e4e3f124
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/tmp/mk/debuggers.mk

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,29 @@ define DEF_INSTALL_DEBUGGER_SCRIPTS_HOST
5656
tmp/install-debugger-scripts$(1)_H_$(2)-gdb.done: \
5757
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
5858
$$(DEBUGGER_BIN_SCRIPTS_GDB_ABS)
59-
$(Q)touch $$@.start_time
6059
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
6160
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
6261
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $$(HBIN$(1)_H_$(2))
6362
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
64-
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
63+
$(Q)touch $$@
6564

6665
tmp/install-debugger-scripts$(1)_H_$(2)-lldb.done: \
6766
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) \
6867
$$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
69-
$(Q)touch $$@.start_time
7068
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
7169
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
7270
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $$(HBIN$(1)_H_$(2))
7371
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
74-
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
72+
$(Q)touch $$@
7573

7674
tmp/install-debugger-scripts$(1)_H_$(2)-all.done: \
7775
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) \
7876
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS)
79-
$(Q)touch $$@.start_time
8077
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
8178
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
8279
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_ALL_ABS) $$(HBIN$(1)_H_$(2))
8380
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
84-
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
81+
$(Q)touch $$@
8582

8683
tmp/install-debugger-scripts$(1)_H_$(2)-none.done:
8784
$(Q)touch $$@
@@ -101,32 +98,29 @@ define DEF_INSTALL_DEBUGGER_SCRIPTS_TARGET
10198
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-gdb.done: \
10299
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
103100
$$(DEBUGGER_BIN_SCRIPTS_GDB_ABS)
104-
$(Q)touch $$@.start_time
105101
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
106102
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
107103
$(Q)install $(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
108104
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
109-
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
105+
$(Q)touch $$@
110106

111107
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-lldb.done: \
112108
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) \
113109
$$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
114-
$(Q)touch $$@.start_time
115110
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
116111
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
117112
$(Q)install $(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
118113
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
119-
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
114+
$(Q)touch $$@
120115

121116
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-all.done: \
122117
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) \
123118
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS)
124-
$(Q)touch $$@.start_time
125119
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
126120
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
127121
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ALL_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
128122
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
129-
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
123+
$(Q)touch $$@
130124

131125
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-none.done:
132126
$(Q)touch $$@

branches/tmp/mk/docs.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,11 @@ compiler-docs: $(COMPILER_DOC_TARGETS)
273273
trpl: doc/book/index.html
274274

275275
doc/book/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md) | doc/
276-
@$(call E, rustbook: $@)
277276
$(Q)rm -rf doc/book
278277
$(Q)$(RUSTBOOK) build $(S)src/doc/trpl doc/book
279278

280279
style: doc/style/index.html
281280

282281
doc/style/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/style/*.md) | doc/
283-
@$(call E, rustbook: $@)
284282
$(Q)rm -rf doc/style
285283
$(Q)$(RUSTBOOK) build $(S)src/doc/style doc/style

branches/tmp/mk/llvm.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ endif
3838
# the stamp in the source dir.
3939
$$(LLVM_STAMP_$(1)): $(S)src/rustllvm/llvm-auto-clean-trigger
4040
@$$(call E, make: cleaning llvm)
41-
$(Q)touch $$@.start_time
4241
$(Q)$(MAKE) clean-llvm$(1)
4342
@$$(call E, make: done cleaning llvm)
44-
touch -r $$@.start_time $$@ && rm $$@.start_time
43+
touch $$@
4544

4645
ifeq ($$(CFG_ENABLE_LLVM_STATIC_STDCPP),1)
4746
LLVM_STDCPP_LOCATION_$(1) = $$(shell $$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \

branches/tmp/mk/target.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
7575
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
7676
| $$(TLIB$(1)_T_$(2)_H_$(3))/
7777
@$$(call E, rustc: $$(@D)/lib$(4))
78-
@touch $$@.start_time
7978
$$(call REMOVE_ALL_OLD_GLOB_MATCHES, \
8079
$$(dir $$@)$$(call CFG_LIB_GLOB_$(2),$(4)))
8180
$$(call REMOVE_ALL_OLD_GLOB_MATCHES, \
@@ -90,7 +89,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
9089
--out-dir $$(@D) \
9190
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
9291
$$<
93-
@touch -r $$@.start_time $$@ && rm $$@.start_time
92+
@touch $$@
9493
$$(call LIST_ALL_OLD_GLOB_MATCHES, \
9594
$$(dir $$@)$$(call CFG_LIB_GLOB_$(2),$(4)))
9695
$$(call LIST_ALL_OLD_GLOB_MATCHES, \

branches/tmp/mk/tests.mk

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,10 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
389389
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
390390
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
391391
@$$(call E, run: $$<)
392-
$$(Q)touch $$@.start_time
393392
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(1),$(2),$(3)) $$(TESTARGS) \
394393
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
395394
$$(call CRATE_TEST_EXTRA_ARGS,$(1),$(2),$(3),$(4)) \
396-
&& touch -r $$@.start_time $$@ && rm $$@.start_time
395+
&& touch $$@
397396
endef
398397

399398
define DEF_TEST_CRATE_RULES_android
@@ -402,7 +401,6 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
402401
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
403402
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
404403
@$$(call E, run: $$< via adb)
405-
$$(Q)touch $$@.start_time
406404
$$(Q)$(CFG_ADB) push $$< $(CFG_ADB_TEST_DIR)
407405
$$(Q)$(CFG_ADB) shell '(cd $(CFG_ADB_TEST_DIR); LD_LIBRARY_PATH=./$(2) \
408406
./$$(notdir $$<) \
@@ -416,7 +414,7 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
416414
@if grep -q "result: ok" tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
417415
then \
418416
rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
419-
touch -r $$@.start_time $$@ && rm $$@.start_time; \
417+
touch $$@; \
420418
else \
421419
rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
422420
exit 101; \
@@ -692,11 +690,10 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
692690
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
693691
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
694692
@$$(call E, run $(4) [$(2)]: $$<)
695-
$$(Q)touch [email protected]_time
696693
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
697694
$$(CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
698695
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
699-
&& touch -r $$@.start_time $$@ && rm [email protected]_time
696+
&& touch $$@
700697

701698
else
702699

@@ -753,11 +750,10 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
753750
$$(PRETTY_DEPS_$(4)) \
754751
$$(PRETTY_DEPS$(1)_H_$(3)_$(4))
755752
@$$(call E, run pretty-rpass [$(2)]: $$<)
756-
$$(Q)touch $$@.start_time
757753
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
758754
$$(PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
759755
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
760-
&& touch -r $$@.start_time $$@ && rm $$@.start_time
756+
&& touch $$@
761757

762758
endef
763759

@@ -803,10 +799,8 @@ endif
803799
ifeq ($(2),$$(CFG_BUILD))
804800
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): $$(DOCTESTDEP_$(1)_$(2)_$(3)_$(4))
805801
@$$(call E, run doc-$(4) [$(2)])
806-
$$(Q)touch $$@.start_time
807802
$$(Q)$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --cfg dox --test $$< \
808-
--test-args "$$(TESTARGS)" && \
809-
touch -r $$@.start_time $$@ && rm $$@.start_time
803+
--test-args "$$(TESTARGS)" && touch $$@
810804
else
811805
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)):
812806
touch $$@
@@ -841,11 +835,9 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-crate-$(4)-exec: \
841835
ifeq ($(2),$$(CFG_BUILD))
842836
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-crate-$(4)): $$(CRATEDOCTESTDEP_$(1)_$(2)_$(3)_$(4))
843837
@$$(call E, run doc-crate-$(4) [$(2)])
844-
$$(Q)touch $$@.start_time
845838
$$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
846839
$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --test --cfg dox \
847-
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && \
848-
touch -r $$@.start_time $$@ && rm $$@.start_time
840+
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && touch $$@
849841
else
850842
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-crate-$(4)):
851843
touch $$@
@@ -992,7 +984,6 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
992984
$$(CSREQ$(1)_T_$(2)_H_$(3))
993985
@rm -rf $(3)/test/run-make/$$*
994986
@mkdir -p $(3)/test/run-make/$$*
995-
$$(Q)touch $$@.start_time
996987
$$(Q)$$(CFG_PYTHON) $(S)src/etc/maketest.py $$(dir $$<) \
997988
$$(MAKE) \
998989
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
@@ -1005,7 +996,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
1005996
"$$(LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3))" \
1006997
$(1) \
1007998
$$(S)
1008-
@touch -r $$@.start_time $$@ && rm [email protected]_time
999+
@touch $$@
10091000
else
10101001
# FIXME #11094 - The above rule doesn't work right for multiple targets
10111002
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec:

branches/tmp/src/compiletest/common.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ pub use self::Mode::*;
1111

1212
use std::fmt;
1313
use std::str::FromStr;
14-
use std::path::PathBuf;
1514

1615
#[derive(Clone, Copy, PartialEq, Debug)]
1716
pub enum Mode {
@@ -69,13 +68,13 @@ pub struct Config {
6968
pub run_lib_path: String,
7069

7170
// The rustc executable
72-
pub rustc_path: PathBuf,
71+
pub rustc_path: Path,
7372

7473
// The clang executable
75-
pub clang_path: Option<PathBuf>,
74+
pub clang_path: Option<Path>,
7675

7776
// The llvm binaries path
78-
pub llvm_bin_path: Option<PathBuf>,
77+
pub llvm_bin_path: Option<Path>,
7978

8079
// The valgrind path
8180
pub valgrind_path: Option<String>,
@@ -85,13 +84,13 @@ pub struct Config {
8584
pub force_valgrind: bool,
8685

8786
// The directory containing the tests to run
88-
pub src_base: PathBuf,
87+
pub src_base: Path,
8988

9089
// The directory where programs should be built
91-
pub build_base: PathBuf,
90+
pub build_base: Path,
9291

9392
// Directory for auxiliary libraries
94-
pub aux_base: PathBuf,
93+
pub aux_base: Path,
9594

9695
// The name of the stage being built (stage1, etc)
9796
pub stage_id: String,
@@ -106,7 +105,7 @@ pub struct Config {
106105
pub filter: Option<String>,
107106

108107
// Write out a parseable log of tests that were run
109-
pub logfile: Option<PathBuf>,
108+
pub logfile: Option<Path>,
110109

111110
// A command line to prefix program execution with,
112111
// for running under valgrind
@@ -134,7 +133,7 @@ pub struct Config {
134133
pub lldb_version: Option<String>,
135134

136135
// Path to the android tools
137-
pub android_cross_path: PathBuf,
136+
pub android_cross_path: Path,
138137

139138
// Extra parameter to run adb on arm-linux-androideabi
140139
pub adb_path: String,

branches/tmp/src/compiletest/compiletest.rs

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
#![feature(test)]
2222
#![feature(unicode)]
2323
#![feature(core)]
24-
#![feature(path)]
25-
#![feature(os)]
26-
#![feature(io)]
27-
#![feature(fs)]
28-
#![feature(net)]
2924

3025
#![deny(warnings)]
3126

@@ -36,9 +31,8 @@ extern crate getopts;
3631
extern crate log;
3732

3833
use std::env;
39-
use std::fs;
4034
use std::old_io;
41-
use std::path::{Path, PathBuf};
35+
use std::old_io::fs;
4236
use std::thunk::Thunk;
4337
use getopts::{optopt, optflag, reqopt};
4438
use common::Config;
@@ -120,9 +114,9 @@ pub fn parse_config(args: Vec<String> ) -> Config {
120114
panic!()
121115
}
122116

123-
fn opt_path(m: &getopts::Matches, nm: &str) -> PathBuf {
117+
fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
124118
match m.opt_str(nm) {
125-
Some(s) => PathBuf::new(&s),
119+
Some(s) => Path::new(s),
126120
None => panic!("no option (=path) found for {}", nm),
127121
}
128122
}
@@ -137,18 +131,18 @@ pub fn parse_config(args: Vec<String> ) -> Config {
137131
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
138132
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
139133
rustc_path: opt_path(matches, "rustc-path"),
140-
clang_path: matches.opt_str("clang-path").map(|s| PathBuf::new(&s)),
134+
clang_path: matches.opt_str("clang-path").map(|s| Path::new(s)),
141135
valgrind_path: matches.opt_str("valgrind-path"),
142136
force_valgrind: matches.opt_present("force-valgrind"),
143-
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::new(&s)),
137+
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| Path::new(s)),
144138
src_base: opt_path(matches, "src-base"),
145139
build_base: opt_path(matches, "build-base"),
146140
aux_base: opt_path(matches, "aux-base"),
147141
stage_id: matches.opt_str("stage-id").unwrap(),
148142
mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"),
149143
run_ignored: matches.opt_present("ignored"),
150144
filter: filter,
151-
logfile: matches.opt_str("logfile").map(|s| PathBuf::new(&s)),
145+
logfile: matches.opt_str("logfile").map(|s| Path::new(s)),
152146
runtool: matches.opt_str("runtool"),
153147
host_rustcflags: matches.opt_str("host-rustcflags"),
154148
target_rustcflags: matches.opt_str("target-rustcflags"),
@@ -282,9 +276,9 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
282276
debug!("making tests from {:?}",
283277
config.src_base.display());
284278
let mut tests = Vec::new();
285-
let dirs = fs::read_dir(&config.src_base).unwrap();
286-
for file in dirs {
287-
let file = file.unwrap().path();
279+
let dirs = fs::readdir(&config.src_base).unwrap();
280+
for file in &dirs {
281+
let file = file.clone();
288282
debug!("inspecting file {:?}", file.display());
289283
if is_test(config, &file) {
290284
let t = make_test(config, &file, || {
@@ -307,7 +301,7 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
307301
_ => vec!(".rc".to_string(), ".rs".to_string())
308302
};
309303
let invalid_prefixes = vec!(".".to_string(), "#".to_string(), "~".to_string());
310-
let name = testfile.file_name().unwrap().to_str().unwrap();
304+
let name = testfile.filename_str().unwrap();
311305

312306
let mut valid = false;
313307

@@ -343,9 +337,9 @@ pub fn make_test_name(config: &Config, testfile: &Path) -> test::TestName {
343337

344338
// Try to elide redundant long paths
345339
fn shorten(path: &Path) -> String {
346-
let filename = path.file_name().unwrap().to_str();
347-
let p = path.parent().unwrap();
348-
let dir = p.file_name().unwrap().to_str();
340+
let filename = path.filename_str();
341+
let p = path.dir_path();
342+
let dir = p.filename_str();
349343
format!("{}/{}", dir.unwrap_or(""), filename.unwrap_or(""))
350344
}
351345

@@ -354,17 +348,19 @@ pub fn make_test_name(config: &Config, testfile: &Path) -> test::TestName {
354348

355349
pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
356350
let config = (*config).clone();
357-
let testfile = testfile.to_path_buf();
351+
// FIXME (#9639): This needs to handle non-utf8 paths
352+
let testfile = testfile.as_str().unwrap().to_string();
358353
test::DynTestFn(Thunk::new(move || {
359-
runtest::run(config, &testfile)
354+
runtest::run(config, testfile)
360355
}))
361356
}
362357

363358
pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
364359
let config = (*config).clone();
365-
let testfile = testfile.to_path_buf();
360+
// FIXME (#9639): This needs to handle non-utf8 paths
361+
let testfile = testfile.as_str().unwrap().to_string();
366362
test::DynMetricFn(box move |mm: &mut test::MetricMap| {
367-
runtest::run_metrics(config, &testfile, mm)
363+
runtest::run_metrics(config, testfile, mm)
368364
})
369365
}
370366

0 commit comments

Comments
 (0)