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

ci: set up pg database to test ORM

This commit is contained in:
Alexander Medvednikov
2019-12-06 02:11:39 +03:00
parent 71c0c4803f
commit be323e2fb6
5 changed files with 48 additions and 37 deletions

View File

@ -5,7 +5,7 @@ import (
testing
benchmark
filepath
)
)
pub const (
v_modules_path = os.home_dir() + '.vmodules'
@ -21,18 +21,18 @@ fn v_test_compiler(vargs string){
vexe := testing.vexe_path()
parent_dir := os.dir(vexe)
testing.vlib_should_be_present( parent_dir )
// Changing the current directory is needed for some of the compiler tests,
// compiler/tests/local_test.v and compiler/tests/repl/repl_test.v
os.chdir( parent_dir )
/*
if !os.exists(parent_dir + '/v.v') {
eprintln('v.v is missing, it must be next to the V executable')
exit(1)
}
*/
// Make sure v.c can be compiled without warnings
$if macos {
if os.exists('/v.v') {
@ -44,11 +44,11 @@ fn v_test_compiler(vargs string){
eprintln('v.c can be compiled without warnings. This is good :)')
}
}
building_tools_failed := testing.v_build_failing(vargs, 'tools')
eprintln('\nTesting all _test.v files...')
mut compiler_test_session := testing.new_test_sesion( vargs )
mut compiler_test_session := testing.new_test_session( vargs )
compiler_test_session.files << os.walk_ext(parent_dir, '_test.v')
compiler_test_session.test()
eprintln( compiler_test_session.benchmark.total_message('running V tests') )
@ -57,7 +57,7 @@ fn v_test_compiler(vargs string){
building_examples_failed := testing.v_build_failing(vargs, 'examples')
eprintln('')
building_live_failed := testing.v_build_failing(vargs + '-live',
building_live_failed := testing.v_build_failing(vargs + '-live',
filepath.join( 'examples', 'hot_reload'))
eprintln('')
@ -73,12 +73,12 @@ fn v_test_compiler(vargs string){
}
vmark.stop()
eprintln( 'Installing a v module took: ' + vmark.total_duration().str() + 'ms')
if building_tools_failed ||
compiler_test_session.failed ||
building_examples_failed ||
if building_tools_failed ||
compiler_test_session.failed ||
building_examples_failed ||
building_live_failed {
exit(1)
}
}