From ed48426a338536cfd8777b220babba52263d583b Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Fri, 4 Apr 2025 09:07:15 -0400 Subject: [PATCH] tests: support :needs_arm, :needs_intel metadata This adds the ability to specify tests that depend on a certain CPU architecture using `:needs_arm` or `:needs_intel`, similar to the existing `:needs_macos` and `:needs_linux` metadata for tests that depend on a certain OS. --- Library/Homebrew/dev-cmd/tests.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index 697a2a0684..4df8acd792 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -134,6 +134,10 @@ module Homebrew end # rubocop:enable Homebrew/MoveToExtendOS + bundle_args << "--tag" << "~needs_arm" unless Hardware::CPU.arm? + + bundle_args << "--tag" << "~needs_intel" unless Hardware::CPU.intel? + bundle_args << "--tag" << "~needs_network" unless args.online? unless ENV["CI"] bundle_args << "--tag" << "~needs_ci" \