mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tools/vbuild-examples: test hot code reloading examples with -live
This commit is contained in:

committed by
Alexander Medvednikov

parent
2e30e1453d
commit
0ff2754677
@ -4,6 +4,7 @@ import (
|
||||
os
|
||||
testing
|
||||
benchmark
|
||||
filepath
|
||||
)
|
||||
|
||||
pub const (
|
||||
@ -33,7 +34,7 @@ fn v_test_compiler(vargs string){
|
||||
*/
|
||||
|
||||
// Make sure v.c can be compiled without warnings
|
||||
$if mac {
|
||||
$if macos {
|
||||
if os.exists('/v.v') {
|
||||
os.system('$vexe -o v.c v.v')
|
||||
if os.system('cc -Werror v.c') != 0 {
|
||||
@ -55,6 +56,10 @@ fn v_test_compiler(vargs string){
|
||||
eprintln('')
|
||||
building_examples_failed := testing.v_build_failing(vargs, 'examples')
|
||||
|
||||
eprintln('')
|
||||
building_live_failed := testing.v_build_failing(vargs + '-live',
|
||||
filepath.join( 'examples', 'hot_reload'))
|
||||
|
||||
eprintln('')
|
||||
v_module_install_cmd := '$vexe install nedpals.args'
|
||||
eprintln('\nInstalling a v module with: $v_module_install_cmd ')
|
||||
@ -69,7 +74,10 @@ 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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user