reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
from __future__ import absolute_import

import lit.TestRunner
import lit.util

from .base import FileBasedTest


class ShTest(FileBasedTest):
    """ShTest is a format with one file per test.

    This is the primary format for regression tests as described in the LLVM
    testing guide:

        http://llvm.org/docs/TestingGuide.html

    The ShTest files contain some number of shell-like command pipelines, along
    with assertions about what should be in the output.
    """
    def __init__(self, execute_external=False):
        self.execute_external = execute_external

    def execute(self, test, litConfig):
        return lit.TestRunner.executeShTest(test, litConfig,
                                            self.execute_external)