mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-24 20:22:41 +01:00
Add a script to run Coverity.
This commit is contained in:
parent
6b28a46fac
commit
3f880e4d15
4
.gitignore
vendored
4
.gitignore
vendored
@ -5,11 +5,15 @@
|
|||||||
*.vsp
|
*.vsp
|
||||||
bin/
|
bin/
|
||||||
obj/
|
obj/
|
||||||
|
/cov-int
|
||||||
/SE*.zip
|
/SE*.zip
|
||||||
/src/Languages/Language.xml
|
/src/Languages/Language.xml
|
||||||
/src/Languages/LanguageMaster.xml
|
/src/Languages/LanguageMaster.xml
|
||||||
/src/Languages/XmlContentTranslator.exe
|
/src/Languages/XmlContentTranslator.exe
|
||||||
/src/Properties/AssemblyInfo.cs
|
/src/Properties/AssemblyInfo.cs
|
||||||
/src/TestResults/
|
/src/TestResults/
|
||||||
|
/SubtitleEdit.lzma
|
||||||
|
/SubtitleEdit.tar
|
||||||
|
/SubtitleEdit.tgz
|
||||||
/tabspace.exe
|
/tabspace.exe
|
||||||
SubtitleEdit-*-setup.exe
|
SubtitleEdit-*-setup.exe
|
||||||
|
@ -2,4 +2,6 @@
|
|||||||
|
|
||||||
*the subtitle editor :)*
|
*the subtitle editor :)*
|
||||||
|
|
||||||
|
[![Coverity Scan Build Status](https://scan.coverity.com/projects/2562/badge.svg)](https://scan.coverity.com/projects/2562)
|
||||||
|
|
||||||
<http://www.nikse.dk/SubtitleEdit/>
|
<http://www.nikse.dk/SubtitleEdit/>
|
||||||
|
73
coverity.bat
Normal file
73
coverity.bat
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
SETLOCAL
|
||||||
|
|
||||||
|
PUSHD %~dp0
|
||||||
|
|
||||||
|
IF NOT DEFINED COVDIR SET "COVDIR=H:\progs\thirdparty\cov-analysis-win64-7.5.0"
|
||||||
|
IF DEFINED COVDIR IF NOT EXIST "%COVDIR%" (
|
||||||
|
ECHO.
|
||||||
|
ECHO ERROR: Coverity not found in "%COVDIR%"
|
||||||
|
GOTO End
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
CALL "%VS120COMNTOOLS%\vsvars32.bat"
|
||||||
|
IF %ERRORLEVEL% NEQ 0 (
|
||||||
|
ECHO vsvars32.bat call failed.
|
||||||
|
GOTO End
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
:Cleanup
|
||||||
|
IF EXIST "cov-int" RD /q /s "cov-int"
|
||||||
|
IF EXIST "SubtitleEdit.lzma" DEL "SubtitleEdit.lzma"
|
||||||
|
IF EXIST "SubtitleEdit.tar" DEL "SubtitleEdit.tar"
|
||||||
|
IF EXIST "SubtitleEdit.tgz" DEL "SubtitleEdit.tgz"
|
||||||
|
|
||||||
|
|
||||||
|
:Main
|
||||||
|
SET MSBUILD_SWITCHES=/nologo /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU"^
|
||||||
|
/maxcpucount /consoleloggerparameters:DisableMPLogging;Summary;Verbosity=minimal
|
||||||
|
|
||||||
|
"%COVDIR%\bin\cov-build.exe" --dir cov-int MSBuild.exe src\SubtitleEdit.sln %MSBUILD_SWITCHES%
|
||||||
|
|
||||||
|
|
||||||
|
:tar
|
||||||
|
tar --version 1>&2 2>NUL || (ECHO. & ECHO ERROR: tar not found & GOTO SevenZip)
|
||||||
|
tar caf "SubtitleEdit.lzma" "cov-int"
|
||||||
|
GOTO End
|
||||||
|
|
||||||
|
|
||||||
|
:SevenZip
|
||||||
|
CALL :SubDetectSevenzipPath
|
||||||
|
|
||||||
|
rem Coverity is totally bogus with lzma...
|
||||||
|
rem And since I cannot replicate the arguments with 7-Zip, just use tar/gzip.
|
||||||
|
IF EXIST "%SEVENZIP%" (
|
||||||
|
"%SEVENZIP%" a -ttar "SubtitleEdit.tar" "cov-int"
|
||||||
|
"%SEVENZIP%" a -tgzip "SubtitleEdit.tgz" "SubtitleEdit.tar"
|
||||||
|
IF EXIST "SubtitleEdit.tar" DEL "SubtitleEdit.tar"
|
||||||
|
GOTO End
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
:SubDetectSevenzipPath
|
||||||
|
FOR %%G IN (7z.exe) DO (SET "SEVENZIP_PATH=%%~$PATH:G")
|
||||||
|
IF EXIST "%SEVENZIP_PATH%" (SET "SEVENZIP=%SEVENZIP_PATH%" & EXIT /B)
|
||||||
|
|
||||||
|
FOR %%G IN (7za.exe) DO (SET "SEVENZIP_PATH=%%~$PATH:G")
|
||||||
|
IF EXIST "%SEVENZIP_PATH%" (SET "SEVENZIP=%SEVENZIP_PATH%" & EXIT /B)
|
||||||
|
|
||||||
|
FOR /F "tokens=2*" %%A IN (
|
||||||
|
'REG QUERY "HKLM\SOFTWARE\7-Zip" /v "Path" 2^>NUL ^| FIND "REG_SZ" ^|^|
|
||||||
|
REG QUERY "HKLM\SOFTWARE\Wow6432Node\7-Zip" /v "Path" 2^>NUL ^| FIND "REG_SZ"') DO SET "SEVENZIP=%%B\7z.exe"
|
||||||
|
EXIT /B
|
||||||
|
|
||||||
|
|
||||||
|
:End
|
||||||
|
POPD
|
||||||
|
ECHO. & ECHO Press any key to close this window...
|
||||||
|
PAUSE >NUL
|
||||||
|
ENDLOCAL
|
||||||
|
EXIT /B
|
Loading…
Reference in New Issue
Block a user