Ejemplo n.º 1
0
    def WriteMakefiles(self, option=""):

        from madanalysis.build.makefile_writer import MakefileWriter
        options = MakefileWriter.MakefileOptions()

        # Name of the Makefile
        filename = self.path + "/Build/Makefile"

        # Header
        title = 'MadAnalysis Job'

        # Options
        options.has_commons = True
        options.has_process = True
        if self.main.archi_info.has_root:
            options.has_root_inc = True
            options.has_root_lib = True
        #options.has_userpackage = True
        toRemove = [
            'Log/compilation.log', 'Log/linking.log', 'Log/cleanup.log',
            'Log/mrproper.log'
        ]

        # File to compile
        cppfiles = ['Main/*.cpp', 'SampleAnalyzer/User/*/*.cpp']
        hfiles = ['Main/*.h', 'SampleAnalyzer/User/*/*.h']

        # Files to produce
        isLibrary = False
        ProductName = 'MadAnalysis5job'
        ProductPath = './'

        # Write makefile
        MakefileWriter.Makefile(filename,
                                title,
                                ProductName,
                                ProductPath,
                                isLibrary,
                                cppfiles,
                                hfiles,
                                options,
                                self.main.archi_info,
                                toRemove,
                                moreIncludes=['./'])

        # Setup
        from madanalysis.build.setup_writer import SetupWriter
        SetupWriter.WriteSetupFile(True, self.path + '/Build/',
                                   self.main.archi_info)
        SetupWriter.WriteSetupFile(False, self.path + '/Build/',
                                   self.main.archi_info)

        # Ok
        return True
Ejemplo n.º 2
0
    def WriteSampleAnalyzerMakefile(self, option=""):

        from madanalysis.build.makefile_writer import MakefileWriter
        options = MakefileWriter.MakefileOptions()

        # Name of the Makefile
        filename = self.path + "/Build/SampleAnalyzer/Makefile"

        # Header
        title = 'User package'

        # Options
        option.has_commons = True
        options.has_process = True
        if self.main.archi_info.has_root:
            options.has_root_inc = True
            options.has_root_lib = True
        toRemove.extend(
            ['compilation.log', 'linking.log', 'cleanup.log', 'mrproper.log'])

        # File to compile
        cppfiles = package + '/*.cpp'
        hfiles = package + '/*.h'

        # Files to produce
        isLibrary = True
        ProductName = 'libUserPackage_for_ma5.so'
        ProductPath = '../../Build/Lib/'

        # write makefile
        MakefileWriter.Makefile(filename, title, ProductName, ProductPath,
                                isLibrary, cppfiles, hfiles, options,
                                self.main.archi_info, toRemove)

        # Ok
        return True
