Skip to content

When your go tests pass 100% of the time, some of the time.

Notifications You must be signed in to change notification settings

ethereumclassic/go-schroedinger

 
 

Repository files navigation

Build Status

Schroedinger

Nondeterministic tests are unreliable and an enormous pain in the ass, especially when it comes to continuous integration. There are a couple of solutions:

  1. Fix your tests. If circumstances (erm... natural distaster, mental incapacity, tangly legacy code...) prevent you from doing so, continue to option 2. But you should still fix your tests.

  2. schroedinger Tell schroedinger how many times to try running your nondeterministic tests and he will diligently do so until the limit is reached or the test passes. He can run a whole package's tests and then single out individual failing tests, or run tests individually from the start. Original go test output (whether failing or successful) will be logged along with the command used so you can proofread the process.

Install

go get -v github.com/ETCDEVTeam/go-schroedinger/cmd/schroedinger/...

Usage

  1. You'll need a file listing tests for schroedinger to run. See example.txt for, well, an example. Note that this example file is used in schroedinger's own tests. Philosopher-approved.

  2. Run schroedinger.

$ schroedinger -f example.txt

Command line options:

  • -f [STRING] Can be either a relative or absolute path to the file with the tests listed in it. Cannot be empty.
  • -t [INTEGER] Number of times to try a failing test before giving up. Default is 3.
  • -b [STRING] Comma-separated blacklist of patterns used to exclude tests as written in the file.
  • -w [STRING] Comma-separated whitelist of patterns to include as matched against the lines in the tests file.

About

When your go tests pass 100% of the time, some of the time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%