Coverityのインストール使用およびよくあるエラー

5296 ワード

Coverity 5.5から2つのツールをインストールする必要があります
Coverity® 5.5.3 Integrity Manager  --- GUI
Coverity® 5.5.3 Static Analysis   ---  CLI 
 
Coverity® 5.5.3 Integraty 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にすると、検査の結果がもっと多くなります.