Пример #1
0
            try:
                port = int(arg)
            except ValueError:
                print("The provided port must be an integer.", file=sys.stderr)
                usage()
        elif opt == "-h":
            usage()
        elif opt == "-j":
            jobs = int(arg)
        elif opt == "-q":
            quiet = True
        elif opt == "-l":
            system_test = True
            print("Running tests on live system.")

    pkg5testenv.setup_environment("../../proto", system_test=system_test)

import baseline
import platform
import re
import shutil
import subprocess
import types
import unittest

import pkg5unittest
import pkg.client.api as api
from pkg5unittest import OUTPUT_DOTS, OUTPUT_VERBOSE, OUTPUT_PARSEABLE

# Verify that CLIENT_API_VERSION is compatible.
if pkg5unittest.CLIENT_API_VERSION not in api.COMPATIBLE_API_VERSIONS:
Пример #2
0
def setup_environment(proto):
        pkg5testenv.setup_environment(proto)
Пример #3
0
def setup_environment(proto):
    pkg5testenv.setup_environment(proto)
Пример #4
0
# Make sure current directory is in the path
sys.path.insert(0, ".")

# Create a temporary directory for storing coverage data.
import tempfile

covdir = tempfile.mkdtemp(prefix=".coverage-", dir=os.getcwd())

import pkg5testenv

cov = None
if __name__ == "__main__":
    # By specifying a directory for storing coverage data, this will
    # start coverage immediately after initial environment setup and
    # before any other pkg(5) modules are imported.
    cov = pkg5testenv.setup_environment("../../proto", covdir=covdir)

import baseline
import coverage
import fcntl
import getopt
import platform
import re
import shutil
import subprocess
import types
import unittest
import warnings

import pkg5unittest
from pkg5unittest import OUTPUT_DOTS, OUTPUT_VERBOSE, OUTPUT_PARSEABLE