a small "v test v" fix

pull/2927/head
Alexander Medvednikov 2019-11-29 19:32:07 +03:00
parent cb2db3170e
commit ae171ec28e
2 changed files with 20 additions and 7 deletions

View File

@ -3,7 +3,7 @@ on: [push, pull_request]
jobs:
alpine-docker-musl-gcc:
name: Alpine/musl
name: alpine-musl
runs-on: ubuntu-latest
steps:
@ -78,6 +78,15 @@ jobs:
run: ./v test v
macos-prebuilt:
runs-on: macOS-10.14
steps:
- name: Download V
run: wget https://github.com/vbinaries/vbinaries/releases/download/latest/v_macos.zip && unzip v_macos.zip && ./v --version
- name: Test V
run: ./v test v
ubuntu-tcc:
runs-on: ubuntu-18.04
steps:

View File

@ -95,7 +95,7 @@ pub fn (ts mut TestSession) test() {
}
$if tinyc {
if file.contains('asm') { continue }
}
}
tmpc_filepath := file.replace('.v', '.tmp.c')
cmd := '"$ts.vexe" $ts.vargs "$file"'
@ -142,18 +142,22 @@ pub fn v_test_v(args_before_test string){
println('vlib/ is missing, it must be next to the V executable')
exit(1)
}
/*
if !os.file_exists(parent_dir + '/v.v') {
println('v.v is missing, it must be next to the V executable')
exit(1)
}
*/
// Make sure v.c can be compiled without warnings
$if mac {
os.system('$vexe -o v.c v.v')
if os.system('cc -Werror v.c') != 0 {
println('cc failed to build v.c without warnings')
exit(1)
if os.file_exists('/v.v') {
os.system('$vexe -o v.c v.v')
if os.system('cc -Werror v.c') != 0 {
println('cc failed to build v.c without warnings')
exit(1)
}
println('v.c can be compiled without warnings. This is good :)')
}
println('v.c can be compiled without warnings. This is good :)')
}
//
println('Testing...')