Module: OS::Linux::DevCmd::Tests Private
- Extended by:
- T::Helpers
- Included in:
- Homebrew::DevCmd::Tests
- Defined in:
- extend/os/linux/dev-cmd/tests.rb
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Instance Method Summary collapse
- #check_test_environment! ⇒ void private
Instance Method Details
#check_test_environment! ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'extend/os/linux/dev-cmd/tests.rb', line 15 def check_test_environment! super return unless Homebrew::EnvConfig.sandbox_linux? require "sandbox" return if ::Sandbox.available? # On CI the sandbox must work, so fail loudly # to ensure `brew tests` really runs sandboxed. # On a developer's machine the sandbox may be unavailable # (e.g. a Ruby without Fiddle, which the Landlock sandbox needs), # so warn and run the tests unsandboxed rather than aborting. if GitHub::Actions.env_set? ::Sandbox.ensure_sandbox_available! else opoo ::Sandbox.failure_reason || "The sandbox is not available." end end |