コード例 #1
0
    def test_find_executable(self):
        shell = "sh"
        if common.get_current_platform() == common.PLATFORM_WINDOWS:
            shell = "cmd"

        exe_path = common.find_executable(shell)
        assert exe_path != None
コード例 #2
0
    def test_find_executable(self):
        shell = "sh"
        if common.get_current_platform() == common.PLATFORM_WINDOWS:
            shell = "cmd"

        exe_path = common.find_executable(shell)
        assert exe_path != None
コード例 #3
0
import errno
import shutil
import tarfile
import urllib2
import tempfile
import subprocess
import logging
from cStringIO import StringIO
from nose.plugins.skip import SkipTest
from nose.tools import *                # assert_etc()
from autobuild import common
from autobuild.autobuild_tool_upload import upload, UploadError, \
     SCPConnection, S3Connection, S3ConnectionError, SCPConnectionError, logger

scp = common.get_default_scp_command()
ssh = common.find_executable(['ssh', 'plink'], ['.exe'])
USER = os.environ.get("USER", common.get_current_user())

def assert_in(sought, data):
    assert sought in data, "%r not in %r" % (sought, data)

def assert_not_in(sought, data):
    assert sought not in data, "%r in %r" % (sought, data)

def assert_startswith(data, pfx):
    assert data.startswith(pfx), "%r doesn't startwith(%r)" % (data, pfx)

def setup():
    """
    This setup() function is run once for this whole module, as opposed to
    TestWithConfigFile.setup(), which is run once per test method.