示例#1
0
文件: packages.py 项目: Andy10101/dtf
def launch_builtin_module(cmd, args):

    """Launch a dtf built-in python command"""

    launch_path = "%s/core/cmds/%s.py" % (utils.get_pydtf_dir(), cmd)

    return __launch_python_module(launch_path, cmd, args)
示例#2
0
def launch_builtin_module(cmd, args, chdir=True, skip_checks=False):
    """Launch a dtf built-in python command"""

    launch_path = "%s/core/cmds/%s.py" % (utils.get_pydtf_dir(), cmd)

    return __launch_python_module(launch_path,
                                  cmd,
                                  args,
                                  chdir=chdir,
                                  skip_checks=skip_checks)
示例#3
0
def launch_builtin_module(cmd, args):
    """Launch a dtf built-in python command"""

    launch_path = "%s/core/cmds/%s.py" % (utils.get_pydtf_dir(), cmd)

    return __launch_python_module(launch_path, cmd, args)
示例#4
0
# Android Device Testing Framework ("dtf")
# Copyright 2013-2015 Jake Valletta (@jake_valletta)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
"""Global dtf locations"""

import dtf.core.utils as utils

DTF_DATA_DIR = utils.get_dtf_data_dir()
DTF_BINARIES_DIR = DTF_DATA_DIR + "/binaries/"
DTF_LIBRARIES_DIR = DTF_DATA_DIR + "/libraries/"
DTF_MODULES_DIR = DTF_DATA_DIR + "/modules/"
DTF_PACKAGES_DIR = DTF_DATA_DIR + "/packages/"
DTF_DB = DTF_DATA_DIR + "/main.db"

DTF_INCLUDED_DIR = utils.get_pydtf_dir() + "/included"

示例#5
0
文件: client.py 项目: heeeeen/dtf
# limitations under the License.
#
"""Built-in module for client on device """

from dtf.module import Module

import dtf.adb as DtfAdb
import dtf.logging as log
import dtf.properties as prop
import dtf.core.utils as utils

from dtf.constants import DTF_CLIENT
from argparse import ArgumentParser
from os.path import isfile

DTF_CLIENT_PATH = "%s/included/dtfClient/com.dtf.client-1.1.apk" % utils.get_pydtf_dir()

DEFAULT_PATH = "/mnt/sdcard"


class client(Module):

    """Module class for dtf client"""

    adb = DtfAdb.DtfAdb()

    @classmethod
    def usage(cls):

        """Display module usage"""
示例#6
0
#
"""Built-in module for client on device """

from dtf.module import Module

import dtf.adb as DtfAdb
import dtf.logging as log
import dtf.properties as prop
import dtf.core.utils as utils

from dtf.constants import DTF_CLIENT
from argparse import ArgumentParser
from os.path import isfile

DTF_CLIENT_PATH = ("%s/included/dtfClient/com.dtf.client-1.1.apk" %
                                                utils.get_pydtf_dir())

DEFAULT_PATH = '/mnt/sdcard'

class client(Module):

    """Module class for dtf client"""

    adb = DtfAdb.DtfAdb()

    @classmethod
    def usage(cls):

        """Display module usage"""

        print "dtf Client Manager"