Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

github.com/airenas/google-test-runner

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/airenas/google-test-runner


Version published
Created
Source

Google Test Runner

Intro

It is a simple tools to run many googletest suits (separate executables) and collect overall statistics.

Why

C++ googletest is great lib to test C++ code. But I run into a problem how to run many googletest executables locally and collect an overall statistics. Lets say tests are fast, but initialization for a suite takes some time. For exammple I have 20 test case suits. Initialization (::testing::Test::SetUpTestCase) for each suit takes about 1 sec. And I have about 500 test.

Ctest -j4 does the thing. But it runs every test separatelly, invokes ::testing::Test::SetUpTestCase for each test. It ends up to 500 sec/4 (number of processes) = 125 sec.

I can run all tests using find . -type f -name '*_test' -exec bash -c {} ';'. But it does not show failures at the end.

Installation

Before: You must have go >= 1.12 installed.

  1. Clone the repo git clone https://github.com/airenas/google-test-runner

  2. Build cd google-test-runner/cmd/google-test-runner && go build

  3. Copy executable somewhere on your path sudo cp google-test-runner /usr/local/bin

Usage

Run google-test-runner -h for a help.

  1. Go to a dir containing googletest executables inside

  2. Lets say find . -type f -name '*_test' - returns googletests with relative paths

  3. Invoke the tests:

  • Standard: find . -type f -name '*_test' | google-test-runner
  • Filter as parameter: google-test-runner -f ./**/*_test
  • Show only failing tests: google-test-runner -o f -f ./**/*_test
  • One worker: google-test-runner -j 1 -s -f ./**/*_test

Author

Airenas Vaičiūnas


License

Copyright © 2019, Airenas Vaičiūnas.


FAQs

Package last updated on 04 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc