diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock
index bf06efd65aa539f834855f84ea7bbeffd776be3a..d90de9da4f579cba6fceb931001ba9c03ae757c4 100644
--- a/substrate/Cargo.lock
+++ b/substrate/Cargo.lock
@@ -2107,6 +2107,7 @@ dependencies = [
  "log",
  "parity-scale-codec",
  "paste 1.0.6",
+ "rusty-fork",
  "scale-info",
  "serde",
  "sp-api",
@@ -7672,6 +7673,17 @@ version = "1.0.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f"
 
+[[package]]
+name = "rusty-fork"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f"
+dependencies = [
+ "fnv",
+ "quick-error 1.2.3",
+ "tempfile",
+]
+
 [[package]]
 name = "rw-stream-sink"
 version = "0.3.0"
diff --git a/substrate/frame/benchmarking/Cargo.toml b/substrate/frame/benchmarking/Cargo.toml
index d3a2704724f1296aa58e145398add85b52a3be36..c098eee52823332b4d11efb70b25ebfe314e7c15 100644
--- a/substrate/frame/benchmarking/Cargo.toml
+++ b/substrate/frame/benchmarking/Cargo.toml
@@ -32,6 +32,7 @@ sp-storage = { version = "6.0.0", default-features = false, path = "../../primit
 
 [dev-dependencies]
 hex-literal = "0.3.4"
+rusty-fork = { version = "0.3.0", default-features = false }
 sp-keystore = { version = "0.12.0", path = "../../primitives/keystore" }
 
 [features]
diff --git a/substrate/frame/benchmarking/src/tests.rs b/substrate/frame/benchmarking/src/tests.rs
index be5c23fff17f696804b9f81e709e7edd66898a73..b8a888767bf2ccbbd963f3cb408f063af7b63790 100644
--- a/substrate/frame/benchmarking/src/tests.rs
+++ b/substrate/frame/benchmarking/src/tests.rs
@@ -139,6 +139,7 @@ mod benchmarks {
 	use crate::{account, BenchmarkError, BenchmarkParameter, BenchmarkResult, BenchmarkingSetup};
 	use frame_support::{assert_err, assert_ok, ensure, traits::Get};
 	use frame_system::RawOrigin;
+	use rusty_fork::rusty_fork_test;
 	use sp_std::prelude::*;
 
 	// Additional used internally by the benchmark macro.
@@ -409,24 +410,29 @@ mod benchmarks {
 		});
 	}
 
-	/// Test that the benchmarking uses the correct values for each component and
-	/// that the number of components can be controlled with `VALUES_PER_COMPONENT`.
-	#[test]
-	fn test_values_per_component() {
-		let tests = vec![
-			(Some("1"), Err("`VALUES_PER_COMPONENT` must be at least 2".into())),
-			(Some("asdf"), Err("Could not parse env var `VALUES_PER_COMPONENT` as u32.".into())),
-			(None, Ok(vec![0, 2, 4, 6, 8, 10])),
-			(Some("2"), Ok(vec![0, 10])),
-			(Some("4"), Ok(vec![0, 3, 6, 10])),
-			(Some("6"), Ok(vec![0, 2, 4, 6, 8, 10])),
-			(Some("10"), Ok(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 10])),
-			(Some("11"), Ok(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])),
-			(Some("99"), Ok(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])),
-		];
-
-		for (num, expected) in tests {
-			run_test_values_per_component(num, expected);
+	rusty_fork_test! {
+		/// Test that the benchmarking uses the correct values for each component and
+		/// that the number of components can be controlled with `VALUES_PER_COMPONENT`.
+		///
+		/// NOTE: This test needs to run in its own process, since it
+		/// otherwise messes up the env variable for the other tests.
+		#[test]
+		fn test_values_per_component() {
+			let tests = vec![
+				(Some("1"), Err("`VALUES_PER_COMPONENT` must be at least 2".into())),
+				(Some("asdf"), Err("Could not parse env var `VALUES_PER_COMPONENT` as u32.".into())),
+				(None, Ok(vec![0, 2, 4, 6, 8, 10])),
+				(Some("2"), Ok(vec![0, 10])),
+				(Some("4"), Ok(vec![0, 3, 6, 10])),
+				(Some("6"), Ok(vec![0, 2, 4, 6, 8, 10])),
+				(Some("10"), Ok(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 10])),
+				(Some("11"), Ok(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])),
+				(Some("99"), Ok(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])),
+			];
+
+			for (num, expected) in tests {
+				run_test_values_per_component(num, expected);
+			}
 		}
 	}