nchammas commented on code in PR #59250:
URL: https://github.com/apache/spark/pull/59250#discussion_r4251848559


##########
dev/sparktestsupport/modules.py:
##########
@@ -102,6 +104,46 @@ def is_ignored_file(filename: str) -> bool:
     return False
 
 
+class TestStage(Enum):
+    """
+    When a test goal runs in dev/run-tests.py, relative to the Spark build.
+    """
+
+    PRE_BUILD = "pre_build"
+    # Before assembly; still runs when SKIP_SCALA_BUILD=true.
+    POST_BUILD = "post_build"
+    # After SBT assembly; skipped when SKIP_SCALA_BUILD=true.
+    POST_ASSEMBLY_SBT = "post_assembly_sbt"
+    # After assembly, whether built from scratch or restored from an artifact;
+    # still runs when SKIP_SCALA_BUILD=true.
+    POST_ASSEMBLY = "post_assembly"
+
+
+@dataclass(frozen=True)
+class ShellScriptTestGoal:
+    """
+    Describe a shell script test goal.
+
+    >>> goal = ShellScriptTestGoal("dev/example")
+    >>> goal.stage.value
+    'pre_build'
+
+    A plain-string stage would silently never match, so it is rejected:
+
+    >>> ShellScriptTestGoal("dev/example", "post_build")
+    Traceback (most recent call last):
+        ...
+    TypeError: Unsupported test stage: 'post_build'
+    """
+
+    path: str
+    stage: TestStage = TestStage.PRE_BUILD
+
+    def __post_init__(self) -> None:

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to