예제 #1
0
    def compile(self,
                configure_status=False,
                configure_para='',
                make_status=False,
                make_para='',
                make_install_status=False,
                make_install_para=''):
        '''
        安装源码包,执行configure、make、make install等操作
        @param configure_status:判断是否需要configrue
        @param configure_para:configrue的参数
        @param make_status:判断是否需要make
        @param make_para:make 操作需要的参数
        @param make_install_status: 判断是否需要make install
        '''

        if configure_status:
            lptlog.info("源码包进行configure")
            utils.configure(extra=configure_para, configure='./configure')

        if make_status:
            lptlog.info("源码包进行make")
            utils.make(extra=make_para, make='make')

        if make_install_status:
            lptlog.info("源码包进行make install")
            utils.make(extra='install ' + make_install_para, make='make')
예제 #2
0
파일: test.py 프로젝트: zhouhui321/lpts
    def compile(
        self,
        configure_status=False,
        configure_para="",
        make_status=False,
        make_para="",
        make_install_status=False,
        make_install_para="",
    ):
        """
        安装源码包,执行configure、make、make install等操作
        @param configure_status:判断是否需要configrue
        @param configure_para:configrue的参数
        @param make_status:判断是否需要make
        @param make_para:make 操作需要的参数
        @param make_install_status: 判断是否需要make install
        """

        if configure_status:
            lptlog.info("源码包进行configure")
            utils.configure(extra=configure_para, configure="./configure")

        if make_status:
            lptlog.info("源码包进行make")
            utils.make(extra=make_para, make="make")

        if make_install_status:
            lptlog.info("源码包进行make install")
            utils.make(extra="install " + make_install_para, make="make")
예제 #3
0
파일: glxgears.py 프로젝트: Scemoon/lpts
 def setup(self):
     '''编译源码,设置程序
     '''
     if not self.check_bin(self.processBin):
         self.tar_src_dir = self.extract_bar()
         os.chdir(self.tar_src_dir)
         utils.make(extra='clean', make='make')
          #修改Makefile文件
 
         lptlog.info("修改Makefile, 取消#GRAPHIC_TESTS = defined注释")
         cmd = '''sed -i "s/^#GRAPHIC_TESTS/GRAPHIC_TESTS/g" Makefile '''
         utils.system(cmd)
         self.compile(make_status=True)
         os.chdir(self.lpt_root)
예제 #4
0
파일: glxgears.py 프로젝트: Scemoon/lpts
 def setup(self):
     '''编译源码,设置程序
     '''
     if not self.check_bin(self.processBin):
         self.tar_src_dir = self.extract_bar()
         os.chdir(self.tar_src_dir)
         utils.make(extra='clean', make='make')
          #修改Makefile文件
 
         lptlog.info("修改Makefile, 取消#GRAPHIC_TESTS = defined注释")
         cmd = '''sed -i "s/^#GRAPHIC_TESTS/GRAPHIC_TESTS/g" Makefile '''
         utils.system(cmd)
         self.compile(make_status=True)
         os.chdir(self.lpt_root)
예제 #5
0
파일: test.py 프로젝트: Scemoon/lpts
 def compile(self, configure_status=False, configure_para='', 
             make_status=False, make_para='', 
             make_install_status=False, make_install_para=''):
     '''
     安装源码包,执行configure、make、make install等操作
     @param configure_status:判断是否需要configrue
     @param configure_para:configrue的参数
     @param make_status:判断是否需要make
     @param make_para:make 操作需要的参数
     @param make_install_status: 判断是否需要make install
     '''
             
     if configure_status:
         lptlog.info("源码包进行configure")
         utils.configure(extra=configure_para, configure='./configure')
             
     if make_status:
         lptlog.info("源码包进行make")
         utils.make(extra=make_para, make='make')
             
     if make_install_status:
         lptlog.info("源码包进行make install")
         utils.make(extra='install '+make_install_para, make='make')