Add option to only run tests

Signed-off-by: AKU <tom@tdpain.net>
This commit is contained in:
akp 2021-12-05 15:05:18 +00:00
parent 390aef52f6
commit e374a26e57
No known key found for this signature in database
GPG key ID: AA5726202C8879B7

View file

@ -21,6 +21,7 @@ var args struct {
Implementation string `arg:"-i,--implementation" help:"implementation to use"`
Benchmark bool `arg:"-b,--benchmark" help:"benchmark a day's implementations'"`
BenchmarkN int `arg:"-n,--benchmark-n" help:"Number of iterations to run for benchmarking" default:"1000"`
TestOnly bool `arg:"-t,--test-only" help"Only run test inputs"`
}
func run() error {
@ -66,7 +67,9 @@ func run() error {
lookupTable := make(taskLookupTable)
setupTestTasks(challengeInfo, runner, &lookupTable)
setupMainTasks(challengeInputString, runner, &lookupTable)
if !args.TestOnly {
setupMainTasks(challengeInputString, runner, &lookupTable)
}
fmt.Println()