Skip to content

[Makefile] Add pattern rules and simplify the test targets#1805

Open
relokin wants to merge 2 commits into
herd:masterfrom
relokin:makefile-cleanup
Open

[Makefile] Add pattern rules and simplify the test targets#1805
relokin wants to merge 2 commits into
herd:masterfrom
relokin:makefile-cleanup

Conversation

@relokin
Copy link
Copy Markdown
Member

@relokin relokin commented Apr 23, 2026

Simplify the makefile but introducing pattern rules for the herd tests. In addition, clean up the target names by introducing the following pattern for test targets:

test..<cata/unit>.

for example:

test.herd.cata.aarch64-pick

@relokin
Copy link
Copy Markdown
Member Author

relokin commented Apr 23, 2026

@maranget @HadrienRenaud this is WIP but I wanted to check with you if you would be ok with such a change in principle. I find that the Makefile has grown a bit too large and it's hard to understand what's going on. Hopefully by introducing some patterns we can make it shorter, easier to extend and easier to follow.

Copy link
Copy Markdown
Collaborator

@HadrienRenaud HadrienRenaud left a comment

Choose a reason for hiding this comment

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

I'm generally very pro this.

(I haven't approved because I didn't check that there was no change in the actual commands)

Comment thread Makefile
-conf ./herd/tests/instructions/AArch64.vmsa+ifetch/vmsa+ifetch.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 VMSA+ifetch instructions tests: OK"
test-all-asl:: test.herd-asl.cata.aarch64-VMSA
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is it on purpose that you've removed the -verbose argument?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I didn't realise this was intentional. I will restore it unless you think it's not really necessary.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it is necessary, thanks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks Hadrien!

@relokin
Copy link
Copy Markdown
Member Author

relokin commented Apr 23, 2026

I'm generally very pro this.

(I haven't approved because I didn't check that there was no change in the actual commands)

Thanks Hadrien! That's absolutely fine, just wanted to check if the direction of the patch is ok. I will do another pass. Perhaps one thing that I wanted to check with you, the ASL test targets are not as uniform as the rest, is the non-uniformity useful and intentional?

@HadrienRenaud
Copy link
Copy Markdown
Collaborator

the ASL test targets are not as uniform as the rest, is the non-uniformity useful and intentional?

I'm not sure what non-uniformity you are talking about. If you are talking about naming conventions, it is probably non-intensional. If you are talking about something else, I'm not sure. Could you expand or give an example?

Comment thread Makefile
@ echo "herd7 catalogue aarch64-faults tests (ASL): OK"

cata-test:: pick-test-mixed
pick-test-mixed:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@maranget just a quick question do you know what is the purpose of this test?

Comment thread Makefile
-conf ./herd/tests/instructions/AArch64.vmsa+ifetch/vmsa+ifetch.cfg \
$(REGRESSION_TEST_MODE)
@ echo "herd7 AArch64 VMSA+ifetch instructions tests: OK"
test-all-asl:: test.herd-asl.cata.aarch64-VMSA
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I didn't realise this was intentional. I will restore it unless you think it's not really necessary.

@relokin relokin marked this pull request as ready for review April 23, 2026 21:36
@relokin relokin force-pushed the makefile-cleanup branch 3 times, most recently from 9074895 to b978005 Compare April 23, 2026 21:55
Copy link
Copy Markdown
Contributor

@diaolo01 diaolo01 left a comment

Choose a reason for hiding this comment

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

This cleanup is useful. Generally, looks good to me.

Comment thread catalogue/aarch64-ifetch/ci-shelf.py Outdated
@@ -0,0 +1 @@
shelf.py No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I notice this shelf covers a much smaller set of tests than before. Is this intended?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Does it? I think it's a soft link to shelf.py, so it should have the same set of tests as before.

Copy link
Copy Markdown
Contributor

@diaolo01 diaolo01 Apr 27, 2026

Choose a reason for hiding this comment

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

If I am reading this correctly, previously the makefile used to call shelf-test.py and now it calls shelf.py via ci-shelf.py. shelf has considerably less tests than shelf-test, which was deleted.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oh sorry I missed that. Should be fixed now.

relokin added 2 commits April 30, 2026 10:48
Simplify the makefile but introducing pattern rules for herd
tests. In addition, clean up the target names by introducing the
following pattern for test targets:

test.<herd/herd-asl/herd-mixed>.<cata/inst>.<suite>

for example:

test.herd.cata.aarch64-pick
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
@relokin relokin changed the title [Makefile] Add shelf links and instruction configs [Makefile] Add template rules and simplify the test targets May 6, 2026
@relokin relokin changed the title [Makefile] Add template rules and simplify the test targets [Makefile] Add pattern rules and simplify the test targets May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants