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