ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "nagachika (Tomoyuki Chikanaga)" <noreply@ruby-lang.org>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:106804] [Ruby master Bug#16936] `make test-all TESTS="-n !/Foo#method/"` not skipping the test case
Date: Fri, 24 Dec 2021 06:06:09 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-95613.20211224060608.11018@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-16936.20200605224813.11018@ruby-lang.org

Issue #16936 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: REQUIRED to 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: DONE

ruby_3_0 1d29740c1b101db4bd8fc2d05f929a9e37471a0f merged revision(s) 5086c25f6015558877f85c3f1c014780b08fd3ce,3ff0a0b40c2e1fbdad2286f1dafe837f822d0e0d.

----------------------------------------
Bug #16936: `make test-all TESTS="-n !/Foo#method/"` not skipping the test case
https://bugs.ruby-lang.org/issues/16936#change-95613

* Author: jaruga (Jun Aruga)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: DONE
----------------------------------------
On the current latest master `cf1adf985ab78507250db0e217a0fdd779e2c6e6`.

```
$ autoconf

$ ./configure --prefix=$(pwd)/dest

$ make
```

The following `make test-all` works as I mentioned at #16935.

```
$ make test-all TESTS="-v -n /\^TestBugReporter#test_bug_reporter_add\$$/ -n /\^TestProcess#test_status_quit\$$/"
...
[1/0] TestBugReporter#test_bug_reporter_add = 0.41 s
[2/0] TestProcess#test_status_quit = 0.35 s
Finished tests in 9.392046s, 0.2129 tests/s, 1.5971 assertions/s.
2 tests, 15 assertions, 0 failures, 0 errors, 0 skips
...
```

But it seems that the following `TestBugReporter#test_bug_reporter_add` and `TestProcess#test_status_quit` are not actually skipped.
Is it a bug?

```
$ make test-all TESTS="test/-ext-/bug_reporter/test_bug_reporter.rb test/ruby/test_process.rb -v -n \!/\^TestBugReporter#test_bug_reporter_add\$$/ -n \!/\^TestProcess#test_status_quit\$$/" 2>&1 | tee make.log
Run options:-
  --seed=21367
  "--ruby=./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems"
  --excludes-dir=./test/excludes
  --name=!/memory_leak/
  -v  
  -n  
  "!/^TestBugReporter#test_bug_reporter_add$/"
  -n  
  "!/^TestProcess#test_status_quit$/"

# Running tests:

[  1/142] TestBugReporter#test_bug_reporter_add = 0.49 s
...
[128/142] TestProcess#test_status_quit = 0.30 s
...
Finished tests in 25.978847s, 5.4660 tests/s, 39.2627 assertions/s.
142 tests, 1020 assertions, 0 failures, 0 errors, 0 skips
```

I want to skip the specific test cases by `make test-all TESTS="..."` like this. I want to specify both the testing class (ex. `TestBugReporter`) and method (ex. `test_bug_reporter_add`) with the regular expression perfect matching to avoid unintended test cases are skipped.

```
$ make test-all TESTS="-v -n \!/\^TestBugReporter#test_bug_reporter_add\$$/ -n \!/\^TestProcess#test_status_quit\$$/"
```

The following `make test` works skipping `test_bug_reporter_add` and `test_status_quit` methods.

```
$ make test-all TESTS="test/-ext-/bug_reporter/test_bug_reporter.rb test/ruby/test_process.rb -v -n \!/test_bug_reporter_add\$$/ -n \!/test_status_quit\$$/" 2>&1 | tee make2.log
...
140 tests, 1005 assertions, 0 failures, 0 errors, 0 skips
```




-- 
https://bugs.ruby-lang.org/

      parent reply	other threads:[~2021-12-24  6:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 22:48 [ruby-core:98663] [Ruby master Bug#16936] `make check TESTS="-n !/Foo#method/"` not skipping the test case jaruga
2020-06-08 13:22 ` [ruby-core:98673] [Ruby master Bug#16936] `make test-all " jaruga
2020-06-08 14:12 ` [ruby-core:98674] " jaruga
2020-06-08 15:17 ` [ruby-core:98676] " jaruga
2020-06-08 15:32 ` [ruby-core:98677] " jaruga
2020-06-09 14:59 ` [ruby-core:98690] " jaruga
2020-06-09 20:43 ` [ruby-core:98694] " v.ondruch
2020-06-09 21:06 ` [ruby-core:98695] " jaruga
2020-06-10  9:55 ` [ruby-core:98704] " jaruga
2020-06-15 17:24 ` [ruby-core:98811] " jaruga
2021-10-26 10:21 ` [ruby-core:105806] " vo.x (Vit Ondruch)
2021-10-27 18:05 ` [ruby-core:105831] " vo.x (Vit Ondruch)
2021-12-24  6:06 ` nagachika (Tomoyuki Chikanaga) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-95613.20211224060608.11018@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).