Beispiel #1
0
    def setup(self):
        """
        Testcase setup.

        To setup a test case, we need to checkout the correct git
        branch, set the optimisation level, and build the program.
        """
        const = self.invars["const"]
        olevel = self.invars["Olevel"]

        # Checkout correct source.
        if const:
            git.checkout("master")
        else:
            git.checkout("no-const")

        # Set Olevel
        system.sed("(^OPTIMISATION_LEVEL = ).*", "\\1{}" % olevel, "Makefile")

        # Build project.
        make.clean()
        make.target("./examples/example1")
Beispiel #2
0
    def setup(self):
        """
        Testcase setup.

        Set the correct border size, then build the benchmark.
        """
        border = self.invars["border"]

        # Set the border size.
        system.sed("(define NORTH) [0-9]+", "\\1 {}" % border[0],
                   self.SRC)
        system.sed("(define WEST) [0-9]+", "\\1 {}" % border[1],
                   self.SRC)
        system.sed("(define SOUTH) [0-9]+", "\\1 {}" % border[2],
                   self.SRC)
        system.sed("(define EAST) [0-9]+", "\\1 {}" % border[3],
                   self.SRC)

        # Build benchmark.
        fs.cd(BUILD_ROOT)
        make.clean()
        make.target("SimpleBig")