TODO: Figure out what's causing these errors and fix them.
For now, they're being ignored, since they prevent the coverage report
from being generated.
This fixes the 'negative' errors from lcov's geninfo.
Before:
source files: 600
lines.......: 23.2% (10654 of 45904 lines)
functions...: 22.8% (848 of 3721 functions)
branches....: 15.8% (7572 of 47821 branches)
After:
source files: 600
lines.......: 23.2% (10654 of 45904 lines)
functions...: 22.8% (848 of 3721 functions)
branches....: 15.8% (7572 of 47821 branches)
Effectively no change in coverage, but it's likely more stable.
I'll note that the error was triggering in ASTC decoding, which
uses OpenMP for parallel processing.
Need to supporess 'mismatch' errors because branch coverage is
generating "mismatched exception tag" errors now.
Also need to supporess 'negative' because some branches are somehow
getting a *negative* token count...
geninfo: ERROR: (negative) Unexpected negative taken count '-103' for branch 6 while capturing from ./extlib/basisu_astc/CMakeFiles/basisu_astc.dir/basisu_astc_decomp.cpp.gcda.
Perhaps you need to compile with '-fprofile-update=atomic'.
(use "geninfo --ignore-errors negative ..." to bypass this error)
New coverage rate, now with branches:
source files: 600
lines.......: 23.2% (10654 of 45904 lines)
functions...: 22.8% (848 of 3721 functions)
branches....: 15.8% (7572 of 47821 branches)
lcov-2.x is much more strict than lcov-1.x, and it doesn't like some stuff
with gtest, so we have to ignore various warnings.
[gtk] Class headers: lcov gets confused if G_DECLARE_FINAL_TYPE() is in
a preprocessor conditional. Instead, make conditional typedefs, and use
those typedefs in G_DECLARE_FINAL_TYPE().
lcov: ERROR: (inconsistent) "gtk/MessageWidget.h":19: duplicate function
'RP_IS_MESSAGE_WIDGET' starts on line 19 but previous definition started
on 17 while capturing from
./src/gtk/gtk3/CMakeFiles/rom-properties-gtk3.dir/__/MessageWidget.c.gcno.
(use "lcov --ignore-errors inconsistent ..." to bypass this error)
lcov.sh: Ignore inconsistent errors because gtest macros confuse lcov:
lcov: ERROR: (inconsistent) mismatched end line for _ZN10LibRomData5Tests37SortFuncsTest_gtk4_ascendingSort_Test8TestBodyEv
at src/gtk/tests/SortFuncsTest_gtk4.cpp:136: 136 -> 163 while capturing
from ./src/gtk/tests/CMakeFiles/SortFuncsTest_gtk4.dir/SortFuncsTest_gtk4.cpp.gcno
(use "lcov --ignore-errors inconsistent ..." to bypass this error)
Also ignore "corrupt" errors, which seemingly happens randomly.
Ignore "unused" removed file warnings, since SpecializedThumbnailer1.h
might not be present in the output.
The 14.33 -> 14.36 change is for display purposes only, since we were
already using the 14.36 compiler directory.
CMAKE_SYSTEM_VERSION=10.0 is needed for "/permissive-" on MSVC 2017
and later.
ARM and ARM64 require MSVC 2019.
ARM64EC requires MSVC 2019.
[cmake] Add toolchain files for ARM and ARM64 on MSVC 2019 and 2022.
(ARM64EC uses the ARM64 toolchain.)
MSVC 2012 and 2013 aren't supported by rom-properties anymore.
Update MSVC 2022 to 17.6.
Ignore cmake_mode_t files when creating the final .zip file. These are
ADS streams created by CMake in order to preserve permissions when
building Debian packages on Windows. *Something* caused these to show
up as regular files with the zip command, possibly a git or MSVC upgrade.
Use -x to exclude these files from packaging.
"%ProgramFiles(x86)" doesn't work without quotes due to the parentheses.
This fixes a regression from commit d44f810210.
([scripts] package.cmd: Remove excessive quoting from SET statements.)
I think it's actually a good thing that these are set separately instead
of being duplicated across all of the IF EXIST blocks.
The reason why the old value of a variable is used inside an IF
statement is because cmd does variable expansion right after reading a
line, prior to any parsing being done. E.g. you can swap two variables
like so:
SET "X=%Y%" & SET "Y=%X%"
During parsing, if a newline is reached while inside parentheses,
another line is read. As a consequence, the entire IF/FOR block is
read and expanded before being executed. The following script
(with ECHO deliberately left ON) demonstrates this behavior:
SET X=123
IF "" == "" (ECHO START
SET X=456
ECHO %X%)
To the solution to this is to enable delayed expansion:
SETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
Then replace %s with !s and the variables will be expanded after
parsing is done:
SET "MSVC_CL=!MSVC32_DIR!\bin\HostX86\x86\cl.exe"
SET "MSVC_CL64_CROSS=!MSVC64_DIR!\bin\HostX86\x64\cl.exe"
SET "MSVC_CL64_NATIVE=!MSVC64_DIR!\bin\HostX64\x64\cl.exe"
This doesn't really matter too much for the release build, since most
users won't be building a Windows distribution package.
This fixes a regression from commit d55c1ddfa6.
(rom-properties 1.3)
tests.
This ensures that we get information from all files, not just files that
had functions that were run.
This brings down the total number of covered functions significantly:
| Line Coverage | Functions |
--------+--------------------+------------------+
Before: | 43.0% (3308/7699) | 48.8% (266/545) |
After: | 15.2% (3308/21821) | 15.1% (266/1762) |
Excluded generated Qt and D-Bus files from the tests. Also exlcuded
pngcheck, since it's mostly third-party code.
TODO: Create some truncated ROM images to use as test cases and run them
in rpcli, and also compare extracted images.
The 32-bit version is moved to the root directory.
The 64-bit version is still kept in the amd64/ directory
for reference purposes.
Removed install.cmd and uninstall.cmd.