Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix infinite wait when invoking "bats -j5" instead of "bats -j 5" #657

Merged
merged 3 commits into from
Oct 5, 2022

Commits on Sep 25, 2022

  1. Fix infinite wait when invoking "bats -j5" instead of "bats -j 5"

    bats's option parser translates "-j5" to "-j -5". This caused a negative
    number of "slots" (threads) to be available and the test to silently
    hang forever. Not nice.
    
    Add a $num_jobs sanity check to fail immediately like this:
    
    ```
    Invalid number of jobs: -5
    tests.bats
       bats warning: Executed 0 instead of expected 3 tests
    
    3 tests, 0 failures, 3 not run
    ```
    
    Non-numeric arguments (e.g.: -jf) evaluate to zero which also fails the
    check.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
    marc-hb committed Sep 25, 2022
    Configuration menu
    Copy the full SHA
    48b0d26 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2022

  1. Add test

    martin-schulze-vireso committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    0ec3619 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    58fa597 View commit details
    Browse the repository at this point in the history