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

lcov: 1.14 -> 1.15 #96495

Merged
merged 1 commit into from Jan 4, 2021
Merged

lcov: 1.14 -> 1.15 #96495

merged 1 commit into from Jan 4, 2021

Conversation

Mindavi
Copy link
Contributor

@Mindavi Mindavi commented Aug 27, 2020

Motivation for this change

Update lcov from 1.14 to 1.15. This removes some applied patches and adds support for gcc 9.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
    • Created project with
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.\

Tested by making a small project and generating coverage:

// main.cpp
#include <iostream>

int main(int argc, char* argv[]) {
  if (argc == 1)
    std::cout << "hello, world!\n";
  else
    std::cout << "goodbye, world\n";

  return 0;
}
# lcov.sh
#!/usr/bin/env bash

lcov --no-external --capture --initial --directory . --output-file /tmp/test_base.info
./build/test abc
lcov --no-external --capture --directory . --output-file /tmp/test_test.info

lcov --add-tracefile /tmp/test_base.info --add-tracefile /tmp/test_test.info --output-file /tmp/test_total.info
rm -rf /tmp/test-lcov/
mkdir /tmp/test-lcov/

genhtml --prefix . --ignore-errors source /tmp/test_total.info --legend --title "commit SHA1" --output-directory=/tmp/test-lcov
# CMakeLists.txt
cmake_minimum_required(VERSION 3.17)
project(TestProject)

add_executable(test main.cpp)
target_compile_options(test PRIVATE -fprofile-arcs -ftest-coverage)
target_link_libraries(test -fprofile-arcs)

@Mindavi
Copy link
Contributor Author

Mindavi commented Sep 9, 2020

cc @dezgeg @edolstra @knedlsepp

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 96495 run on x86_64-linux 1

4 packages built:
  • anbox
  • lcov
  • makeGCOVReport
  • properties-cpp

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 96495 run on x86_64-darwin 1

1 package built:
  • lcov

Copy link
Member

@knedlsepp knedlsepp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@edolstra edolstra merged commit f6e519f into NixOS:master Jan 4, 2021
@Mindavi Mindavi deleted the lcov-1.15 branch January 4, 2021 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants