File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/ bin/ env - S v
2
2
3
+ import os
4
+
5
+ const vexe = os.quoted_path(@VEXE)
6
+
3
7
fn println_one_of_many(msg string, entry_idx int , entries_len int ) {
4
8
eprintln('${entry_idx + 1 : 2 }/ ${entries_len: - 2 } ${msg}')
5
9
}
6
10
7
- print('v version: ${execute('v version').output}')
11
+ println('v executable: ${vexe}')
12
+ print('v version: ${execute('${vexe} version').output}')
8
13
9
14
examples_dir : = join_path(@VMODROOT, 'examples')
10
15
mut all_entries : = walk_ext(examples_dir, '.v')
@@ -31,13 +36,17 @@ mut err := 0
31
36
mut failures : = []string{}
32
37
chdir(examples_dir)!
33
38
for entry_idx, entry in entries {
34
- cmd : = 'v - N - W ${entry}'
39
+ cmd : = '${vexe} - N - W ${entry}'
35
40
println_one_of_many('compile with: ${cmd}', entry_idx, entries.len)
36
41
ret : = execute(cmd)
37
42
if ret.exit_code != 0 {
38
43
err++
39
- eprintln('>>> FAILURE')
40
44
failures << cmd
45
+ eprintln('>>> FAILURE')
46
+ eprintln('>>> err: ')
47
+ eprintln('----------------------------------------------------------------------------------')
48
+ eprintln(ret.output)
49
+ eprintln('----------------------------------------------------------------------------------')
41
50
}
42
51
}
43
52
You can’t perform that action at this time.
0 commit comments