brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 77615e7 Raw
35 lines · python
1# DExTer : Debugging Experience Tester2# ~~~~~~   ~         ~~         ~   ~~3#4# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5# See https://llvm.org/LICENSE.txt for license information.6# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7"""A Command that specifies the command line with which to run the test.8"""9 10from dex.command.CommandBase import CommandBase11 12 13class DexCommandLine(CommandBase):14    def __init__(self, the_cmdline):15        if type(the_cmdline) is not list:16            raise TypeError("Expected list, got {}".format(type(the_cmdline)))17        for x in the_cmdline:18            if type(x) is not str:19                raise TypeError(20                    'Command line element "{}" has type {}'.format(x, type(x))21                )22        self.the_cmdline = the_cmdline23        super(DexCommandLine, self).__init__()24 25    def eval(self):26        raise NotImplementedError("DexCommandLine commands cannot be evaled.")27 28    @staticmethod29    def get_name():30        return __class__.__name__31 32    @staticmethod33    def get_subcommands() -> dict:34        return None35