Skip to content

Commit dd80d75

Browse files
authored
test: disable more tests on Mac Intel (#31541)
These tests are now flaky on CI
1 parent 6d55117 commit dd80d75

File tree

2 files changed

+63
-117
lines changed

2 files changed

+63
-117
lines changed

tests/integration/compile_tests.rs

Lines changed: 62 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
// Copyright 2018-2025 the Deno authors. MIT license.
22

3+
// NB(bartlomieju): a bunch of code is not used on Mac Intel
4+
#![allow(dead_code)]
5+
#![allow(unused_imports)]
6+
37
use test_util as util;
48
use util::TestContext;
59
use util::TestContextBuilder;
610
use util::assert_not_contains;
711
use util::testdata_path;
812

9-
#[cfg_attr(
10-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
11-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
12-
)]
13+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
14+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
1315
#[test]
1416
fn compile_basic() {
1517
let context = TestContextBuilder::new().build();
@@ -61,10 +63,8 @@ fn compile_basic() {
6163
output.assert_matches_text("Welcome to Deno!\n");
6264
}
6365

64-
#[cfg_attr(
65-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
66-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
67-
)]
66+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
67+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
6868
#[test]
6969
fn standalone_args() {
7070
let context = TestContextBuilder::new().build();
@@ -96,10 +96,8 @@ fn standalone_args() {
9696
.assert_matches_text("a\nb\nfoo\n--bar\n--unstable\n");
9797
}
9898

99-
#[cfg_attr(
100-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
101-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
102-
)]
99+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
100+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
103101
#[test]
104102
fn standalone_load_datauri() {
105103
let context = TestContextBuilder::new().build();
@@ -128,11 +126,8 @@ fn standalone_load_datauri() {
128126
.assert_matches_text("Hello Deno!\n");
129127
}
130128

131-
// https://github.com/denoland/deno/issues/13704
132-
#[cfg_attr(
133-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
134-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
135-
)]
129+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
130+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
136131
#[test]
137132
fn standalone_follow_redirects() {
138133
let context = TestContextBuilder::new().build();
@@ -278,10 +273,8 @@ fn compile_and_overwrite_file() {
278273
}
279274
}
280275

281-
#[cfg_attr(
282-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
283-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
284-
)]
276+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
277+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
285278
#[test]
286279
fn standalone_runtime_flags() {
287280
let context = TestContextBuilder::new().build();
@@ -318,10 +311,8 @@ fn standalone_runtime_flags() {
318311
);
319312
}
320313

321-
#[cfg_attr(
322-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
323-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
324-
)]
314+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
315+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
325316
#[test]
326317
fn standalone_ext_flag_ts() {
327318
let context = TestContextBuilder::new().build();
@@ -353,10 +344,8 @@ fn standalone_ext_flag_ts() {
353344
.assert_matches_text("executing typescript with no extension\n");
354345
}
355346

356-
#[cfg_attr(
357-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
358-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
359-
)]
347+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
348+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
360349
#[test]
361350
fn standalone_ext_flag_js() {
362351
let context = TestContextBuilder::new().build();
@@ -387,10 +376,8 @@ fn standalone_ext_flag_js() {
387376
.assert_matches_text("executing javascript with no extension\n");
388377
}
389378

390-
#[cfg_attr(
391-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
392-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
393-
)]
379+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
380+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
394381
#[test]
395382
fn standalone_import_map() {
396383
let context = TestContextBuilder::new().build();
@@ -422,10 +409,8 @@ fn standalone_import_map() {
422409
.assert_exit_code(0);
423410
}
424411

425-
#[cfg_attr(
426-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
427-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
428-
)]
412+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
413+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
429414
#[test]
430415
fn standalone_import_map_config_file() {
431416
let context = TestContextBuilder::new().build();
@@ -457,10 +442,8 @@ fn standalone_import_map_config_file() {
457442
.assert_exit_code(0);
458443
}
459444

460-
#[cfg_attr(
461-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
462-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
463-
)]
445+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
446+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
464447
#[test]
465448
// https://github.com/denoland/deno/issues/12670
466449
fn skip_rebundle() {
@@ -540,10 +523,8 @@ fn check_local_by_default2() {
540523
);
541524
}
542525

