Skip to content

Commit 9c3b1cb

Browse files
committed
Resolve LLVM crashing in rustpkg tests
1 parent dc18321 commit 9c3b1cb

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/librusti/rusti.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ mod tests {
541541

542542
#[test]
543543
fn run_all() {
544-
// FIXME(#6511):
544+
// FIXME(#7071):
545545
// By default, unit tests are run in parallel. Rusti, on the other hand,
546546
// does not enjoy doing this. I suspect that it is because the LLVM
547547
// bindings are not thread-safe (when running parallel tests, some tests

src/librustpkg/tests.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,17 @@ fn test_sysroot() -> Path {
114114
}
115115

116116
#[test]
117+
fn test_all() {
118+
// FIXME(#7071): these tests use rustc, so they can't be run in parallel
119+
// until this issue is resolved
120+
test_make_dir_rwx();
121+
test_install_valid();
122+
test_install_invalid();
123+
test_install_url();
124+
test_package_ids_must_be_relative_path_like();
125+
test_package_version();
126+
}
127+
117128
fn test_make_dir_rwx() {
118129
let temp = &os::tmpdir();
119130
let dir = temp.push("quux");
@@ -126,7 +137,6 @@ fn test_make_dir_rwx() {
126137
assert!(os::remove_dir_recursive(&dir));
127138
}
128139

129-
#[test]
130140
fn test_install_valid() {
131141
use path_util::installed_library_in_workspace;
132142

@@ -155,7 +165,6 @@ fn test_install_valid() {
155165
assert!(!os::path_exists(&bench));
156166
}
157167

158-
#[test]
159168
fn test_install_invalid() {
160169
use conditions::nonexistent_package::cond;
161170
use cond1 = conditions::missing_pkg_files::cond;
@@ -178,7 +187,6 @@ fn test_install_invalid() {
178187
assert!(error_occurred && error1_occurred);
179188
}
180189

181-
#[test]
182190
fn test_install_url() {
183191
let workspace = mkdtemp(&os::tmpdir(), "test").expect("couldn't create temp dir");
184192
let sysroot = test_sysroot();
@@ -214,7 +222,6 @@ fn test_install_url() {
214222
assert!(!os::path_exists(&bench));
215223
}
216224

217-
#[test]
218225
fn test_package_ids_must_be_relative_path_like() {
219226
use conditions::bad_pkg_id::cond;
220227

@@ -255,7 +262,6 @@ fn test_package_ids_must_be_relative_path_like() {
255262
256263
}
257264
258-
#[test]
259265
fn test_package_version() {
260266
let temp_pkg_id = PkgId::new("github.com/catamorphism/test_pkg_version");
261267
match temp_pkg_id.version {

0 commit comments

Comments
 (0)