Skip to content

Conversation

iliabylich
Copy link
Contributor

Added a test runner that

  1. iterates over lexer/fixtures, parser/fixtures
  2. runs a simple parser on a fixture
  3. runs a lexer (or a parser)
  4. compares it with the expectation from the fixture

I'm not sure about the format. Any thoughts?

Also this PR includes a Makefile (and GitHub action) to run those tests (so far there are only 2 fixtures) with ASAN+LSAN.

@caution-tape-bot
Copy link

👋 It seems that this PR is adding a GitHub Action workflow that looks a lot like a CI step.

CI should generally be handled with Shopify Build pipelines, and GitHub Actions should be used for GitHub automation and package publishing.

If this workflow change is not introducing a CI step, then feel free to ignore this comment.

For more details and explanation, click to expand...

GitHub Actions are generally intended for GitHub, Project or Repository-related automation, or for public package and library publishing. You can learn more about the supported use cases in our GitHub Actions documentation.

If your Action is a CI step, please migrate to shopify-build instead. If you have any questions about how to setup a shopify-build pipeline, don't hesitate to ask them in #help-eng-infrastructure.

Note that this message is based on a simple regex detection, and may not always be accurate. If your action is not a CI step, and is already running on shopify-ubuntu-latest or similar, feel free to ignore this message.

If your repository is intended to become Public later, please use runs-on: shopify-ubuntu-latest for now and ignore the rest of this comment. If you think this workflow has been mistakenly labeled as a CI step, please let us know by commenting your reasons below.

View the source of this rule in Services DB

@caution-tape-bot
Copy link

👋 It seems that this PR is adding, or editing, a GitHub Action workflow that is not configured to use our custom GitHub Action runners.

For private repositories, the only supported way of running Action workflows is via the custom runners. You can learn more about the supported use cases in our GitHub Actions documentation.

To make sure that your workflow is using these runners you need to add the shopify-ubuntu-latest label to your workflow manifest file, or shopify-core-ubuntu-latest for Core repositories:

runs-on: shopify-ubuntu-latest

If your repository is intended to become Public later, please use runs-on: shopify-ubuntu-latest for now. The custom runners should function the same as ubuntu-latest public runners.

If you run into any issues with the custom runners, please reach out in #help-eng-infrastructure.

View the source of this rule in Services DB

@kddnewton
Copy link
Collaborator

We can iterate on the format a bit, but I like this direction a lot

@kddnewton kddnewton merged commit 55a3d7f into main Sep 23, 2022
@kddnewton kddnewton deleted the native-test-runner branch September 23, 2022 14:57
peterzhu2118 added a commit that referenced this pull request Oct 5, 2025
We need to free the current_block_exits in parse_program when we're done
with it to prevent memory leaks. This fixes the following memory leak detected
when running Ruby using `RUBY_FREE_AT_EXIT=1 ruby -nc -e "break"`:

    Direct leak of 32 byte(s) in 1 object(s) allocated from:
        #0 0x5bd3c5bc66c8 in realloc (miniruby+0x616c8) (BuildId: ba6a96e5a060aec6fd9f05ed7e95d9627e1dbd74)
        #1 0x5bd3c5f91fd9 in pm_node_list_grow prism/templates/src/node.c.erb:35:40
        #2 0x5bd3c5f91e9d in pm_node_list_append prism/templates/src/node.c.erb:48:9
        #3 0x5bd3c6001fa0 in parse_block_exit prism/prism.c:15788:17
        #4 0x5bd3c5fee155 in parse_expression_prefix prism/prism.c:19221:50
        #5 0x5bd3c5fe9970 in parse_expression prism/prism.c:22235:23
        #6 0x5bd3c5fe0586 in parse_statements prism/prism.c:13976:27
        #7 0x5bd3c5fd6792 in parse_program prism/prism.c:22508:40
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.

2 participants