543-
#[cfg_attr(
544-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
545-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
546-
)]
526+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
527+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
547528
#[test]
548529
fn workers_basic() {
549530
let context = TestContext::with_http_server();
@@ -574,10 +555,8 @@ fn workers_basic() {
574555
.assert_matches_file("./compile/workers/basic.out");
575556
}
576557

577-
#[cfg_attr(
578-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
579-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
580-
)]
558+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
559+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
581560
#[test]
582561
fn workers_not_in_module_map() {
583562
let context = TestContext::with_http_server();
@@ -607,10 +586,8 @@ fn workers_not_in_module_map() {
607586
));
608587
}
609588

610-
#[cfg_attr(
611-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
612-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
613-
)]
589+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
590+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
614591
#[test]
615592
fn workers_with_include_flag() {
616593
let context = TestContext::with_http_server();
@@ -642,10 +619,8 @@ fn workers_with_include_flag() {
642619
.assert_matches_text("Hello from worker!\nReceived 42\nClosing\n");
643620
}
644621

645-
#[cfg_attr(
646-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
647-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
648-
)]
622+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
623+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
649624
#[test]
650625
fn dynamic_import() {
651626
let context = TestContext::with_http_server();
@@ -676,10 +651,8 @@ fn dynamic_import() {
676651
.assert_exit_code(0);
677652
}
678653

679-
#[cfg_attr(
680-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
681-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
682-
)]
654+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
655+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
683656
#[test]
684657
fn dynamic_import_unanalyzable() {
685658
let context = TestContext::with_http_server();
@@ -834,10 +807,8 @@ testing[WILDCARD]this
834807
.assert_matches_text("2\n");
835808
}
836809

