From acc9a7ca8554bc2413dee2d6d0f407b3a59c628c Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sun, 10 Apr 2016 22:53:56 -0400 Subject: brew test, install, update-test: add --keep-tmp option Also enables sandbox for --interactive and --debug use of install and test, using automatic retention. Closes #66. Signed-off-by: Andrew Janke --- Library/Homebrew/cmd/test.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Library/Homebrew/cmd/test.rb') diff --git a/Library/Homebrew/cmd/test.rb b/Library/Homebrew/cmd/test.rb index ffb9c169d..0218e1c80 100644 --- a/Library/Homebrew/cmd/test.rb +++ b/Library/Homebrew/cmd/test.rb @@ -1,4 +1,4 @@ -#: * `test` [`--devel`|`--HEAD`] [`--debug`] : +#: * `test` [`--devel`|`--HEAD`] [`--debug`] [`--keep-tmp`] : #: A few formulae provide a test method. `brew test` runs this #: test method. There is no standard output or return code, but it should #: generally indicate to the user if something is wrong with the installed @@ -10,6 +10,9 @@ #: If `--debug` is passed and the test fails, an interactive debugger will be #: launched with access to IRB or a shell inside the temporary test directory. #: +#: If `--keep-tmp` is passed, the temporary files created for the test are +#: not deleted. +#: #: Example: `brew install jruby && brew test jruby` require "extend/ENV" @@ -55,15 +58,11 @@ module Homebrew end if Sandbox.available? && !ARGV.no_sandbox? - if Sandbox.auto_disable? - Sandbox.print_autodisable_warning - else - Sandbox.print_sandbox_message - end + Sandbox.print_sandbox_message end Utils.safe_fork do - if Sandbox.available? && !ARGV.no_sandbox? && !Sandbox.auto_disable? + if Sandbox.available? && !ARGV.no_sandbox? sandbox = Sandbox.new f.logs.mkpath sandbox.record_log(f.logs/"sandbox.test.log") -- cgit v1.2.3