Skip to content

Commit ac13d65

Browse files
authored
Moved all integration tests to test/integration (#3315)
Integration tests in this context are defined as any tests which are expected to be run as it's own workspace (aka, have their own `WORKSPACE.bazel`/`MODULE.bazel` files). This makes the number of these easily identifiable and defines a pattern for how to introduce more going forward. Additionally, this change moved the `cc_common_link` examples to use bzlmod.
1 parent 8f1424c commit ac13d65

Some content is hidden

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

65 files changed

+183
-98
lines changed

.bazelci/presubmit.yml

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -521,77 +521,69 @@ tasks:
521521
cc_common_link_ubuntu2004:
522522
name: Build via cc_common.link
523523
platform: ubuntu2004
524-
working_directory: test/cc_common_link
524+
working_directory: test/integration/cc_common_link
525+
build_targets:
526+
- "//..."
527+
test_targets:
528+
- "//..."
529+
cc_common_link_macos:
530+
name: Build via cc_common.link
531+
platform: macos_arm64
532+
working_directory: test/integration/cc_common_link
525533
build_targets:
526-
- "--"
527534
- "//..."
528-
# The with_global_alloc directory is a repository on its own tested in the 'Build via cc_common.link using a global allocator' task.
529-
- "-//with_global_alloc/..."
530535
test_targets:
531-
- "--"
532536
- "//..."
533-
# The with_global_alloc directory is a repository on its own tested in the 'Build via cc_common.link using a global allocator' task.
534-
- "-//with_global_alloc/..."
535-
build_flags:
536-
- "--@rules_rust//rust/settings:experimental_use_cc_common_link=True"
537-
test_flags:
538-
- "--@rules_rust//rust/settings:experimental_use_cc_common_link=True"
539537
cc_common_link_with_global_alloc_ubuntu2004:
540538
name: Build via cc_common.link using a global allocator
541539
platform: ubuntu2004
542-
working_directory: test/cc_common_link/with_global_alloc
540+
working_directory: test/integration/cc_common_link_with_global_alloc
541+
build_targets:
542+
- "//..."
543+
test_targets:
544+
- "//..."
545+
cc_common_link_with_global_alloc_macos:
546+
name: Build via cc_common.link using a global allocator
547+
platform: macos_arm64
548+
working_directory: test/integration/cc_common_link_with_global_alloc
543549
build_targets:
544550
- "//..."
545551
test_targets:
546552
- "//..."
547-
build_flags:
548-
- "--@rules_rust//rust/settings:experimental_use_cc_common_link=True"
549-
- "--@rules_rust//rust/settings:experimental_use_global_allocator=True"
550-
test_flags:
551-
- "--@rules_rust//rust/settings:experimental_use_cc_common_link=True"
552-
- "--@rules_rust//rust/settings:experimental_use_global_allocator=True"
553553
cc_common_link_no_std_ubuntu2004:
554554
name: Build with no_std + alloc using cc_common.link infrastructure for linking
555555
platform: ubuntu2004
556-
working_directory: test/no_std
556+
working_directory: test/integration/no_std
557557
build_targets:
558558
- "//..."
559559
test_targets:
560560
- "//..."
561561
build_flags:
562-
- "--@rules_rust//rust/toolchain/channel=nightly"
563-
- "--@rules_rust//rust/settings:experimental_use_cc_common_link=True"
564-
- "--@rules_rust//rust/settings:experimental_use_global_allocator=True"
565-
- "--@rules_rust//rust/settings:no_std=alloc"
562+
- "--config=no_std_alloc_using_cc_common_link"
566563
test_flags:
567-
- "--@rules_rust//rust/toolchain/channel=nightly"
568-
- "--@rules_rust//rust/settings:experimental_use_cc_common_link=True"
569-
- "--@rules_rust//rust/settings:experimental_use_global_allocator=True"
570-
- "--@rules_rust//rust/settings:no_std=alloc"
564+
- "--config=no_std_alloc_using_cc_common_link"
571565
no_std_ubuntu2004:
572566
name: Build with no_std + alloc
573567
platform: ubuntu2004
574-
working_directory: test/no_std
568+
working_directory: test/integration/no_std
575569
build_targets:
576570
- "//..."
577571
test_targets:
578572
- "//..."
579573
build_flags:
580-
- "--@rules_rust//rust/toolchain/channel=nightly"
581-
- "--@rules_rust//rust/settings:no_std=alloc"
574+
- "--config=no_std_alloc"
582575
test_flags:
583-
- "--@rules_rust//rust/toolchain/channel=nightly"
584-
- "--@rules_rust//rust/settings:no_std=alloc"
576+
- "--config=no_std_alloc"
585577
bzlmod_repo_mapping_runfiles:
586578
name: bzlmod repo mapping test
587579
platform: ubuntu2004
588-
working_directory: test/bzlmod_repo_mapping/module_a
580+
working_directory: test/integration/bzlmod_repo_mapping/module_a
589581
test_targets:
590582
- "//..."
591583
aliased_toolchains:
592584
name: aliased toolchains test
593585
platform: ubuntu2004
594-
working_directory: test/aliased_toolchains
586+
working_directory: test/integration/aliased_toolchains
595587
build_targets:
596588
- "@rust_toolchains//:all"
597589
- "//..."

.bazelignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,4 @@ crate_universe/private/bootstrap
44
docs
55
examples
66
extensions
7-
test/aliased_toolchains
8-
test/bzlmod_repo_mapping
9-
test/cc_common_link
10-
test/no_std
7+
test/integration

test/cc_common_link/.bazelignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/cc_common_link/.bazelrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/cc_common_link/WORKSPACE.bazel

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/cc_common_link/with_global_alloc/.bazelrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/cc_common_link/with_global_alloc/WORKSPACE.bazel

Lines changed: 0 additions & 23 deletions
This file was deleted.

test/integration/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/*/bazel-*

test/integration/README.md

Lines changed: 3 additions & 0 deletions

0 commit comments

Comments
 (0)