Commit Graph

74 Commits

Author SHA1 Message Date
David Korth
d6d929aa67 [scripts] lcov.sh: Ignore some more errors.
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.
2025-02-01 11:06:57 -05:00
David Korth
a58b6625b4 fixup! [scripts] lcov.sh: Reduce warnings to 5 per category; enable branch coverage.
remove debug stuff
2025-01-18 12:18:09 -05:00
David Korth
a5c23c5543 [cmake] gcc.cmake: Add -fprofile-update=atomic.
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.
2025-01-18 12:10:32 -05:00
David Korth
f1607d6b83 [scripts] lcov.sh: Reduce warnings to 5 per category; enable branch coverage.
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)
2025-01-18 11:59:13 -05:00
David Korth
7ed038b3e7 [scripts] lcov.sh: Remove set -v that was added for debugging. 2025-01-14 00:52:41 -05:00
David Korth
74be3491f1 [scripts] lcov.sh: Fix issues with lcov-2.x.
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.
2025-01-14 00:48:30 -05:00
David Korth
2078c85642 [cmake] msvc.cmake: Disable "/permissive-" for now.
It's causing various issues due to the packaging script using the
Windows 7 SDK for i386.

package.cmd: Don't set CMAKE_SYSTEM_VERSION for i386.
2024-03-03 16:07:08 -05:00
David Korth
c2c8e88b2a [scripts] package.cmd: 14.33 -> 14.36; set CMAKE_SYSTEM_VERSION=10.0.
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.
2024-03-03 16:02:39 -05:00
David Korth
48a0e9a069 [scripts] package.cmd: Display MSVC versions for arm, arm64, and arm64ec. 2023-07-30 11:33:07 -04:00
David Korth
a1ea97eabf [scripts] package.cmd: Relax pkg_windows cleanup a bit so it works with a VBoxSF-mounted tmpfs directory.
So I won't have to temporarily edit package.cmd every time I make a
Windows release.
2023-07-30 10:56:02 -04:00
David Korth
7d83cd50d2 [scripts] package.cmd: Add ARM, ARM64, and ARM64EC.
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.)
2023-07-16 18:28:21 -04:00
David Korth
ae30e86b54 [scripts] package.cmd: Update MSVC versions; remove cmake_mode_t.
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.
2023-07-16 15:05:21 -04:00
David Korth
1c78de6019 [scripts] lcov.sh: Exclude SpecializedThumbnailer1.h in addition to SpecializedThumbnailer1.c. 2023-07-09 18:37:23 -04:00
David Korth
8987fdd97b [scripts] lcov.sh: Fix exclusions; add more generated files.
Missing backslash after glibresources.c broke the remaining exclusions.

Before:
- Lines: 7200/54542 -> 13.2%
- Functions: 518/4076 -> 12.7%

After:
- Lines: 7195/51829 -> 13.9%
- Functions: 517/3631 -> 14.2%
2023-02-11 10:31:06 -05:00
David Korth
c9513cb8c6 [scripts] package.cmd: Re-add quoting to paths.
"%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.)
2022-09-24 16:42:03 -04:00
David Korth
d44f810210 [scripts] package.cmd: Remove excessive quoting from SET statements.
cmd isn't sh. SET commands don't need excessive quoting.
2022-09-05 18:45:57 -04:00
Egor
f2a3a618c2 [scripts] package.cmd: use a loop for MSVC 2012/2013/2015 2022-08-11 17:17:23 +03:00
Egor
49243fb43f [scripts] package.cmd: remove comment regarding MSVC_CL
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"
2022-08-11 17:17:22 +03:00
Egor
6a4758deba [scripts] package.cmd: remove travis.sh check
We do CD /D anyway, might as well just go right to the destination.
2022-08-11 17:17:22 +03:00
Egor
894f15ce69 [scripts] package.cmd: simplify detecting different editions 2022-08-11 17:17:22 +03:00
Egor
b5bf47a79e [scripts] package.cmd: Support MSVC 2022 2022-08-11 17:17:22 +03:00
David Korth
448e2b533e [scripts] package.cmd: 14.29.30037 (MSVC 16.10) -> 14.29.30133 (MSVC 16.11) 2021-08-31 23:25:28 -04:00
David Korth
479623a7b5 [scripts] package.cmd: Use the MSVC 2019 compiler for 64-bit.
64-bit Windows XP (which is actually Windows Server 2003) isn't too
common, so we can safely ignore it.
2021-07-18 16:51:08 -04:00
David Korth
2a308eb6cc [scripts] lcov.sh: Ignore some more files.
- glibresources.c
- qrc_*.cpp (Qt resource files)
- GTK+ generated notificationsinterface code.
2021-04-07 02:49:59 -04:00
David Korth
c7c2694b03 [scripts] package.cmd: Uncomment rmdir/mkdir.
Accidentally included in commit ce798a067b.
([scripts] package.cmd: Support MSVC 2019 with the v141_xp toolchain.)
2020-09-26 00:12:01 -04:00
David Korth
ce798a067b [scripts] package.cmd: Support MSVC 2019 with the v141_xp toolchain. 2020-09-24 20:36:31 -04:00
David Korth
694aefeb5a [scripts] package.cmd: Removed support for MSVC 2010. 2020-09-20 11:25:31 -04:00
David Korth
acb2c65219 scripts/package.cmd: Re-added the note about svrplus.exe being renamed to install.exe. 2020-02-23 20:32:30 -05:00
David Korth
2d6b69643b scripts/package.cmd: Leave the 32-bit rp-download.exe where it is; remove 64-bit EXEs.
The 64-bit EXEs aren't necessary. If someone really wants a 64-bit
Windows build of rpcli for some reason, they can build it themselves.
2020-02-23 20:31:26 -05:00
David Korth
0193a780f0 scripts/package.cmd: Updated for MSVC 2017 15.9.
Also updated 14.14 -> 14.16, which I forgot to do for 15.8 (14.15).
2018-11-17 22:24:02 -05:00
David Korth
284cde7d28 scripts/package.cmd: Updated for MSVC 2017 15.8. 2018-09-16 14:23:44 -04:00
David Korth
0e57d6382b package.cmd: Reverted some temporary changes for local building.
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)
2018-06-02 18:58:24 -04:00
David Korth
d55c1ddfa6 rom-properties 1.3 2018-06-02 18:38:17 -04:00
David Korth
b1917b9baa Revert "scripts/package.cmd: Explicitly specify the ZIP generator for CPack."
Fixed by reverting removal of the CPack settings.

