tests: skip sqlite_test.v on musl too, fix compilation of path_tracing.v

pull/4763/head
Delyan Angelov 2020-05-06 23:50:20 +03:00
parent 6005b7fdb6
commit e3366281ee
2 changed files with 5 additions and 3 deletions

View File

@ -17,6 +17,7 @@ const (
skip_on_musl = [ skip_on_musl = [
'vlib/net/http/http_test.v', 'vlib/net/http/http_test.v',
'vlib/net/http/cookie_test.v', 'vlib/net/http/cookie_test.v',
'vlib/sqlite/sqlite_test.v',
'vlib/clipboard/clipboard_test.v', 'vlib/clipboard/clipboard_test.v',
] ]
skip_on_linux = []string{} skip_on_linux = []string{}

View File

@ -417,7 +417,7 @@ fn ray_trace(w int, h int, samps int, file_name string, scene_id int) Image {
for sy := 0; sy < 2; sy ++ { for sy := 0; sy < 2; sy ++ {
for sx := 0; sx < 2; sx ++ { for sx := 0; sx < 2; sx ++ {
r = Vec{0,0,0} r = Vec{0,0,0}
for s in 0..samps { for _ in 0..samps {
r1 := v_2 * rand_f64() r1 := v_2 * rand_f64()
dx := if r1 < v_1 { math.sqrt(r1) - v_1 } else { v_1 - math.sqrt(v_2 - r1) } dx := if r1 < v_1 { math.sqrt(r1) - v_1 } else { v_1 - math.sqrt(v_2 - r1) }
@ -473,10 +473,11 @@ fn main() {
image := ray_trace(width, height, samples, file_name, scene_id) image := ray_trace(width, height, samples, file_name, scene_id)
t2:=time.ticks() t2:=time.ticks()
eprintln('\nRendering finished. Took: ${t2-t1:5d}ms')
eprintln('\nRendering finished. Took: ${(t2-t1):5}ms')
image.save_as_ppm( file_name ) image.save_as_ppm( file_name )
t3:=time.ticks() t3:=time.ticks()
eprintln('Image saved as [${file_name}]. Took: ${t3-t2:5d}ms') eprintln('Image saved as [${file_name}]. Took: ${(t3-t2):5}ms')
} }