837-
#[cfg_attr(
838-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
839-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
840-
)]
810+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
811+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
841812
#[test]
842813
fn compile_npm_bin_esm() {
843814
run_npm_bin_compile_test(RunNpmBinCompileOptions {
@@ -854,10 +825,8 @@ fn compile_npm_bin_esm() {
854825
}
855826

856827
#[test]
857-
#[cfg_attr(
858-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
859-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
860-
)]
828+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
829+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
861830
fn compile_npm_bin_cjs() {
862831
run_npm_bin_compile_test(RunNpmBinCompileOptions {
863832
input_specifier: "npm:@denotest/bin/cli-cjs",
@@ -873,10 +842,8 @@ fn compile_npm_bin_cjs() {
873842
}
874843

875844
#[test]
876-
#[cfg_attr(
877-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
878-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
879-
)]
845+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
846+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
880847
fn compile_npm_cowsay_main() {
881848
run_npm_bin_compile_test(RunNpmBinCompileOptions {
882849
input_specifier: "npm:[email protected]",
@@ -892,10 +859,8 @@ fn compile_npm_cowsay_main() {
892859
}
893860

894861
#[test]
895-
#[cfg_attr(
896-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
897-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
898-
)]
862+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
863+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
899864
fn compile_npm_no_permissions() {
900865
run_npm_bin_compile_test(RunNpmBinCompileOptions {
901866
input_specifier: "npm:@denotest/[email protected]",
@@ -911,10 +876,8 @@ fn compile_npm_no_permissions() {
911876
}
912877

913878
#[test]
914-
#[cfg_attr(
915-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
916-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
917-
)]
879+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
880+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
918881
fn compile_npm_cowsay_explicit() {
919882
run_npm_bin_compile_test(RunNpmBinCompileOptions {
920883
input_specifier: "npm:[email protected]/cowsay",
@@ -930,10 +893,8 @@ fn compile_npm_cowsay_explicit() {
930893
}
931894

932895
#[test]
933-
#[cfg_attr(
934-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
935-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
936-
)]
896+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
897+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
937898
fn compile_npm_cowthink() {
938899
run_npm_bin_compile_test(RunNpmBinCompileOptions {
939900
input_specifier: "npm:[email protected]/cowthink",
@@ -1007,10 +968,8 @@ fn run_npm_bin_compile_test(opts: RunNpmBinCompileOptions) {
1007968
output.assert_matches_file(opts.output_file);
1008969
}
1009970

1010-
#[cfg_attr(
1011-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
1012-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
1013-
)]
971+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
972+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
1014973
#[test]
1015974
fn compile_node_modules_symlink_outside() {
1016975
// this code is using a canonicalized temp dir because otherwise
@@ -1079,10 +1038,8 @@ fn compile_node_modules_symlink_outside() {
10791038
output.assert_matches_file("compile/node_modules_symlink_outside/main.out");
10801039
}
10811040

1082-
#[cfg_attr(
1083-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
1084-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
1085-
)]
1041+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
1042+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
10861043
#[test]
10871044
fn compile_node_modules_symlink_non_existent() {
10881045
let context = TestContextBuilder::for_npm().use_temp_cwd().build();
@@ -1127,10 +1084,8 @@ Embedded Files
11271084
}
11281085

11291086
#[test]
1130-
#[cfg_attr(
1131-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
1132-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
1133-
)]
1087+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
1088+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
11341089
fn dynamic_imports_tmp_lit() {
11351090
let context = TestContextBuilder::new().build();
11361091
let dir = context.temp_dir();
@@ -1155,10 +1110,8 @@ fn dynamic_imports_tmp_lit() {
11551110
}
11561111

11571112
#[test]
1158-
#[cfg_attr(
1159-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
1160-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
1161-
)]
1113+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
1114+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
11621115
fn granular_unstable_features() {
11631116
let context = TestContextBuilder::new().build();
11641117
let dir = context.temp_dir();
@@ -1186,10 +1139,8 @@ fn granular_unstable_features() {
11861139
}
11871140

11881141
#[test]
1189-
#[cfg_attr(
1190-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
1191-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
1192-
)]
1142+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
1143+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
11931144
fn granular_unstable_features_config_file() {
11941145
let context = TestContextBuilder::new().use_temp_cwd().build();
11951146
let dir = context.temp_dir();
@@ -1227,10 +1178,8 @@ fn granular_unstable_features_config_file() {
12271178
}
12281179

12291180
#[test]
1230-
#[cfg_attr(
1231-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
1232-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
1233-
)]
1181+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
1182+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
12341183
fn dynamic_import_bad_data_uri() {
12351184
let context = TestContextBuilder::new().build();
12361185
let dir = context.temp_dir();
@@ -1260,10 +1209,8 @@ fn dynamic_import_bad_data_uri() {
12601209
}
12611210

12621211
#[test]
1263-
#[cfg_attr(
1264-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
1265-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
1266-
)]
1212+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
1213+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
12671214
fn standalone_config_file_respects_compiler_options() {
12681215
let context = TestContextBuilder::new().build();
12691216
let dir = context.temp_dir();
@@ -1293,10 +1240,8 @@ fn standalone_config_file_respects_compiler_options() {
12931240
}
12941241

12951242
#[test]
1296-
#[cfg_attr(
1297-
all(target_os = "macos", target_arch = "x86_64", debug_assertions),
1298-
ignore // TODO: fix this, see https://github.com/denoland/sui/issues/43
1299-
)]
1243+
// TODO: fix this, see https://github.com/denoland/sui/issues/43
1244+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
13001245
fn standalone_jsr_dynamic_import() {
13011246
let context = TestContextBuilder::for_jsr().build();
13021247
let dir = context.temp_dir();

tests/integration/init_tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ fn init_subcommand_empty() {
216216
}
217217

218218
#[tokio::test]
219+
#[cfg(not(all(target_os = "macos", target_arch = "x86_64")))]
219220
async fn init_subcommand_serve() {
220221
let context = TestContextBuilder::for_jsr().use_temp_cwd().build();
221222
let cwd = context.temp_dir().path();

0 commit comments

Comments
 (0)