Ejemplo n.º 3
0
    def WriteMakefileForInterfaces(self,package):

        from madanalysis.build.makefile_writer import MakefileWriter
        options=MakefileWriter.MakefileOptions()
        
        # Name of the Makefile
        filename = self.path+"/SampleAnalyzer/Interfaces/Makefile_"+package
        if package=='commons':
            filename = self.path+"/SampleAnalyzer/Commons/Makefile"
        elif package=='configuration':
            filename = self.path+"/SampleAnalyzer/Configuration/Makefile"
        elif package=='process':
            filename = self.path+"/SampleAnalyzer/Process/Makefile"
        elif package=='test_process':
            filename = self.path+"/SampleAnalyzer/Test/Makefile_process"
        elif package=='test_commons':
            filename = self.path+"/SampleAnalyzer/Test/Makefile_commons"
        elif package=='test_zlib':
            filename = self.path+"/SampleAnalyzer/Test/Makefile_zlib"
        elif package=='test_fastjet':
            filename = self.path+"/SampleAnalyzer/Test/Makefile_fastjet"
        elif package=='test_delphes':
            filename = self.path+"/SampleAnalyzer/Test/Makefile_delphes"
        elif package=='test_delphesMA5tune':
            filename = self.path+"/SampleAnalyzer/Test/Makefile_delphesMA5tune"
        elif package=='test_root':
            filename = self.path+"/SampleAnalyzer/Test/Makefile_root"

        # Header
        title=''
        if package=='commons':
            title='SampleAnalyzer commons'
        elif package=='configuration':
            title='SampleAnalyzer configuration'
        elif package=='process':
            title='SampleAnalyzer process'
        elif package=='test_commons':
            title='*commons* test'
        elif package=='test_process':
            title='*process* test'
        elif package=='test_zlib':
            title='*zlib-interface* test'
        elif package=='test_fastjet':
            title='*fastjet-interface* test'
        elif package=='test_delphes':
            title='*delphes-interface* test'
        elif package=='test_delphesMA5tune':
            title='*delphesMA5tune-interface* test'
        elif package=='test_root':
            title='*root-interface* test'
        else:
            title='interface to '+package

        toRemove=[]
        # Mode
        if package=='fastjet':
            options.has_commons=True
            options.has_fastjet_inc=True
            options.has_fastjet_lib=True
            toRemove.extend(['compilation_fastjet.log','linking_fastjet.log','cleanup_fastjet.log','mrproper_fastjet.log'])
        elif package=='test_fastjet':
            options.has_commons=True
            options.has_fastjet_ma5lib=True
          #  options.has_fastjet_lib=True
            toRemove.extend(['compilation_fastjet.log','linking_fastjet.log','cleanup_fastjet.log','mrproper_fastjet.log','../Bin/TestFastjet.log'])
        elif package=='configuration':
            toRemove.extend(['compilation.log','linking.log','cleanup.log','mrproper.log'])
        elif package=='commons':
            toRemove.extend(['compilation.log','linking.log','cleanup.log','mrproper.log'])
        elif package=='test_commons':
            options.has_commons  = True
            toRemove.extend(['compilation_commons.log','linking_commons.log','cleanup_commons.log','mrproper_commons.log','../Bin/TestCommons.log'])
        elif package=='zlib':
            options.has_commons  = True
            options.has_zlib_inc = True
            options.has_zlib_lib = True
            toRemove.extend(['compilation_zlib.log','linking_zlib.log','cleanup_zlib.log','mrproper_zlib.log'])
        elif package=='test_zlib':
            options.has_commons     = True
            options.has_zlib_ma5lib = True
          #  options.has_zlib_lib = True
            toRemove.extend(['compilation_zlib.log','linking_zlib.log','cleanup_zlib.log','mrproper_zlib.log','../Bin/TestZlib.log'])
        elif package=='delphes':
            options.has_commons     = True
            options.has_delphes_inc = True
            options.has_delphes_lib = True
            options.has_root        = True
            options.has_root_inc    = True
            options.has_root_lib    = True
            toRemove.extend(['compilation_delphes.log','linking_delphes.log','cleanup_delphes.log','mrproper_delphes.log'])
        elif package=='test_delphes':
            options.has_commons     = True
            options.has_delphes_ma5lib = True
          #  options.has_delphes_lib = True
            options.has_root_inc    = True
            options.has_root_lib    = True
            toRemove.extend(['compilation_delphes.log','linking_delphes.log','cleanup_delphes.log','mrproper_delphes.log','../Bin/TestDelphes.log'])
        elif package=='root':
            options.has_commons     = True
            options.has_root        = True
            options.has_root_inc    = True
            options.has_root_lib    = True
            options.has_delphes_tag           = self.main.archi_info.has_delphes
            options.has_delphes_ma5lib        = self.main.archi_info.has_delphes
            options.has_delphesMA5tune_tag    = self.main.archi_info.has_delphesMA5tune
            options.has_delphesMA5tune_ma5lib = self.main.archi_info.has_delphesMA5tune
            toRemove.extend(['compilation_root.log','linking_root.log','cleanup_root.log','mrproper_root.log'])
        elif package=='test_root':
            options.has_commons     = True
            if self.main.archi_info.has_delphes:
                options.has_delphes_tag    = True
                options.has_delphes_ma5lib = True
            if self.main.archi_info.has_delphesMA5tune:
                options.has_delphesMA5tune_tag    = True
                options.has_delphesMA5tune_ma5lib = True
            options.has_root        = True
            options.has_root_ma5lib = True
            options.has_root_inc    = True
            options.has_root_lib    = True
            toRemove.extend(['compilation_root.log','linking_root.log','cleanup_root.log','mrproper_root.log','../Bin/TestRoot.log'])
        elif package=='delphesMA5tune':
            options.has_commons            = True
            options.has_delphesMA5tune_lib = True
            options.has_delphesMA5tune_inc = True
            options.has_root        = True
            options.has_root_inc    = True
            options.has_root_lib    = True
            toRemove.extend(['compilation_delphesMA5tune.log','linking_delphesMA5tune.log','cleanup_delphesMA5tune.log','mrproper_delphesMA5tune.log'])
        elif package=='test_delphesMA5tune':
            options.has_commons            = True
            options.has_delphesMA5tune_ma5lib = True
            options.has_root_inc    = True
            options.has_root_lib    = True
         #   options.has_delphesMA5tune_lib = True
            toRemove.extend(['compilation_delphesMA5tune.log','linking_delphesMA5tune.log','cleanup_delphesMA5tune.log','mrproper_delphesMA5tune.log','../Bin/TestDelphesMA5tune.log'])
        elif package=='process':
            options.has_commons=True
            options.has_fastjet_ma5lib        = self.main.archi_info.has_fastjet
            options.has_delphes_ma5lib        = self.main.archi_info.has_delphes
            options.has_delphesMA5tune_ma5lib = self.main.archi_info.has_delphesMA5tune
            options.has_zlib_ma5lib           = self.main.archi_info.has_zlib
            options.has_fastjet_tag           = self.main.archi_info.has_fastjet
            options.has_delphes_tag           = self.main.archi_info.has_delphes
            options.has_delphesMA5tune_tag    = self.main.archi_info.has_delphesMA5tune
            options.has_zlib_tag              = self.main.archi_info.has_zlib
            options.has_root_tag              = self.main.archi_info.has_root
            options.has_root_ma5lib           = self.main.archi_info.has_root
            toRemove.extend(['compilation.log','linking.log','cleanup.log','mrproper.log'])
        elif package=='test_process':
            options.has_commons               = True
            options.has_process               = True
          #  options.has_fastjet_ma5lib        = self.main.archi_info.has_fastjet
          #  options.has_delphes_ma5lib        = self.main.archi_info.has_delphes
          #  options.has_delphesMA5tune_ma5lib = self.main.archi_info.has_delphesMA5tune
          #  options.has_zlib_ma5lib           = self.main.archi_info.has_zlib
          #  options.has_fastjet_lib           = self.main.archi_info.has_fastjet
          #  options.has_delphes_lib           = self.main.archi_info.has_delphes
          #  options.has_delphesMA5tune_lib    = self.main.archi_info.has_delphesMA5tune
          #  options.has_zlib_lib              = self.main.archi_info.has_zlib
          #  options.has_fastjet_tag           = self.main.archi_info.has_fastjet
          #  options.has_delphes_tag           = self.main.archi_info.has_delphes
          #  options.has_delphesMA5tune_tag    = self.main.archi_info.has_delphesMA5tune
          #  options.has_zlib_tag              = self.main.archi_info.has_zlib
            toRemove.extend(['compilation_process.log','linking_process.log','cleanup_process.log','mrproper_process.log','../Bin/TestSampleAnalyzer.log'])

        # file pattern
        if package in ['commons','process','configuration']:
            cppfiles = ['*/*.cpp']
            hfiles   = ['*/*.h']
        elif package=='test_commons':
            cppfiles = ['Commons/*.cpp']
            hfiles   = ['Commons/*.h']
        elif package=='test_process':
            cppfiles = ['Process/*.cpp']
            hfiles   = ['Process/*.h']
        elif package=='test_zlib':
            cppfiles = ['Zlib/*.cpp']
            hfiles   = ['Zlib/*.h']
        elif package=='test_fastjet':
            cppfiles = ['Fastjet/*.cpp']
            hfiles   = ['Fastjet/*.h']
        elif package=='test_delphes':
            cppfiles = ['Delphes/*.cpp']
            hfiles   = ['Delphes/*.h']
        elif package=='test_delphesMA5tune':
            cppfiles = ['DelphesMA5tune/*.cpp']
            hfiles   = ['DelphesMA5tune/*.h']
        elif package=='test_root':
            cppfiles = ['Root/*.cpp']
            hfiles   = ['Root/*.h']
        else:
            cppfiles = [package+'/*.cpp']
            hfiles   = [package+'/*.h']

        # product
        if package=='test_process':
            isLibrary=False
            ProductName='TestSampleAnalyzer'
            ProductPath='../Bin/'
        elif package=='configuration':
            isLibrary=False
            ProductName='PortabilityCheckup'
            ProductPath='../Bin/'
        elif package=='test_commons':
            isLibrary=False
            ProductName='TestCommons'
            ProductPath='../Bin/'
        elif package=='test_zlib':
            isLibrary=False
            ProductName='TestZlib'
            ProductPath='../Bin/'
        elif package=='test_fastjet':
            isLibrary=False
            ProductName='TestFastjet'
            ProductPath='../Bin/'
        elif package=='test_root':
            isLibrary=False
            ProductName='TestRoot'
            ProductPath='../Bin/'
        elif package=='test_delphes':
            isLibrary=False
            ProductName='TestDelphes'
            ProductPath='../Bin/'
        elif package=='test_delphesMA5tune':
            isLibrary=False
            ProductName='TestDelphesMA5tune'
            ProductPath='../Bin/'
        else:
            isLibrary=True
            ProductName='lib'+package+'_for_ma5.so'
            ProductPath='../Lib/'

        # write makefile
        MakefileWriter.Makefile(filename,title,ProductName,ProductPath,isLibrary,cppfiles,hfiles,options,self.main.archi_info,toRemove)

        return True
