2019-09-15 18:08:16 +03:00
|
|
|
module main
|
|
|
|
|
2019-10-13 16:37:43 +03:00
|
|
|
import vcompiler.tests.repl.runner
|
2019-09-15 18:08:16 +03:00
|
|
|
import log
|
2019-09-16 17:29:06 +03:00
|
|
|
import benchmark
|
2019-09-15 18:08:16 +03:00
|
|
|
|
|
|
|
fn main(){
|
|
|
|
logger := &log.Log{log.DEBUG, 'terminal'}
|
|
|
|
options := runner.new_options()
|
2019-09-16 17:29:06 +03:00
|
|
|
|
|
|
|
mut bmark := benchmark.new_benchmark()
|
2019-09-15 18:08:16 +03:00
|
|
|
for file in options.files {
|
2019-09-16 17:29:06 +03:00
|
|
|
bmark.step()
|
2019-09-15 18:08:16 +03:00
|
|
|
fres := runner.run_repl_file(options.wd, options.vexec, file) or {
|
2019-09-16 17:29:06 +03:00
|
|
|
bmark.fail()
|
|
|
|
logger.error( bmark.step_message( err ) )
|
2019-09-15 18:08:16 +03:00
|
|
|
continue
|
|
|
|
}
|
2019-09-16 17:29:06 +03:00
|
|
|
bmark.ok()
|
|
|
|
logger.info( bmark.step_message( fres ) )
|
2019-09-15 18:08:16 +03:00
|
|
|
}
|
2019-09-16 17:29:06 +03:00
|
|
|
bmark.stop()
|
|
|
|
logger.info( bmark.total_message('total time spent running REPL files') )
|
2019-09-15 18:08:16 +03:00
|
|
|
}
|