vanitygen-plusplus icon indicating copy to clipboard operation
vanitygen-plusplus copied to clipboard

Improve nix flake. Add test suite with bash tinytestlib library to en…

Open pmarreck opened this issue 2 years ago • 3 comments

…sure basic functionality works as advertised (run with test/test). Make sure test seems deterministic enough to rely upon.

NOTE: I disabled the tests asserting exitcode 0, because the commandline interface doesn't exit code 0 for some reason. But I hope this is a reasonable possible initial test suite to assert on the commandline UI.

pmarreck avatar May 10 '23 16:05 pmarreck

During development of this, I saw some flagging behavior (things sometimes segfaulted) but I think I found a combo of arguments that (almost) never does that anymore. I used the following bash function to repeatedly run the test with repeat 50 test/test in order to make sure things were stable:

repeat() {
  local count=$1;
  local retcodes=0;
  shift;
  cmd=($@);
  for ((i = 0; i < count; i++))
  do
    eval "${cmd[@]}";
    (( retcodes+=$? ));
  done;
  return $retcodes
}

pmarreck avatar May 10 '23 16:05 pmarreck

hmm.. not very helpful update..( i stil wait support use regex on GPU

Aziz87 avatar May 12 '23 20:05 Aziz87

That would be cool, but I'm not sure how a test suite of commandline usage wouldn't be helpful, since there is none

pmarreck avatar May 17 '23 00:05 pmarreck