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

[PATCH] bisect-runner.pl: Skip tests of prereq mods #15376

Closed
p5pRT opened this issue May 30, 2016 · 9 comments
Closed

[PATCH] bisect-runner.pl: Skip tests of prereq mods #15376

p5pRT opened this issue May 30, 2016 · 9 comments
Labels

Comments

@p5pRT
Copy link

p5pRT commented May 30, 2016

Migrated from rt.perl.org#128294 (status was 'resolved')

Searchable as RT128294$

@p5pRT
Copy link
Author

p5pRT commented May 30, 2016

From @cpansprout

I found this change to bisect-runner.pl very helpful. Is applying this a good idea? I will go ahead in a few days if nobody objects.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented May 30, 2016

From @cpansprout

From​: Father Chrysostomos <sprout@​cpan.org>

bisect-runner.pl​: Don’t run tests for prereq modules

With the --module option, we *are* trying to see whether the module’s
tests pass. With the --with-module option, the modules are installed
merely as prerequisites for whatever program we are trying to test.
So skip the tests for the latter option, and make bisects faster.

Inline Patch
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl
index 360c186..531891e 100755
--- a/Porting/bisect-runner.pl
+++ b/Porting/bisect-runner.pl
@@ -590,7 +590,8 @@ And then:
 --with-module module1,module2,...
 
 Like I<--module> above, except this simpl/private/tmp/open_8kdnmd43.txty installs the requested
-modules and they can then be used in other tests.
+modules and they can then be used in other tests.  The modules are
+installed without their tests being run, for speed.
 
 For example:
 
@@ -1508,7 +1509,14 @@ if ($options{module} || $options{'with-module'}) {
   for (@m) {
     s/-/::/g if /-/ and !m|/|;
   }
-  my $install = join ",", map { "'$_'" } @m;
+  my $install;
+  if ($options{module}) {
+    $install = join ",", map { "'$_'" } @m;
+    $install = "install($install)";
+  } else {
+    $install = join ",", map { "'$_'" } "install", @m;
+    $install = "notest($install)";
+  }
   my $last = $m[-1];
   my $shellcmd = "install($install); die unless CPAN::Shell->expand(Module => '$last')->uptodate;";
 

@p5pRT
Copy link
Author

p5pRT commented May 30, 2016

From @tonycoz

On Mon May 30 13​:30​:45 2016, sprout wrote​:

I found this change to bisect-runner.pl very helpful. Is applying
this a good idea? I will go ahead in a few days if nobody objects.

It really should test and skip if the test fails.

Tony

@p5pRT
Copy link
Author

p5pRT commented May 30, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented May 31, 2016

From @cpansprout

On Mon May 30 16​:37​:38 2016, tonyc wrote​:

On Mon May 30 13​:30​:45 2016, sprout wrote​:

I found this change to bisect-runner.pl very helpful. Is applying
this a good idea? I will go ahead in a few days if nobody objects.

It really should test and skip if the test fails.

First, I don’t know bisect-runner.pl or git-bisect well enough to make that change; secondly, it would not have helped for my use case, since I was getting module failures adjacent to the commit responsible for fixing the crash I’m trying to track.

So, perhaps for my use case I could add a separate --no-module-tests option. Any objections to that?

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented May 31, 2016

From @tonycoz

On Mon, May 30, 2016 at 05​:50​:01PM -0700, Father Chrysostomos via RT wrote​:

On Mon May 30 16​:37​:38 2016, tonyc wrote​:

On Mon May 30 13​:30​:45 2016, sprout wrote​:

I found this change to bisect-runner.pl very helpful. Is applying
this a good idea? I will go ahead in a few days if nobody objects.

It really should test and skip if the test fails.

First, I don’t know bisect-runner.pl or git-bisect well enough to make that change; secondly, it would not have helped for my use case, since I was getting module failures adjacent to the commit responsible for fixing the crash I’m trying to track.

So, perhaps for my use case I could add a separate --no-module-tests option. Any objections to that?

No, that sounds fine to me.

Tony

@p5pRT
Copy link
Author

p5pRT commented May 31, 2016

From @cpansprout

On Mon May 30 19​:01​:20 2016, tonyc wrote​:

On Mon, May 30, 2016 at 05​:50​:01PM -0700, Father Chrysostomos via RT
wrote​:

So, perhaps for my use case I could add a separate --no-module-tests
option. Any objections to that?

No, that sounds fine to me.

I have added such an option in commit 6830146.

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented May 31, 2016

@cpansprout - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed May 31, 2016
@p5pRT
Copy link
Author

p5pRT commented Jun 12, 2016

From @wolfsage

On Tue, May 31, 2016 at 9​:36 AM, Father Chrysostomos via RT
<perlbug-followup@​perl.org> wrote​:

On Mon May 30 19​:01​:20 2016, tonyc wrote​:

On Mon, May 30, 2016 at 05​:50​:01PM -0700, Father Chrysostomos via RT
wrote​:

So, perhaps for my use case I could add a separate --no-module-tests
option. Any objections to that?

No, that sounds fine to me.

I have added such an option in commit 6830146.

Yes that sounds better to me.

Thanks!

-- Matthew Horsfall (alh)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant