• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2#
3# Copyright (C) 2019 The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License"); you may not
6# use this file except in compliance with the License. You may obtain a copy of
7# the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14# License for the specific language governing permissions and limitations under
15# the License.
16"""
17Script for initializing a cmd line tool for PTS and other purposes.
18Required custom config parameters:
19'target_mac_address': '00:00:00:00:00:00'
20
21"""
22from acts.base_test import BaseTestClass
23from fuchsia_cmd_input import CmdInput
24from queue import Empty
25
26import os
27import uuid
28
29from acts.test_utils.tel.tel_test_utils import setup_droid_properties
30
31
32class FuchsiaCmdLineTest(BaseTestClass):
33    target_device_name = ""
34
35    def __init__(self, controllers):
36        BaseTestClass.__init__(self, controllers)
37        if not "target_device_name" in self.user_params.keys():
38            self.log.warning("Missing user config \"target_device_name\"!")
39            self.target_device_name = ""
40        else:
41            self.target_device_name = self.user_params["target_device_name"]
42
43        # TODO: Make sl4f function
44        # Possibly set_name in fidl_fuchsia_bluetooth_control.rs
45        #self.fuchsia_devices[0].droid.bluetoothSetLocalName("CMD LINE Test")
46
47    def test_cmd_line_helper(self):
48        cmd_line = CmdInput()
49        cmd_line.setup_vars(self.fuchsia_devices, self.target_device_name,
50                            self.log)
51        cmd_line.cmdloop()
52        return True
53