This reverts commit 050fb0ab3f.
2018-06-02 18:09:36 -04:00
David Korth
050fb0ab3f scripts/package.cmd: Explicitly specify the ZIP generator for CPack.
It wasn't needed before, but cpack-3.11.1 on Windows needs it.
2018-06-02 17:48:36 -04:00
David Korth
3f4bfff196 scripts/package.cmd: Updated for MSVC 2017 15.7. 2018-05-09 22:08:15 -04:00
David Korth
798ba1b821 scripts/package.cmd: Updated for MSVC 2017 15.6. 2018-03-18 16:06:31 -04:00
David Korth
ca722fb187 [scripts] lcov.sh: Exclude gettext.h from the code coverage report.
This is a third-party file from GNU gettext.
2018-01-13 22:59:23 -05:00
David Korth
7773ed1e78 [scripts] lcov.sh: Exclude pngcheck.cpp from the code coverage report.
This is mostly third-party code, so we don't need to check it.
2018-01-13 16:14:45 -05:00
David Korth
2668e5f225 [scripts] lcov.sh: Create a baseline coverage data file before running
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.
2018-01-13 03:13:22 -05:00
David Korth
cc4581e429 [scripts] lcov.sh: Correctly exclude extlib/ and tests/ from coverage output.
On some systems, the full path is included in the code coverage data,
so we have to prefix these with '*/'.
2018-01-13 02:45:49 -05:00
David Korth
07bcc87d7d package.cmd: Updated for MSVC 2017 v15.5. (Compiler v14.12) 2017-12-17 12:20:42 -05:00
David Korth
9f3f677ce2 package.cmd: Indicate MSVC 14.11 for the 15.3 toolset. 2017-09-02 11:42:58 -04:00
David Korth
c161e65a78 package.cmd: Added a check for MSVC 2017 15.3's updated toolset. 2017-09-02 11:42:16 -04:00
David Korth
71e158bedf package.cmd: MSVC 2017 is supported. 2017-07-23 12:05:24 -04:00
David Korth
d36a5ce973 Install svrplus as install.exe in the ZIP file.
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.
2017-05-18 21:59:23 -04:00
David Korth
93240abffc [scripts] package.cmd: Explain why the PDBs aren't moved to the base directory. 2017-05-13 21:23:19 -04:00
David Korth
52b6052c11 [win32] Install rp-config.exe and its PDB file.
package.cmd: Move the 32-bit EXEs to the base directory.
The 32-bit PDBs and 64-bit EXEs are kept where they are.
2017-05-13 21:20:20 -04:00
David Korth
d80586e4e7 [scripts] package.cmd: Updated for MSVC 2017.
Updated some documentation for MSVC 2017.
2017-03-14 23:02:51 -04:00
David Korth
24bcaba234 Explicitly enable JPEG in all builds.
debian/control: Added a build-time dependency on libjpeg-dev.
2017-02-26 20:15:25 -05:00