Example #1
0
 def create_benchmark_dir(dpath):
     expected = [pbf.Directory(path.join(dpath,'src'), [], version_scanner()),
                 pbf.Directory(path.join(dpath,'tools'), 
                           [pbf.File(path.join(dpath,'compare-output'))]),
                 pbf.Directory(path.join(dpath,'build'), must_exist=False),
                 pbf.Directory(path.join(dpath,'run'), must_exist=False),
                 _desc_file(dpath)]
     return pbf.Directory(dpath, expected)
Example #2
0
    def getTemporaryOutputDir(self, benchmark):
        """Get the pbf.Directory for the output of a benchmark run.
        This function should always return the same pbf.Directory if its parameters
        are the same.  The output path is not the path where the reference
        output is stored."""

        rundir = globals.benchdir.getChildByName(benchmark.name).getChildByName('run')

        if rundir.getChildByName(self.name) is None:
            datasetpath = path.join(rundir.getPath(), self.name)
            filepath = path.join(datasetpath, self.outFiles[0])
            rundir.addChild(pbf.Directory(datasetpath, [pbf.File(filepath, False)]))
        
        return rundir.getChildByName(self.name)
Example #3
0
def _desc_file(dpath):
    """_desc_file(dpath) 
    Returns a pbf.File for an optional description file in the directory dpath."""

    return pbf.File(path.join(dpath, 'DESCRIPTION'), False)