1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/compiler/tests/repl/run.v

25 lines
554 B
V
Raw Normal View History

module main
import compiler.tests.repl.runner
import log
import benchmark
2019-12-30 07:23:54 +03:00
fn main() {
2019-11-28 11:46:52 +03:00
mut logger := log.Log{}
logger.set_level(log.DEBUG)
options := runner.new_options()
mut bmark := benchmark.new_benchmark()
for file in options.files {
bmark.step()
fres := runner.run_repl_file(options.wd, options.vexec, file) or {
bmark.fail()
2019-12-30 07:23:54 +03:00
logger.error(bmark.step_message_fail(err))
continue
}
bmark.ok()
2019-12-30 07:23:54 +03:00
logger.info(bmark.step_message_ok(fres))
}
bmark.stop()
2019-12-30 07:23:54 +03:00
logger.info(bmark.total_message('total time spent running REPL files'))
}