Coverity的安装使用及常见错误
2012-11-27 11:28
791 查看
从Coverity 5.5开始就需要安装两套工具
Coverity® 5.5.3 Integrity Manager --- GUI
Coverity® 5.5.3 Static Analysis --- CLI
Coverity® 5.5.3 Integrity Manager的安装
点击安装文件后,即可。 注意以下标红位置。
Where should Coverity Integrity Manager be installed?
[/home/fesu/coverity-integrity-manager] 这里可以修改cim安装路径
The directory:
/home/fesu/coverity-integrity-manager
already exists. Would you like to install to that directory anyway?
Yes [1], No [2]
1
How should Coverity Integrity Manager store information?
Coverity Integrity Manager requires a database to store information in. This
installer includes the PostgreSQL database software, which it can set up and
manage automatically. This is recommended for most cases. Alternatively,
organizations with existing database infrastructure and adminstrative
expertise can configure Integrity Manager to connect to an external
PostgreSQL (8.1 or higher) server.
Select one:
Use included PostgreSQL database (Recommended) [1, Enter], Connect to external PostgreSQL server [2]
Where should the database reside?
Specify a location for the database files, and an internal network port for
the database. The location should be on a local volume that has at least 2GB
of free space.
Location of database files:
[/home/fesu/coverity-integrity-manager/database]
Database port:
[5432]
Choose a level of database performance.
The default PostgreSQL configuration settings are designed to ensure that
the database will work on almost any computer. Although the database will
successfully start with default settings, it will not perform well. If
performance is important to you, you might choose the production database
configuration. However, if your system lacks sufficient resources, the
database will fail to start.
Tip: If you are not sure what setting to use, choose Small computer. After
the installation completes, see the System Administration Guide section
about tuning the PostgreSQL database.
Configure the database for a:
Small computer (not optimal performance) [1, Enter], Production system (might not start on a small computer) [2]
Server configuration
The installer creates an administrative account for Coverity Integrity
Manager. Administrators can use this account to log in with a web browser
and configure users, create projects, and manage other administrative
settings.
Please choose an administrator password.
Account name: admin 这里设置GUI
admin的密码。
Password:
Confirm password:
Choose port numbers.
Users connect to the HTTP port to access the Integrity Manager via web
browsers and Web Services clients.
HTTP port number: 这里是访问GUI界面的端口
[8080]
9601
If you choose to provide HTTPS (Secure HTTP) service, HTTP requests are
rejected.
With HTTPS service, you will need to get a server certificate from a
certificate authority and install it. Please see the Administration and
Configuration Guide for more detailed instructions.
Provide HTTPS service?
Yes [y], No [n, Enter]
What ports should Integrity Manager use?
Build and analysis machines use the commit port to publish analysis results
to Integrity Manager.
Commit port: ß这里是cov-commit-defects执行是指定的commit端口
[9090]
9611
The control port is used for internal server communication. Use the default
value unless that port is unavailable.
Control port:
[8005]
Extracting files...
Downloading ...
Extracting files...
Configuring database
Creating database cluster
Adjusting file permissions
Starting database
Creating database schema
Stopping database
Database configured.
Starting Coverity Integrity Manager
Loading configuration
Starting controller
Starting database
Starting application
Done
Coverity Integrity Manager is installed and running at
http://xxxx.cn.alcatel-lucent.com:9601/这个是GUI的访问地址
Log in as "admin".
Finishing installation...
Coverity® 5.5.3 Static Analysi :
这套工具公司是安装好的,我们需要了解它的常用命令及其工作方式:
![](http://img.blog.csdn.net/20150106151002140?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYWNlX2ZlaQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
常见问题:
cov-analyze报错:Looking for translation units Error: no matching translation units.**
或者cov-analyze的结果是0。
Analysis summary report:
------------------------
Files analyzed : 0
New defects found : 0
解决方法:
1.检查一下cov-configure的选项
注意:在写--compiler的参数时,如果带/usr/bin/gcc,最后会解析不出结果,所以不要用绝对路径。
有时候项目中会用到交叉编译的xxx-linux-gnu-gcc,它的路径是定义在makefile中,导致在命令行中运行coverity时候,环境变量中找不到xxx-linux-gnu-gcc。
我通常是写一个shell脚本
2. 检查cov-analyze的选项
cov-analyze的选项,发现要带上--all 才会有结果,如果再把--aggressiveness-level 调到high,这样检查的结果更多
Coverity® 5.5.3 Integrity Manager --- GUI
Coverity® 5.5.3 Static Analysis --- CLI
Coverity® 5.5.3 Integrity Manager的安装
点击安装文件后,即可。 注意以下标红位置。
Where should Coverity Integrity Manager be installed?
[/home/fesu/coverity-integrity-manager] 这里可以修改cim安装路径
The directory:
/home/fesu/coverity-integrity-manager
already exists. Would you like to install to that directory anyway?
Yes [1], No [2]
1
How should Coverity Integrity Manager store information?
Coverity Integrity Manager requires a database to store information in. This
installer includes the PostgreSQL database software, which it can set up and
manage automatically. This is recommended for most cases. Alternatively,
organizations with existing database infrastructure and adminstrative
expertise can configure Integrity Manager to connect to an external
PostgreSQL (8.1 or higher) server.
Select one:
Use included PostgreSQL database (Recommended) [1, Enter], Connect to external PostgreSQL server [2]
Where should the database reside?
Specify a location for the database files, and an internal network port for
the database. The location should be on a local volume that has at least 2GB
of free space.
Location of database files:
[/home/fesu/coverity-integrity-manager/database]
Database port:
[5432]
Choose a level of database performance.
The default PostgreSQL configuration settings are designed to ensure that
the database will work on almost any computer. Although the database will
successfully start with default settings, it will not perform well. If
performance is important to you, you might choose the production database
configuration. However, if your system lacks sufficient resources, the
database will fail to start.
Tip: If you are not sure what setting to use, choose Small computer. After
the installation completes, see the System Administration Guide section
about tuning the PostgreSQL database.
Configure the database for a:
Small computer (not optimal performance) [1, Enter], Production system (might not start on a small computer) [2]
Server configuration
The installer creates an administrative account for Coverity Integrity
Manager. Administrators can use this account to log in with a web browser
and configure users, create projects, and manage other administrative
settings.
Please choose an administrator password.
Account name: admin 这里设置GUI
admin的密码。
Password:
Confirm password:
Choose port numbers.
Users connect to the HTTP port to access the Integrity Manager via web
browsers and Web Services clients.
HTTP port number: 这里是访问GUI界面的端口
[8080]
9601
If you choose to provide HTTPS (Secure HTTP) service, HTTP requests are
rejected.
With HTTPS service, you will need to get a server certificate from a
certificate authority and install it. Please see the Administration and
Configuration Guide for more detailed instructions.
Provide HTTPS service?
Yes [y], No [n, Enter]
What ports should Integrity Manager use?
Build and analysis machines use the commit port to publish analysis results
to Integrity Manager.
Commit port: ß这里是cov-commit-defects执行是指定的commit端口
[9090]
9611
The control port is used for internal server communication. Use the default
value unless that port is unavailable.
Control port:
[8005]
Extracting files...
Downloading ...
Extracting files...
Configuring database
Creating database cluster
Adjusting file permissions
Starting database
Creating database schema
Stopping database
Database configured.
Starting Coverity Integrity Manager
Loading configuration
Starting controller
Starting database
Starting application
Done
Coverity Integrity Manager is installed and running at
http://xxxx.cn.alcatel-lucent.com:9601/这个是GUI的访问地址
Log in as "admin".
Finishing installation...
Coverity® 5.5.3 Static Analysi :
这套工具公司是安装好的,我们需要了解它的常用命令及其工作方式:
常见问题:
cov-analyze报错:Looking for translation units Error: no matching translation units.**
或者cov-analyze的结果是0。
Analysis summary report:
------------------------
Files analyzed : 0
New defects found : 0
解决方法:
1.检查一下cov-configure的选项
cov-configure --config $CONFIG_FILE --compiler gcc --comptype gcc
注意:在写--compiler的参数时,如果带/usr/bin/gcc,最后会解析不出结果,所以不要用绝对路径。
有时候项目中会用到交叉编译的xxx-linux-gnu-gcc,它的路径是定义在makefile中,导致在命令行中运行coverity时候,环境变量中找不到xxx-linux-gnu-gcc。
我通常是写一个shell脚本
export PATH=/xxx-linux-gnu-gcc-path/:$PATH $COV_BIN/cov-configure --config $CONFIG_FILE --compiler xxx-linux-gnu-gcc --comptype gcc
2. 检查cov-analyze的选项
cov-analyze的选项,发现要带上--all 才会有结果,如果再把--aggressiveness-level 调到high,这样检查的结果更多
相关文章推荐
- mysql下载、安装、启动、使用、卸载、常见错误
- CocoaPods 安装 使用及常见错误
- [WP]常见wordpress安装,运行,使用出现500错误分析和解决方法
- oracle安装及使用常见错误
- iOS-cocoapods安装与使用以及常见错误
- 使用wubi安装ubuntu14.04出现的常见错误的解决办法
- lightinthebox 兰亭集势 安装使用常见错误bug 修改
- Docker安装使用常见错误
- CocoaPods 安装 使用&常见操作错误
- 使用.NET Framework提供的InstallUtil.exe安装Windows服务安装时遇到的2种常见错误
- SQL Server 安装和使用时,常见错误
- 在Jupyter notebook和spyder上用python做数据挖掘,安装使用简介和常见错误
- IOCP使用时常见的几个错误
- SQL SERVER 2005开发版 安装错误:无法找到产品Microsoft SQL Server Native Client的安装程序包,尝试再次使用的安装包 ' Sqlncli.msi ' 有效副本安装。
- MySQL安装成功之后启动错误 3534、28000和简单使用
- Eclipse使用常见错误
- [置顶] ckeditor 的几种使用方法总结(附演示工程文件,并且解决几个常见错误)
- PHP编译安装时常见错误解决办法,php编译常见错误
- Android Fragment使用(二) 嵌套Fragments (Nested Fragments) 的使用及常见错误
- 七牛---使用Eclipse/Myeclipse安装运⾏Android SDK以及常⻅错误整理