2019-12-01 10:50:13 +01:00
|
|
|
module main
|
|
|
|
|
2020-04-26 08:32:05 +02:00
|
|
|
import os
|
|
|
|
import testing
|
2019-12-01 10:50:13 +01:00
|
|
|
|
2021-12-11 22:20:08 +01:00
|
|
|
const vroot = @VMODROOT
|
|
|
|
|
|
|
|
const efolders = [
|
|
|
|
'examples/viewer',
|
|
|
|
]
|
|
|
|
|
2019-12-01 10:50:13 +01:00
|
|
|
fn main() {
|
2020-12-20 18:01:02 +01:00
|
|
|
args_string := os.args[1..].join(' ')
|
2019-12-05 12:22:54 +01:00
|
|
|
params := args_string.all_before('build-examples')
|
2021-12-12 00:20:21 +01:00
|
|
|
skip_prefixes := efolders.map(os.real_path(os.join_path_single(vroot, it)))
|
2021-12-11 22:20:08 +01:00
|
|
|
res := testing.v_build_failing_skipped(params, 'examples', skip_prefixes, fn (mut session testing.TestSession) {
|
|
|
|
for x in efolders {
|
|
|
|
pathsegments := x.split_any('/')
|
2021-12-12 00:20:21 +01:00
|
|
|
session.add(os.real_path(os.join_path(vroot, ...pathsegments)))
|
2021-12-11 22:20:08 +01:00
|
|
|
}
|
|
|
|
})
|
|
|
|
if res {
|
2019-12-04 22:14:23 +01:00
|
|
|
exit(1)
|
|
|
|
}
|
2021-12-12 00:20:21 +01:00
|
|
|
if testing.v_build_failing_skipped(params + '-live', os.join_path_single('examples',
|
|
|
|
'hot_reload'), skip_prefixes, fn (mut session testing.TestSession) {})
|
2021-12-11 22:20:08 +01:00
|
|
|
{
|
2019-12-01 10:50:13 +01:00
|
|
|
exit(1)
|
|
|
|
}
|
|
|
|
}
|