Ejemplo n.º 4
0
    def BuildLibrary(self, forced=False):
        builder = LibraryBuilder(self.archi_info)
        UpdateNeed = False
        FirstUse, Missing = builder.checkMA5()
        if not FirstUse and not Missing:
            UpdateNeed = not builder.compare()

        rebuild = forced or FirstUse or UpdateNeed or Missing

        if not rebuild:
            if not os.path.isfile(
                    self.archi_info.ma5dir +
                    '/tools/SampleAnalyzer/Lib/libprocess_for_ma5.so'):
                FirstUse = True
            rebuild = forced or FirstUse or UpdateNeed or Missing

        if not rebuild:
            self.logger.info('  => MadAnalysis libraries found.')

            # Test the program
            if not os.path.isfile(
                    self.archi_info.ma5dir +
                    '/tools/SampleAnalyzer/Bin/TestSampleAnalyzer'):
                FirstUse = True

            precompiler = LibraryWriter('lib', self)
            if not precompiler.Run(
                    'TestSampleAnalyzer', [
                        self.archi_info.ma5dir +
                        '/tools/SampleAnalyzer/Test/Process/dummy_list.txt'
                    ],
                    self.archi_info.ma5dir + '/tools/SampleAnalyzer/Bin/',
                    silent=True):
                UpdateNeed = True

            if not precompiler.CheckRun(
                    'TestSampleAnalyzer',
                    self.archi_info.ma5dir + '/tools/SampleAnalyzer/Bin/',
                    silent=True):
                UpdateNeed = True
            rebuild = forced or FirstUse or UpdateNeed or Missing

        if not rebuild:
            self.logger.info('  => MadAnalysis test program works.')
            return True

        # Compile library
        if FirstUse:
            self.logger.info(
                "  => First use of MadAnalysis (or the library is missing).")
        elif Missing:
            self.logger.info(
                "  => Libraries are missing or system configuration has changed. Need to rebuild the library."
            )
        elif UpdateNeed:
            self.logger.info(
                "  => System configuration has changed since the last use. Need to rebuild the library."
            )
        elif forced:
            self.logger.info("  => The user forces to rebuild the library.")
        # Initializing the JobWriter
        compiler = LibraryWriter('lib', self)

        # Dumping architecture
        if not self.archi_info.save(self.archi_info.ma5dir +
                                    '/tools/architecture.ma5'):
            sys.exit()

        # Library to compiles
        # |- [0] = unique name
        # |- [1] = title of the library to display
        # |- [2] =
        # |- [3] = output file to cross-check
        # |- [4] = folder
        # |- [5] = False=Library, True=Executable
        libraries = []
        libraries.append([
            'configuration', 'SampleAnalyzer configuration', 'configuration',
            self.archi_info.ma5dir +
            '/tools/SampleAnalyzer/Bin/PortabilityCheckup',
            self.archi_info.ma5dir + '/tools/SampleAnalyzer/Configuration',
            True
        ])
        libraries.append([
            'commons', 'SampleAnalyzer commons', 'commons',
            self.archi_info.ma5dir +
            '/tools/SampleAnalyzer/Lib/libcommons_for_ma5.so',
            self.archi_info.ma5dir + '/tools/SampleAnalyzer/Commons', False
        ])
        libraries.append([
            'test_commons', 'SampleAnalyzer commons', 'test_commons',
            self.archi_info.ma5dir + '/tools/SampleAnalyzer/Bin/TestCommons',
            self.archi_info.ma5dir + '/tools/SampleAnalyzer/Test/', True
        ])
        # Zlib
        if self.archi_info.has_zlib:
            libraries.append([
                'zlib', 'interface to zlib', 'zlib', self.archi_info.ma5dir +
                '/tools/SampleAnalyzer/Lib/libzlib_for_ma5.so',
                self.archi_info.ma5dir + '/tools/SampleAnalyzer/Interfaces',
                False
            ])
            libraries.append([
                'test_zlib', 'interface to zlib', 'test_zlib',
                self.archi_info.ma5dir + '/tools/SampleAnalyzer/Bin/TestZlib',
                self.archi_info.ma5dir + '/tools/SampleAnalyzer/Test/', True
            ])

        # Fastjet
        if self.archi_info.has_fastjet:
            libraries.append([
                'FastJet', 'interface to FastJet', 'fastjet',
                self.archi_info.ma5dir +
                '/tools/SampleAnalyzer/Lib/libfastjet_for_ma5.so',
                self.archi_info.ma5dir + '/tools/SampleAnalyzer/Interfaces',
                False
            ])
            libraries.append([
                'test_fastjet', 'interface to Fastjet', 'test_fastjet',
                self.archi_info.ma5dir +
                '/tools/SampleAnalyzer/Bin/TestFastjet',
                self.archi_info.ma5dir + '/tools/SampleAnalyzer/Test/', True
            ])
        # Delphes
        if self.archi_info.has_delphes:
            libraries.append([
                'Delphes', 'interface to Delphes', 'delphes',
                self.archi_info.ma5dir +
                '/tools/SampleAnalyzer/Lib/libdelphes_for_ma5.so',
                self.archi_info.ma5dir + '/tools/SampleAnalyzer/Interfaces',
                False
            ])
            libraries.append([
                'test_delphes', 'interface to Delphes', 'test_delphes',
                self.archi_info.ma5dir +
                '/tools/SampleAnalyzer/Bin/TestDelphes',
                self.archi_info.ma5dir + '/tools/SampleAnalyzer/Test/', True
            ])
        # DelphesMA5tune
        if self.archi_info.has_delphesMA5tune:
            libraries.append([
                'Delphes-MA5tune', 'interface to Delphes-MA5tune',
                'delphesMA5tune', self.archi_info.ma5dir +
                '/tools/SampleAnalyzer/Lib/libdelphesMA5tune_for_ma5.so',
                self.archi_info.ma5dir + '/tools/SampleAnalyzer/Interfaces',
                False
            ])
            libraries.append([
                'test_delphesMA5tune', 'interface to DelphesMA5tune',
                'test_delphesMA5tune', self.archi_info.ma5dir +
                '/tools/SampleAnalyzer/Bin/TestDelphesMA5tune',
                self.archi_info.ma5dir + '/tools/SampleAnalyzer/Test/', True
            ])

        # Root
        if self.archi_info.has_root:
            libraries.append([
                'Root', 'interface to Root', 'root', self.archi_info.ma5dir +
                '/tools/SampleAnalyzer/Lib/libroot_for_ma5.so',
                self.archi_info.ma5dir + '/tools/SampleAnalyzer/Interfaces',
                False
            ])
            libraries.append([
                'test_root', 'interface to Root', 'test_root',
                self.archi_info.ma5dir + '/tools/SampleAnalyzer/Bin/TestRoot',
                self.archi_info.ma5dir + '/tools/SampleAnalyzer/Test/', True
            ])

        # Process
        libraries.append([
            'process', 'SampleAnalyzer core', 'process',
            self.archi_info.ma5dir +
            '/tools/SampleAnalyzer/Lib/libprocess_for_ma5.so',
            self.archi_info.ma5dir + '/tools/SampleAnalyzer/Process', False
        ])
        libraries.append([
            'test_process', 'SampleAnalyzer core', 'test_process',
            self.archi_info.ma5dir +
            '/tools/SampleAnalyzer/Bin/TestSampleAnalyzer',
            self.archi_info.ma5dir + '/tools/SampleAnalyzer/Test/', True
        ])

        # Writing the Makefiles
        self.logger.info("")
        self.logger.info(
            "   **********************************************************")
        self.logger.info(
            "                Building SampleAnalyzer libraries     ")
        self.logger.info(
            "   **********************************************************")

        # Getting number of cores
        ncores = compiler.get_ncores2()

        # Writing the main Makefile
        from madanalysis.build.makefile_writer import MakefileWriter
        options = MakefileWriter.UserfriendlyMakefileOptions()
        options.has_commons = True
        options.has_process = True
        options.has_test = True
        options.has_zlib = self.archi_info.has_zlib
        options.has_fastjet = self.archi_info.has_fastjet
        options.has_delphes = self.archi_info.has_delphes
        options.has_delphesMA5tune = self.archi_info.has_delphesMA5tune
        #MakefileWriter.UserfriendlyMakefileForSampleAnalyzer(self.archi_info.ma5dir+'/tools/SampleAnalyzer/Makefile',options)

        # Writing the setup
        self.logger.info("   Writing the setup files ...")
        from madanalysis.build.setup_writer import SetupWriter
        SetupWriter.WriteSetupFile(
            True, self.archi_info.ma5dir + '/tools/SampleAnalyzer/',
            self.archi_info)
        SetupWriter.WriteSetupFile(
            False, self.archi_info.ma5dir + '/tools/SampleAnalyzer/',
            self.archi_info)
        # Writing the makefile
        self.logger.info("   Writing all the Makefiles ...")
        for ind in range(0, len(libraries)):
            if not compiler.WriteMakefileForInterfaces(libraries[ind][2]):
                self.logger.error("library building aborted.")
                sys.exit()
        if not compiler.WriteMakefileForInterfaces('test'):
            self.logger.error("test program building aborted.")
            sys.exit()

        # Compiling the libraries
        for ind in range(0, len(libraries)):

            isLibrary = not libraries[ind][5]
            if isLibrary:
                product = 'library'
            else:
                product = 'test program'

            self.logger.info(
                "   **********************************************************"
            )
            self.logger.info("   Component " + str(ind + 1) + "/" +
                             str(len(libraries)) + " - " + product + ": " +
                             libraries[ind][1])

            # Cleaning the project
            self.logger.info(
                "     - Cleaning the project before building the " + product +
                " ...")
            if not compiler.MrProper(libraries[ind][2], libraries[ind][4]):
                self.logger.error("The " + product + " building aborted.")
                sys.exit()

            # Compiling
            self.logger.info("     - Compiling the source files ...")
            if not compiler.Compile(ncores, libraries[ind][2],
                                    libraries[ind][4]):
                self.logger.error("The " + product + " building aborted.")
                sys.exit()

            # Linking
            self.logger.info("     - Linking the " + product + " ...")
            if not compiler.Link(libraries[ind][2], libraries[ind][4]):
                self.logger.error("The " + product + " building aborted.")
                sys.exit()

            # Checking
            self.logger.info("     - Checking that the " + product +
                             " is properly built ...")
            if not os.path.isfile(libraries[ind][3]):
                self.logger.error("The " + product + " '" + libraries[ind][3] +
                                  "' is not produced.")
                sys.exit()

            # Cleaning the project
            self.logger.info(
                "     - Cleaning the project after building the " + product +
                " ...")
            if not compiler.Clean(libraries[ind][2], libraries[ind][4]):
                self.logger.error("library building aborted.")
                sys.exit()

            if not isLibrary:

                # Running the program test
                self.logger.info("     - Running the test program ...")
                program = libraries[ind][3].split('/')[-1]

                argv = []
                if program == 'TestSampleAnalyzer':
                    argv = [
                        self.archi_info.ma5dir +
                        '/tools/SampleAnalyzer/Test/Process/dummy_list.txt'
                    ]
                if not compiler.Run(
                        program, argv,
                        self.archi_info.ma5dir + '/tools/SampleAnalyzer/Bin/'):
                    self.logger.error("the test failed.")
                    sys.exit()

                # Checking the program output
                self.logger.info("     - Checking the program output...")
                if libraries[ind][0] == "configuration":
                    if not compiler.CheckRunConfiguration(
                            program, self.archi_info.ma5dir +
                            '/tools/SampleAnalyzer/Bin/'):
                        self.logger.error("the test failed.")
                        sys.exit()
                else:
                    if not compiler.CheckRun(
                            program, self.archi_info.ma5dir +
                            '/tools/SampleAnalyzer/Bin/'):
                        self.logger.error("the test failed.")
                        sys.exit()

            # Print Ok
            self.logger.info('      => Status: \x1b[32m' + '[OK]' + '\x1b[0m')

        self.logger.info(
            "   **********************************************************")
        self.logger.info("")

        return True