2019-09-15 18:08:16 +03:00
|
|
|
module main
|
|
|
|
|
2019-10-21 14:14:28 +03:00
|
|
|
import compiler.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(){
|
2019-11-28 11:46:52 +03:00
|
|
|
mut logger := log.Log{}
|
|
|
|
logger.set_level(log.DEBUG)
|
2019-09-15 18:08:16 +03:00
|
|
|
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
|
|
|
}
|