199451b44SJordan Rupprechtimport lldb 299451b44SJordan Rupprechtfrom lldbsuite.test.lldbtest import * 399451b44SJordan Rupprechtfrom lldbsuite.test.decorators import * 499451b44SJordan Rupprecht 599451b44SJordan Rupprecht 62238dcc3SJonas Devlieghereclass InvalidArgsLogTestCase(TestBase): 799451b44SJordan Rupprecht @no_debug_info_test 899451b44SJordan Rupprecht def test_enable_empty(self): 92238dcc3SJonas Devlieghere self.expect( 102238dcc3SJonas Devlieghere "log enable", 112238dcc3SJonas Devlieghere error=True, 122238dcc3SJonas Devlieghere substrs=[ 132238dcc3SJonas Devlieghere "error: log enable takes a log channel and one or more log types." 142238dcc3SJonas Devlieghere ], 152238dcc3SJonas Devlieghere ) 1699451b44SJordan Rupprecht 1799451b44SJordan Rupprecht @no_debug_info_test 1899451b44SJordan Rupprecht def test_disable_empty(self): 192238dcc3SJonas Devlieghere self.expect( 202238dcc3SJonas Devlieghere "log disable", 212238dcc3SJonas Devlieghere error=True, 222238dcc3SJonas Devlieghere substrs=[ 232238dcc3SJonas Devlieghere "error: log disable takes a log channel and one or more log types." 242238dcc3SJonas Devlieghere ], 252238dcc3SJonas Devlieghere ) 26867c347cSRaphael Isemann 27867c347cSRaphael Isemann @no_debug_info_test 28*a4c18137SMichael Buch def test_enable_invalid_path(self): 29c6cc566cSRaphael Isemann invalid_path = os.path.join("this", "is", "not", "a", "valid", "path") 302238dcc3SJonas Devlieghere self.expect( 312238dcc3SJonas Devlieghere "log enable lldb all -f " + invalid_path, 322238dcc3SJonas Devlieghere error=True, 332238dcc3SJonas Devlieghere substrs=["Unable to open log file '" + invalid_path + "': ", "\n"], 342238dcc3SJonas Devlieghere ) 35