Class NativeTestExecutor
java.lang.Object
org.ek9lang.cli.NativeTestExecutor
- All Implemented Interfaces:
TestExecutor
Executes native LLVM-compiled test programs as subprocesses.
This executor spawns each test program as a separate native process, capturing stdout and stderr. Used for LLVM-compiled EK9 programs.
Process execution includes:
- Timeout handling to prevent hung tests
- Separate capture of stdout and stderr streams
- Cross-platform executable resolution
-
Nested Class Summary
Nested classes/interfaces inherited from interface TestExecutor
TestExecutor.ExecutionResult -
Constructor Summary
ConstructorsConstructorDescriptionNativeTestExecutor(Path executableDir) Create a native test executor with default timeout.NativeTestExecutor(Path executableDir, long timeoutSeconds) Create a native test executor with specified timeout. -
Method Summary
Modifier and TypeMethodDescriptionexecute(TestProgram test) Execute a test program and capture its output.execute(TestProgram test, List<String> arguments) Execute a test program with command line arguments.
-
Constructor Details
-
NativeTestExecutor
NativeTestExecutor(Path executableDir) Create a native test executor with default timeout.- Parameters:
executableDir- Directory containing compiled native executables
-
NativeTestExecutor
NativeTestExecutor(Path executableDir, long timeoutSeconds) Create a native test executor with specified timeout.- Parameters:
executableDir- Directory containing compiled native executablestimeoutSeconds- Maximum execution time per test
-
-
Method Details
-
execute
Description copied from interface:TestExecutorExecute a test program and capture its output.- Specified by:
executein interfaceTestExecutor- Parameters:
test- The test program to execute- Returns:
- Execution result with captured output and status
-
execute
Description copied from interface:TestExecutorExecute a test program with command line arguments.Used for parameterized black-box tests where arguments are read from commandline_arg_*.txt files.
- Specified by:
executein interfaceTestExecutor- Parameters:
test- The test program to executearguments- Command line arguments to pass- Returns:
- Execution result with captured output and status
-