diff --git a/test/BUILD b/test/BUILD index e46ae090186..2261b685767 100644 --- a/test/BUILD +++ b/test/BUILD @@ -258,6 +258,8 @@ pipeline_tests( pipeline_tests( "test_corpus_prism", glob([ + # Replace [parser] with other phases to test Prism at that level + # Phases: https://github.com/Shopify/sorbet/blob/prism/docs/internals.md#phases "testdata/parser/**/*.rb", "testdata/parser/**/*.exp", ]), diff --git a/test/pipeline_test.bzl b/test/pipeline_test.bzl index 48aece5d925..74cc9240917 100644 --- a/test/pipeline_test.bzl +++ b/test/pipeline_test.bzl @@ -142,6 +142,14 @@ def pipeline_tests(suite_name, all_paths, test_name_prefix, extra_files = [], ta "disabled": "disabled" in test_name, "isPackage": True, } + + # Tests that run with Prism parser need to have "_prism" appended to their name + # to differentiate them from the tests that run with Sorbet parser. + # The condition here is only for the packager tests + # Other tests are handled below. + if parser == "prism": + test_name = test_name + "_prism" + tests[test_name] = data continue