Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all gz libraries to latest GTest #1537

Closed
14 tasks done
mjcarroll opened this issue Jun 15, 2022 · 1 comment
Closed
14 tasks done

Update all gz libraries to latest GTest #1537

mjcarroll opened this issue Jun 15, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@mjcarroll
Copy link
Contributor

mjcarroll commented Jun 15, 2022

Desired behavior

Currently, the gz libraries use multiple versions of gtest. Some of these versions have custom patches and some are quite dated at this point.

The goal of this is to bring the vendored version of gtest to a consistent, modern version across all libraries.

Actions performed:

  • Removed old googletest versions
  • Added new googletest version in gtest_vendor
  • Made test_config uniform
    • Always test_config.hh
    • Always generated in build/include
  • Made C++17 flags consistent across libraries
  • Removed main from tests where possible, as we are linking gtest_main

Additional context

Eventually, it would be nice to remove vendored gtest altogether, but that is out of the scope of this issue.

@mjcarroll
Copy link
Contributor Author

Before:

    7887 text files.
    6932 unique files.                                          
    1649 files ignored.

github.com/AlDanial/cloc v 1.90  T=39.45 s (159.4 files/s, 39538.8 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
XML                             615          11532           2428         469457
C++                            1640          74440          88413         359368
C/C++ Header                   2480          39856         114465         148321
JavaScript                       33          23887          16301          45263
Markdown                        254          11299              0          29199
QML                             116           2206           3979          18391
Python                          102           5538           7762          17881
CMake                           492           3441           5113          14475
GLSL                            115           1487           1963           6094
C                                 1           1607           1012           4531
Protocol Buffers                197           1585           5101           3739
SWIG                             47            528            789           2916
SVG                              18             77             31           1833
Ruby                             26            457            558           1510
CSS                               4            351            160           1168
HTML                             10            152             16           1127
ERB                               4             78              0           1120
HLSL                             16            208             72            903
Bazel                            12            144             13            878
CUDA                              9            168            184            726
YAML                             23             52             18            486
Bourne Shell                     31            132             94            413
Bourne Again Shell                9             55             85            278
JSON                              3             46              0            266
Starlark                          2             34             70            207
Objective-C++                     2             43             57            182
DOS Batch                        10             47              4            153
Dockerfile                        3             24             13            104
TOML                              2             19              7             65
diff                              6             24             92             65
XSLT                              1              6              6             43
XSD                               1              7              0             39
Jupyter Notebook                  2              0            269             27
SQL                               1              8             38             25
--------------------------------------------------------------------------------
SUM:                           6287         179538         249113        1131253
--------------------------------------------------------------------------------

After:

    7845 text files.
    6848 unique files.                                          
    1681 files ignored.

github.com/AlDanial/cloc v 1.90  T=42.17 s (147.3 files/s, 35151.5 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
XML                             615          11532           2428         469457
C++                            1622          71010          81967         343029
C/C++ Header                   2435          34855         102957         114638
JavaScript                       33          23887          16301          45263
Markdown                        254          11297              0          29189
QML                             116           2206           3979          18391
Python                          102           5538           7762          17881
CMake                           486           3342           4793          13811
GLSL                            115           1487           1963           6094
C                                 1           1607           1012           4531
Protocol Buffers                197           1585           5101           3739
SWIG                             47            528            789           2916
SVG                              18             77             31           1833
Ruby                             26            457            558           1510
CSS                               4            351            160           1168
HTML                             10            152             16           1127
ERB                               4             78              0           1120
HLSL                             16            208             72            903
Bazel                            12            144             13            878
CUDA                              9            168            184            726
YAML                             23             52             18            486
Bourne Shell                     31            132             94            413
Bourne Again Shell                9             55             85            278
JSON                              3             46              0            266
Starlark                          2             34             70            207
Objective-C++                     2             43             57            182
DOS Batch                        10             47              4            153
Dockerfile                        3             24             13            104
TOML                              2             19              7             65
XSLT                              1              6              6             43
XSD                               1              7              0             39
Jupyter Notebook                  2              0            269             27
SQL                               1              8             38             25
--------------------------------------------------------------------------------
SUM:                           6212         170982         230747        1080492
--------------------------------------------------------------------------------

Net of -50761 lines of code across the codebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

1 participant