Ejemplo n.º 1
0
import os
import genutil
import subprocess
import platform
from mod import log
from mod import util
from mod import settings

#-------------------------------------------------------------------------------
# HACK: Find fips-deploy dir the hard way
# TODO: Fips need pass to generators the fips-deploy dir ready to be used
os_name = platform.system().lower()
extension = ""
proj_path = os.path.normpath('{}/..'.format(
    os.path.dirname(os.path.abspath(__file__))))
items = settings.load(proj_path)
if not items:
    items = {'config': settings.get_default('config')}

# HACK: even setting PROJECT in fips_setup does not work here without a way to get the
# fips-deploy path, so we force to search in Project for windows as it is the default
if os_name == "windows":
    extension = ".exe"

deploy_path = util.get_deploy_dir("../fips", "fips-tests",
                                  {'name': items['config']})


#-------------------------------------------------------------------------------
def get_generator_path():
    """find util_generate_requires exectuable, fail if not exists"""
Ejemplo n.º 2
0
import os
import genutil
import subprocess
import platform
from mod import log
from mod import util
from mod import settings

#-------------------------------------------------------------------------------
# HACK: Find fips-deploy dir the hard way
# TODO: Fips need pass to generators the fips-deploy dir ready to be used
os_name = platform.system().lower()
extension = ""
proj_path = os.path.normpath('{}/..'.format(os.path.dirname(os.path.abspath(__file__))))
items = settings.load(proj_path)
if not items:
    items = {'config': settings.get_default('config')}

# HACK: even setting PROJECT in fips_setup does not work here without a way to get the
# fips-deploy path, so we force to search in Project for windows as it is the default
if os_name == "windows":
    extension = ".exe"

deploy_path = util.get_deploy_dir("../fips", "fips-tests", {'name': items['config']})

#-------------------------------------------------------------------------------
def get_generator_path() :
    """find util_generate_requires exectuable, fail if not exists"""

    bin_path = os.path.abspath('{}/util_generate_requires{}'.format(deploy_path, extension))