Skip to content

Conversation

james-ball-qualcomm
Copy link
Collaborator

Fixes #73

Add test.adoc and Makefile to ensure tags and norm rules create expected results.

@james-ball-qualcomm
Copy link
Collaborator Author

Pre-commit YAML check is broken (just like in ISA manual).

I'm waiting for #75 to be fixed before I can proceed with this PR. I've asked @rpsene to make the change.

Copy link
Collaborator

@Timmmm Timmmm left a comment

Choose a reason for hiding this comment

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

Generally looks good to me!

Is there an existing github workflow that this could be added to?


DOCKER_BIN ?= docker
SKIP_DOCKER ?= $(shell if command -v ${DOCKER_BIN} >/dev/null 2>&1 ; then echo false; else echo true; fi)
DOCKER_IMG := riscvintl/riscv-docs-base-container-image:latest
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't know if I would bother with the complexity of docker for this. The only reason it's needed in riscv-isa-manual is because setting up Asciidoctor and all the plugins is a right pain, but I think it's probably an acceptable pain for people wanting to run these tests (and CI). Especially because the only requirement is Asciidoctor I think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I don't need any of the Asciidoctor plugins. Obviously I'm leveraging the docker image and Makefile from the ISA manual. If I don't do this, then as you point out, people will need to have Asciidoctor installed to run the tests. I don't have Asciidoctor installed on my Windows machine (I run this on WSL2 with docker) so that would open a whole new can of worms if I now need to have Asciidoctor installed. So, in summary, I'd like to keep this they way it is since people are already familiar with using the docker image in the ISA manual. Do you agree?

cd [email protected] &&
endif

WORKDIR_SETUP = \
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can probably skip this workdir stuff too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just being "efficient" by leveraging the ISA manual Makefile. Seems to work well so why fix it if it ain't broke?

@james-ball-qualcomm
Copy link
Collaborator Author

Getting pre-commit failure for expected JSON files that don't have extra line at the end (not a requirement for JSON files). Submitted #76 to get this fixed.

@james-ball-qualcomm
Copy link
Collaborator Author

Generally looks good to me!

Is there an existing github workflow that this could be added to?

I was wondering that too. Doesn't look like is anything like that in this repo. UDB has this kind of thing so I've seen it run on the GitHub servers during a PR. That would be ideal to setup for this docs-resources repo too. That will take someone with GitHub actions expertise (which I don't have). I could learn it but given all on my plate I don't think I can justify that.

@rpsene, is this something you could help with? I think you are already up-to-speed on GitHub actions and PR checks.

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.

Create unit tests for "tags" backend and "create-norm-rules.rb"
2 participants