Пример #1
0
 def test_create_build_directory(self):
     cfg = utils.read_config(self.env)
     build_dir = "temp"
     cfg["build_dir"] = build_dir
     utils.create_build_directory(cfg)
     build_dir = os.path.join(utils.get_project_base(), build_dir)
     self.assertTrue(os.path.exists(build_dir))
     os.rmdir(build_dir)
Пример #2
0
def create_trace_dir(config):
    """
    Create a trace directory in the build folder

    Args:
        config (dictionary): configuration dictionary

    Return:
        (string): trace output directory (relative)

    Raises:
        Nothing
    """
    #Create a output directory if it does not exist
    build_dir = utils.create_build_directory(config)
    #Now I have an output directory to put stuff in
    #Create an XST directory to put stuff related to XST
    trace_dir = os.path.join(build_dir, TRACE_DIR)
    if not os.path.exists(trace_dir):
        os.makedirs(trace_dir)
    return trace_dir
Пример #3
0
def create_bitgen_dir(config):
    """
    Create an bitgen directory in the build folder

    Args:
        config (dictionary): configuration dictionary

    Return:
        (string): bitgen output directory (relative)

    Raises:
        Nothing
    """
    #Create a output directory if it does not exist
    build_dir = utils.create_build_directory(config)
    #Now I have an output directory to put stuff in
    #Create an XST directory to put stuff related to XST
    bitgen_dir = os.path.join(build_dir, BITGEN_DIR)
    if not os.path.exists(bitgen_dir):
        os.makedirs(bitgen_dir)
    return bitgen_dir