| 1 |
# DExTer : Debugging Experience Tester |
| 2 |
# ~~~~~~ ~ ~~ ~ ~~ |
| 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-exception |
| 7 |
"""A Command that specifies the command line with which to run the test. |
| 8 |
""" |
| 9 |
|
| 10 |
from dex.command.CommandBase import CommandBase |
| 11 |
|
| 12 |
|
| 13 |
class 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_cmdline |
| 23 |
super(DexCommandLine, self).__init__() |
| 24 |
|
| 25 |
def eval(self): |
| 26 |
raise NotImplementedError("DexCommandLine commands cannot be evaled.") |
| 27 |
|
| 28 |
@staticmethod |
| 29 |
def get_name(): |
| 30 |
return __class__.__name__ |
| 31 |
|
| 32 |
@staticmethod |
| 33 |
def get_subcommands() -> dict: |
| 34 |
return None |