mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Removes debug info from tests by default (#2948)
* Removes debug info from tests by default Much quieter/less confusing test output for newbies Keeps it on in CI * PUMA_DEBUG -> PUMA_TEST_DEBUG Co-authored-by: MSP-Greg <Greg.mpls@gmail.com>
This commit is contained in:
parent
1576f9bf71
commit
528912e9eb
7 changed files with 21 additions and 5 deletions
1
.github/workflows/rack2.yaml
vendored
1
.github/workflows/rack2.yaml
vendored
|
@ -16,6 +16,7 @@ jobs:
|
|||
env:
|
||||
CI: true
|
||||
TESTOPTS: -v
|
||||
PUMA_TEST_DEBUG: true
|
||||
PUMA_NO_RUBOCOP: true
|
||||
PUMA_CI_RACK_2: true
|
||||
|
||||
|
|
1
.github/workflows/ragel.yml
vendored
1
.github/workflows/ragel.yml
vendored
|
@ -17,6 +17,7 @@ jobs:
|
|||
ragel ${{ matrix.os }} ${{ matrix.ruby }}
|
||||
env:
|
||||
PUMA_NO_RUBOCOP: true
|
||||
PUMA_TEST_DEBUG: true
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: |
|
||||
|
|
1
.github/workflows/tests.yaml
vendored
1
.github/workflows/tests.yaml
vendored
|
@ -28,6 +28,7 @@ jobs:
|
|||
needs: rubocop
|
||||
env:
|
||||
CI: true
|
||||
PUMA_TEST_DEBUG: true
|
||||
TESTOPTS: -v
|
||||
PUMA_NO_RUBOCOP: true
|
||||
|
||||
|
|
|
@ -97,9 +97,15 @@ See the [Bundler docs](https://bundler.io/man/gemfile.5.html#PATH) for more deta
|
|||
|
||||
## Running tests
|
||||
|
||||
To run the entire test suite:
|
||||
To run rubocop + tests:
|
||||
|
||||
```sh
|
||||
bundle exec rake test:all
|
||||
bundle exec rake
|
||||
```
|
||||
|
||||
To run the test suite only:
|
||||
```sh
|
||||
bundle exec rake test
|
||||
```
|
||||
|
||||
To run a single test file:
|
||||
|
@ -122,6 +128,12 @@ To run a single test with 5 seconds as the test case timeout:
|
|||
TEST_CASE_TIMEOUT=5 bundle exec m test/test_binder.rb:37
|
||||
```
|
||||
|
||||
If you would like more information about extension building, SSL versions, your local Ruby version, and more, use the PUMA_TEST_DEBUG env variable:
|
||||
|
||||
```sh
|
||||
PUMA_TEST_DEBUG=1 bundle exec rake test
|
||||
```
|
||||
|
||||
#### File limits
|
||||
|
||||
Puma's test suite opens up a lot of sockets. This may exceed the default limit of your operating system. If your file limits are low, you may experience "too many open file" errors when running the Puma test suite.
|
||||
|
|
1
Rakefile
1
Rakefile
|
@ -16,6 +16,7 @@ end
|
|||
gemspec = Gem::Specification.load("puma.gemspec")
|
||||
Gem::PackageTask.new(gemspec).define
|
||||
|
||||
Rake::FileUtilsExt.verbose_flag = !!ENV['PUMA_TEST_DEBUG']
|
||||
# generate extension code using Ragel (C and Java)
|
||||
desc "Generate extension code (C and Java) using Ragel"
|
||||
task :ragel
|
||||
|
|
|
@ -192,7 +192,7 @@ end
|
|||
|
||||
Minitest.after_run do
|
||||
# needed for TestCLI#test_control_clustered
|
||||
unless $debugging_hold
|
||||
if !$debugging_hold && ENV['PUMA_TEST_DEBUG']
|
||||
out = $debugging_info.strip
|
||||
unless out.empty?
|
||||
dash = "\u2500"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# loaded so HAS_SSL is defined
|
||||
require_relative "helper"
|
||||
|
||||
if ::Puma::HAS_SSL
|
||||
if ::Puma::HAS_SSL && ENV['PUMA_TEST_DEBUG']
|
||||
require "puma/minissl"
|
||||
require "net/http"
|
||||
|
||||
|
|
Loading…
Reference in a new issue