3
3
//! notably is built via cargo: this means that if your test wants some non-trivial utility, such
4
4
//! as `object` or `wasmparser`, they can be re-exported and be made available through this library.
5
5
6
- // We want to control use declaration ordering and spacing (and preserve use group comments), so
7
- // skip rustfmt on this file.
8
- #![ cfg_attr( rustfmt, rustfmt:: skip) ]
9
6
#![ warn( unreachable_pub) ]
10
7
11
8
mod command;
@@ -22,8 +19,8 @@ pub mod path_helpers;
22
19
pub mod run;
23
20
pub mod scoped_run;
24
21
pub mod string;
25
- pub mod targets;
26
22
pub mod symbols;
23
+ pub mod targets;
27
24
28
25
// Internally we call our fs-related support module as `fs`, but re-export its content as `rfs`
29
26
// to tests to avoid colliding with commonly used `use std::fs;`.
@@ -36,77 +33,56 @@ pub mod rfs {
36
33
}
37
34
38
35
// Re-exports of third-party library crates.
39
- // tidy-alphabetical-start
40
- pub use bstr;
41
- pub use gimli;
42
- pub use libc;
43
- pub use object;
44
- pub use regex;
45
- pub use serde_json;
46
- pub use similar;
47
- pub use wasmparser;
48
- // tidy-alphabetical-end
36
+ pub use { bstr, gimli, libc, object, regex, serde_json, similar, wasmparser} ;
49
37
50
- // Re-exports of external dependencies.
51
- pub use external_deps:: {
52
- cargo, c_build, c_cxx_compiler, clang, htmldocck, llvm, python, rustc, rustdoc
38
+ // Helpers for building names of output artifacts that are potentially target-specific.
39
+ pub use crate :: artifact_names:: {
40
+ bin_name, dynamic_lib_extension, dynamic_lib_name, msvc_import_dynamic_lib_name, rust_lib_name,
41
+ static_lib_name,
53
42
} ;
54
-
55
- // These rely on external dependencies.
56
- pub use c_cxx_compiler:: { Cc , Gcc , cc, cxx, extra_c_flags, extra_cxx_flags, gcc} ;
57
- pub use c_build:: {
43
+ pub use crate :: assertion_helpers:: {
44
+ assert_contains, assert_contains_regex, assert_count_is, assert_dirs_are_equal, assert_equals,
45
+ assert_not_contains, assert_not_contains_regex,
46
+ } ;
47
+ // `diff` is implemented in terms of the [similar] library.
48
+ //
49
+ // [similar]: https://github.com/mitsuhiko/similar
50
+ pub use crate :: diff:: { Diff , diff} ;
51
+ // Panic-on-fail [`std::env::var`] and [`std::env::var_os`] wrappers.
52
+ pub use crate :: env:: { env_var, env_var_os, set_current_dir} ;
53
+ pub use crate :: external_deps:: c_build:: {
58
54
build_native_dynamic_lib, build_native_static_lib, build_native_static_lib_cxx,
59
55
build_native_static_lib_optimized,
60
56
} ;
61
- pub use cargo:: cargo;
62
- pub use clang:: { clang, Clang } ;
63
- pub use htmldocck:: htmldocck;
64
- pub use llvm:: {
65
- llvm_ar, llvm_bcanalyzer, llvm_dis, llvm_dwarfdump, llvm_filecheck, llvm_nm, llvm_objcopy,
66
- llvm_objdump, llvm_profdata, llvm_readobj, LlvmAr , LlvmBcanalyzer , LlvmDis , LlvmDwarfdump ,
67
- LlvmFilecheck , LlvmNm , LlvmObjcopy , LlvmObjdump , LlvmProfdata , LlvmReadobj ,
68
- } ;
69
- pub use python:: python_command;
70
- pub use rustc:: { bare_rustc, rustc, rustc_path, Rustc } ;
71
- pub use rustdoc:: { bare_rustdoc, rustdoc, Rustdoc } ;
72
-
73
- /// [`diff`][mod@diff] is implemented in terms of the [similar] library.
74
- ///
75
- /// [similar]: https://github.com/mitsuhiko/similar
76
- pub use diff:: { diff, Diff } ;
77
-
78
- /// Panic-on-fail [`std::env::var`] and [`std::env::var_os`] wrappers.
79
- pub use env:: { env_var, env_var_os, set_current_dir} ;
80
-
81
- /// Convenience helpers for running binaries and other commands.
82
- pub use run:: { cmd, run, run_fail, run_with_args} ;
83
-
84
- /// Helpers for checking target information.
85
- pub use targets:: {
86
- apple_os, is_aix, is_darwin, is_msvc, is_windows, is_windows_gnu, is_windows_msvc, is_win7, llvm_components_contain,
87
- target, uname,
57
+ // Re-exports of external dependencies.
58
+ pub use crate :: external_deps:: c_cxx_compiler:: {
59
+ Cc , Gcc , cc, cxx, extra_c_flags, extra_cxx_flags, gcc,
88
60
} ;
89
-
90
- /// Helpers for building names of output artifacts that are potentially target-specific.
91
- pub use artifact_names:: {
92
- bin_name, dynamic_lib_extension, dynamic_lib_name, msvc_import_dynamic_lib_name, rust_lib_name,
93
- static_lib_name,
61
+ pub use crate :: external_deps:: cargo:: cargo;
62
+ pub use crate :: external_deps:: clang:: { Clang , clang} ;
63
+ pub use crate :: external_deps:: htmldocck:: htmldocck;
64
+ pub use crate :: external_deps:: llvm:: {
65
+ self , LlvmAr , LlvmBcanalyzer , LlvmDis , LlvmDwarfdump , LlvmFilecheck , LlvmNm , LlvmObjcopy ,
66
+ LlvmObjdump , LlvmProfdata , LlvmReadobj , llvm_ar, llvm_bcanalyzer, llvm_dis, llvm_dwarfdump,
67
+ llvm_filecheck, llvm_nm, llvm_objcopy, llvm_objdump, llvm_profdata, llvm_readobj,
94
68
} ;
95
-
96
- /// Path-related helpers.
97
- pub use path_helpers:: {
69
+ pub use crate :: external_deps:: python:: python_command;
70
+ pub use crate :: external_deps:: rustc:: { self , Rustc , bare_rustc, rustc, rustc_path} ;
71
+ pub use crate :: external_deps:: rustdoc:: { Rustdoc , bare_rustdoc, rustdoc} ;
72
+ // Path-related helpers.
73
+ pub use crate :: path_helpers:: {
98
74
build_root, cwd, filename_contains, filename_not_in_denylist, has_extension, has_prefix,
99
75
has_suffix, not_contains, path, shallow_find_directories, shallow_find_files, source_root,
100
76
} ;
101
-
102
- /// Helpers for scoped test execution where certain properties are attempted to be maintained.
103
- pub use scoped_run:: { run_in_tmpdir, test_while_readonly} ;
104
-
105
- pub use assertion_helpers:: {
106
- assert_contains, assert_contains_regex, assert_count_is, assert_dirs_are_equal, assert_equals,
107
- assert_not_contains, assert_not_contains_regex,
108
- } ;
109
-
110
- pub use string:: {
77
+ // Convenience helpers for running binaries and other commands.
78
+ pub use crate :: run:: { cmd, run, run_fail, run_with_args} ;
79
+ // Helpers for scoped test execution where certain properties are attempted to be maintained.
80
+ pub use crate :: scoped_run:: { run_in_tmpdir, test_while_readonly} ;
81
+ pub use crate :: string:: {
111
82
count_regex_matches_in_files_with_extension, invalid_utf8_contains, invalid_utf8_not_contains,
112
83
} ;
84
+ // Helpers for checking target information.
85
+ pub use crate :: targets:: {
86
+ apple_os, is_aix, is_darwin, is_msvc, is_win7, is_windows, is_windows_gnu, is_windows_msvc,
87
+ llvm_components_contain, target, uname,
88
+ } ;
0 commit comments