diff --git a/Cargo.lock b/Cargo.lock
index f02a4f1ac0f..698fc474ca4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -408,11 +408,11 @@ dependencies = [
[[package]]
name = "cargo-test-macro"
-version = "0.1.0"
+version = "0.2.0"
[[package]]
name = "cargo-test-support"
-version = "0.1.0"
+version = "0.2.0"
dependencies = [
"anstream",
"anstyle",
diff --git a/Cargo.toml b/Cargo.toml
index 6523d2a3802..ac0e1b9a4d7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -30,8 +30,8 @@ cargo-credential-libsecret = { version = "0.4.2", path = "credential/cargo-crede
cargo-credential-macos-keychain = { version = "0.4.2", path = "credential/cargo-credential-macos-keychain" }
cargo-credential-wincred = { version = "0.4.2", path = "credential/cargo-credential-wincred" }
cargo-platform = { path = "crates/cargo-platform", version = "0.1.5" }
-cargo-test-macro = { path = "crates/cargo-test-macro" }
-cargo-test-support = { path = "crates/cargo-test-support" }
+cargo-test-macro = { version = "0.2.0", path = "crates/cargo-test-macro" }
+cargo-test-support = { version = "0.2.0", path = "crates/cargo-test-support" }
cargo-util = { version = "0.2.9", path = "crates/cargo-util" }
cargo-util-schemas = { version = "0.3.0", path = "crates/cargo-util-schemas" }
cargo_metadata = "0.18.1"
diff --git a/crates/cargo-test-macro/Cargo.toml b/crates/cargo-test-macro/Cargo.toml
index e216936ee2f..68e621f0103 100644
--- a/crates/cargo-test-macro/Cargo.toml
+++ b/crates/cargo-test-macro/Cargo.toml
@@ -1,13 +1,12 @@
[package]
name = "cargo-test-macro"
-version = "0.1.0"
+version = "0.2.0"
edition.workspace = true
+rust-version = "1.77" # MSRV:1
license.workspace = true
homepage.workspace = true
repository.workspace = true
-documentation = "https://github.com/rust-lang/cargo"
description = "Helper proc-macro for Cargo's testsuite."
-publish = false
[lib]
proc-macro = true
diff --git a/crates/cargo-test-macro/LICENSE-APACHE b/crates/cargo-test-macro/LICENSE-APACHE
new file mode 120000
index 00000000000..1cd601d0a3a
--- /dev/null
+++ b/crates/cargo-test-macro/LICENSE-APACHE
@@ -0,0 +1 @@
+../../LICENSE-APACHE
\ No newline at end of file
diff --git a/crates/cargo-test-macro/LICENSE-MIT b/crates/cargo-test-macro/LICENSE-MIT
new file mode 120000
index 00000000000..b2cfbdc7b0b
--- /dev/null
+++ b/crates/cargo-test-macro/LICENSE-MIT
@@ -0,0 +1 @@
+../../LICENSE-MIT
\ No newline at end of file
diff --git a/crates/cargo-test-macro/README.md b/crates/cargo-test-macro/README.md
new file mode 100644
index 00000000000..311d5ed6d66
--- /dev/null
+++ b/crates/cargo-test-macro/README.md
@@ -0,0 +1,5 @@
+WARNING: You might not want to use this outside of Cargo.
+
+* This is designed for testing Cargo itself. Use at your own risk.
+* No guarantee on any stability across versions.
+* No feature request would be accepted unless proved useful for testing Cargo.
diff --git a/crates/cargo-test-macro/src/lib.rs b/crates/cargo-test-macro/src/lib.rs
index f813b835a45..9d4a5fbaa99 100644
--- a/crates/cargo-test-macro/src/lib.rs
+++ b/crates/cargo-test-macro/src/lib.rs
@@ -1,3 +1,14 @@
+//! # Cargo test macro.
+//!
+//! This is meant to be consumed alongside `cargo-test-support`. See
+//! for a guide on writing tests.
+//!
+//! WARNING: You might not want to use this outside of Cargo.
+//!
+//! * This is designed for testing Cargo itself. Use at your own risk.
+//! * No guarantee on any stability across versions.
+//! * No feature request would be accepted unless proved useful for testing Cargo.
+
use proc_macro::*;
use std::path::Path;
use std::process::Command;
diff --git a/crates/cargo-test-support/Cargo.toml b/crates/cargo-test-support/Cargo.toml
index a8b7b8f1dd1..fd64a66efc7 100644
--- a/crates/cargo-test-support/Cargo.toml
+++ b/crates/cargo-test-support/Cargo.toml
@@ -1,9 +1,12 @@
[package]
name = "cargo-test-support"
-version = "0.1.0"
-license.workspace = true
+version = "0.2.0"
edition.workspace = true
-publish = false
+rust-version = "1.77" # MSRV:1
+license.workspace = true
+homepage.workspace = true
+repository.workspace = true
+description = "Testing framework for Cargo's testsuite."
[lib]
doctest = false
diff --git a/crates/cargo-test-support/LICENSE-APACHE b/crates/cargo-test-support/LICENSE-APACHE
new file mode 120000
index 00000000000..1cd601d0a3a
--- /dev/null
+++ b/crates/cargo-test-support/LICENSE-APACHE
@@ -0,0 +1 @@
+../../LICENSE-APACHE
\ No newline at end of file
diff --git a/crates/cargo-test-support/LICENSE-MIT b/crates/cargo-test-support/LICENSE-MIT
new file mode 120000
index 00000000000..b2cfbdc7b0b
--- /dev/null
+++ b/crates/cargo-test-support/LICENSE-MIT
@@ -0,0 +1 @@
+../../LICENSE-MIT
\ No newline at end of file
diff --git a/crates/cargo-test-support/README.md b/crates/cargo-test-support/README.md
new file mode 100644
index 00000000000..311d5ed6d66
--- /dev/null
+++ b/crates/cargo-test-support/README.md
@@ -0,0 +1,5 @@
+WARNING: You might not want to use this outside of Cargo.
+
+* This is designed for testing Cargo itself. Use at your own risk.
+* No guarantee on any stability across versions.
+* No feature request would be accepted unless proved useful for testing Cargo.
diff --git a/crates/cargo-test-support/src/lib.rs b/crates/cargo-test-support/src/lib.rs
index 15a77adc7ff..a02f8293380 100644
--- a/crates/cargo-test-support/src/lib.rs
+++ b/crates/cargo-test-support/src/lib.rs
@@ -1,6 +1,12 @@
//! # Cargo test support.
//!
//! See for a guide on writing tests.
+//!
+//! WARNING: You might not want to use this outside of Cargo.
+//!
+//! * This is designed for testing Cargo itself. Use at your own risk.
+//! * No guarantee on any stability across versions.
+//! * No feature request would be accepted unless proved useful for testing Cargo.
#![allow(clippy::disallowed_methods)]
#![allow(clippy::print_stderr)]
diff --git a/crates/xtask-bump-check/src/xtask.rs b/crates/xtask-bump-check/src/xtask.rs
index 6f8dffc75d6..a53a0a8bcfb 100644
--- a/crates/xtask-bump-check/src/xtask.rs
+++ b/crates/xtask-bump-check/src/xtask.rs
@@ -168,6 +168,8 @@ fn bump_check(args: &clap::ArgMatches, gctx: &cargo::util::GlobalContext) -> Car
let mut cmd = ProcessBuilder::new("cargo");
cmd.arg("semver-checks")
.arg("check-release")
+ .args(&["--exclude", "cargo-test-macro"]) // FIXME: Remove once 1.79 is stable.
+ .args(&["--exclude", "cargo-test-support"]) // FIXME: Remove once 1.79 is stable.
.arg("--workspace");
gctx.shell().status("Running", &cmd)?;
cmd.exec()?;
@@ -176,6 +178,8 @@ fn bump_check(args: &clap::ArgMatches, gctx: &cargo::util::GlobalContext) -> Car
let mut cmd = ProcessBuilder::new("cargo");
cmd.arg("semver-checks")
.arg("--workspace")
+ .args(&["--exclude", "cargo-test-macro"]) // FIXME: Remove once 1.79 is stable.
+ .args(&["--exclude", "cargo-test-support"]) // FIXME: Remove once 1.79 is stable.
.arg("--baseline-rev")
.arg(referenced_commit.id().to_string());
for krate in crates_not_check_against_channels {
diff --git a/publish.py b/publish.py
index 0524651b59c..2918e1d998a 100755
--- a/publish.py
+++ b/publish.py
@@ -26,6 +26,8 @@
'crates/cargo-util',
'crates/crates-io',
'crates/cargo-util-schemas',
+ 'crates/cargo-test-macro',
+ 'crates/cargo-test-support',
'.',
]
diff --git a/src/doc/contrib/src/process/release.md b/src/doc/contrib/src/process/release.md
index 3c3062f325c..9b3ce372586 100644
--- a/src/doc/contrib/src/process/release.md
+++ b/src/doc/contrib/src/process/release.md
@@ -131,9 +131,9 @@ Cargo's library and its related dependencies (like `cargo-util`) are published
to [crates.io] as part of the 6-week stable release process by the [Release
team]. There is a [`publish.py` script] that is used by the Release team's
automation scripts (see ) to handle
-determining which packages to publish. The test and build tool crates aren't
-published. This runs on the specific git commit associated with the cargo
-submodule in the `stable` branch in `rust-lang/rust` at the time of release.
+determining which packages to publish. The build tool crates aren't published.
+This runs on the specific git commit associated with the cargo submodule in the
+`stable` branch in `rust-lang/rust` at the time of release.
On very rare cases, the Cargo team may decide to manually publish a new
release to [crates.io]. For example, this may be necessary if there is a