15bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# Copyright (C) 2016 The Android Open Source Project 25bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# 35bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# Licensed under the Apache License, Version 2.0 (the "License"); 45bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# you may not use this file except in compliance with the License. 55bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# You may obtain a copy of the License at 65bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# 75bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# http://www.apache.org/licenses/LICENSE-2.0 85bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# 95bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# Unless required by applicable law or agreed to in writing, software 105bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# distributed under the License is distributed on an "AS IS" BASIS, 115bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 125bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# See the License for the specific language governing permissions and 135bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond# limitations under the License. 145bbcc3861c44435f89481f80946ef5c9c49968f2Luke Drummond 15a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond'''Module that contains the test TestLanguage.''' 16a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond 17a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummondfrom __future__ import absolute_import 18a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond 19a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummondfrom harness.test_base import TestBaseNoTargetProcess 20a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond 21a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond 22a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummondclass TestLanguage(TestBaseNoTargetProcess): 23a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond ''' 24a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond Tests the "language" command and "language renderscript" subcommand. 25a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond ''' 26a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond 27a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond def test_lldb_has_language_commands(self): 28a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond ci = self._ci 29a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond self.assert_true( 30a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond ci.HasCommands() and 31a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond ci.CommandExists('language') 32a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond ) 33a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond 34a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond self.try_command('language', ['renderscript']) 35a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond self.try_command('language renderscript', ['kernel', 36a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond 'context', 37a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond 'module', 38a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond 'status']) 39a3c6f62775506c95afd556e617f14d7a28839f01Luke Drummond 40