Skip to content

consistently honor pretestopts & testopts in PerlModule#3231

Merged
ocaisa merged 2 commits intoeasybuilders:developfrom
Flamefire:20240226142816_new_pr_perlmodule
Feb 27, 2024
Merged

consistently honor pretestopts & testopts in PerlModule#3231
ocaisa merged 2 commits intoeasybuilders:developfrom
Flamefire:20240226142816_new_pr_perlmodule

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

(created using eb --new-pr)

ocaisa
ocaisa previously approved these changes Feb 26, 2024
@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Feb 26, 2024

I'm a bit confused as we actually have an easyconfig that uses pretestopts with PerlModule and it works just fine there: https://github.com/easybuilders/easybuild-easyconfigs/blob/develop/easybuild/easyconfigs/s/swissknife/swissknife-1.80-GCCcore-8.3.0.eb (note the rm t/annot.t below)

== installing...
  >> running command:
        [started at: 2024-02-26 13:46:29]
        [working dir: /home/ocaisa/.local/easybuild/build/swissknife/1.80/GCCcore-8.3.0/swissknife_1.80]
        [output logged in /tmp/eb-9s9vwrkh/easybuild-run_cmd-b8gomqlp.log]
        perl Makefile.PL PREFIX=/home/ocaisa/.local/easybuild/software/swissknife/1.80-GCCcore-8.3.0
  >> command completed: exit 0, ran in 00h00m03s
  >> running command:
        [started at: 2024-02-26 13:46:32]
        [working dir: /home/ocaisa/.local/easybuild/build/swissknife/1.80/GCCcore-8.3.0/swissknife_1.80]
        [output logged in /tmp/eb-9s9vwrkh/easybuild-run_cmd-pm6xd0tf.log]
        make  -j 8
  >> command completed: exit 0, ran in 00h00m01s
  >> running command:
        [started at: 2024-02-26 13:46:33]
        [working dir: /home/ocaisa/.local/easybuild/build/swissknife/1.80/GCCcore-8.3.0/swissknife_1.80]
        [output logged in /tmp/eb-9s9vwrkh/easybuild-run_cmd-atzmy9df.log]
        rm t/annot.t &&  make test TEST_VERBOSE=1
  >> command completed: exit 0, ran in 00h00m02s
  >> running command:
        [started at: 2024-02-26 13:46:36]
        [working dir: /home/ocaisa/.local/easybuild/build/swissknife/1.80/GCCcore-8.3.0/swissknife_1.80]
        [output logged in /tmp/eb-9s9vwrkh/easybuild-run_cmd-tvj8mhrt.log]
        make install
  >> command completed: exit 0, ran in < 1s

@ocaisa ocaisa dismissed their stale review February 26, 2024 13:51

I don't think the right step is being targetted

@Flamefire
Copy link
Copy Markdown
Contributor Author

It is only honored if a Makefile.PL exists in which case ConfigureMake.test_step(self) is called which honors pretestopts

If that file does not exist but a Build.PL exists then another command is used. For the test this would be perl Build test

ocaisa
ocaisa previously approved these changes Feb 26, 2024
Copy link
Copy Markdown
Member

@ocaisa ocaisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it now, there are two possible code paths in the easyblock, one respected pretestopts and the other didn't

@Flamefire
Copy link
Copy Markdown
Contributor Author

I see it now, there are two possible code paths in the easyblock, one respected pretestopts and the other didn't

Correct. Actually we should also honor "testopts" which are ignored in that code path too. Updated

@Flamefire Flamefire changed the title Honor pretestopts in PerlModule Honor pretestopts & testopts in PerlModule Feb 26, 2024
@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Feb 26, 2024

@boegelbot please test @ generoso
EB_ARGS="swissknife-1.80-GCCcore-8.3.0.eb"

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Feb 26, 2024

I don't have an easyconfig to test this against, but it doesn't break what we have and looks fine. Can you confirm @Flamefire that you've used it successfully?

@boegelbot
Copy link
Copy Markdown

@ocaisa: Request for testing this PR well received on login1

PR test command 'EB_PR=3231 EB_ARGS="swissknife-1.80-GCCcore-8.3.0.eb" EB_CONTAINER= EB_REPO=easybuild-easyblocks /opt/software/slurm/bin/sbatch --job-name test_PR_3231 --ntasks=4 ~/boegelbot/eb_from_pr_upload_generoso.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 12964

Test results coming soon (I hope)...

Details

- notification for comment with ID 1964220882 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Copy Markdown

Test report by @boegelbot

Overview of tested easyconfigs (in order)

  • SUCCESS swissknife-1.80-GCCcore-8.3.0.eb

Build succeeded for 1 out of 1 (1 easyconfigs in total)
cns1 - Linux Rocky Linux 8.9, x86_64, Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz (haswell), Python 3.6.8
See https://gist.github.com/boegelbot/9727ffab826136935381d93a52a5b9d0 for a full test report.

@Flamefire
Copy link
Copy Markdown
Contributor Author

I don't have an easyconfig to test this against, but it doesn't break what we have and looks fine. Can you confirm @Flamefire that you've used it successfully?

I actually made this for #19971 as I needed pretestopts and wasn't sure which of the code paths was taken. There it was not required.

I tested this with a modified EC:

--- /tmp/orig/Perl-bundle-CPAN-5.36.1-GCCcore-12.3.0.eb	2024-02-27 09:11:17.712794906 +0100
+++ /tmp/Perl-bundle-CPAN-5.36.1-GCCcore-12.3.0.eb	2024-02-27 09:11:17.712794906 +0100
@@ -64,6 +64,8 @@
     ('Module::Build::Tiny', '0.045', {
         'source_tmpl': 'Module-Build-Tiny-%(version)s.tar.gz',
         'source_urls': ['https://cpan.metacpan.org/authors/id/L/LE/LEONT'],
+        'pretestopts': 'LC_ALL=C.UTF-8',
+        'testopts': '&& false',
         'checksums': ['d20692eee246d0b329b7f7659f36286b14ae0696fe91078a64b7078f8876d300'],
     }),
     ('aliased', '0.34', {

And it failed as expected: build failed (first 300 chars): cmd "LC_ALL=C.UTF-8 perl Build test && false" exited with exit code 1 and output:

Hence I'd say this PR works as it should.

@ocaisa ocaisa merged commit a2864e7 into easybuilders:develop Feb 27, 2024
@ocaisa ocaisa added this to the release after 4.9.0 milestone Feb 27, 2024
@Flamefire Flamefire deleted the 20240226142816_new_pr_perlmodule branch February 27, 2024 17:13
@boegel boegel changed the title Honor pretestopts & testopts in PerlModule consistently honor pretestopts & testopts in PerlModule Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants