10gic / vanitygen-plusplus

A vanity address generator for BTC, ETH, LTC, TRX and 100+ more crypto currencies.
GNU Affero General Public License v3.0
248 stars 90 forks source link

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

Open pmarreck opened 1 year ago

pmarreck commented 1 year ago

…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 commented 1 year ago

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
}
Aziz87 commented 1 year ago

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

pmarreck commented 1 year ago

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