mirror of
https://github.com/AdaCore/langkit.git
synced 2026-02-12 12:28:12 -08:00
Testsuite: refactor OCaml handling
Instead of using a dedicated machinery to automatically skip tests requiring an OCaml toolchain, use the standard "control" mechanism from e3-testsuite. TN: S521-024
This commit is contained in:
@@ -2,7 +2,7 @@ import os
|
||||
import os.path
|
||||
|
||||
from e3.testsuite.control import YAMLTestControlCreator
|
||||
from e3.testsuite.driver.classic import TestAbortWithError, TestSkip
|
||||
from e3.testsuite.driver.classic import TestAbortWithError
|
||||
from e3.testsuite.driver.diff import DiffTestDriver, PatternSubstitute
|
||||
|
||||
from drivers.valgrind import valgrind_cmd
|
||||
@@ -17,15 +17,6 @@ class BaseDriver(DiffTestDriver):
|
||||
def test_control_creator(self):
|
||||
return YAMLTestControlCreator(self.env.control_condition_env)
|
||||
|
||||
def set_up(self):
|
||||
super().set_up()
|
||||
|
||||
if (
|
||||
self.test_env.get('require_ocaml', False) and
|
||||
self.env.options.disable_ocaml
|
||||
):
|
||||
raise TestSkip('Test requires OCaml')
|
||||
|
||||
@property
|
||||
def output_refiners(self):
|
||||
# RA22-015: Line numbers for Python DSL diagnostics vary depending on
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
driver: python
|
||||
require_ocaml: True
|
||||
encoding: utf-8
|
||||
control:
|
||||
- [SKIP, "not has_ocaml", "OCaml support required"]
|
||||
|
||||
@@ -106,6 +106,7 @@ class LangkitTestsuite(Testsuite):
|
||||
self.env.rewrite_baselines = args.rewrite
|
||||
self.env.control_condition_env = {
|
||||
'restricted_env': args.restricted_env,
|
||||
'has_ocaml': not args.disable_ocaml,
|
||||
}
|
||||
|
||||
if args.coverage:
|
||||
|
||||
Reference in New Issue
Block a user