tools: ensure that `v test-cleancode` is always run in the vroot folder

pull/7965/head^2
Delyan Angelov 2021-01-09 19:25:50 +02:00
parent 8f315d226b
commit ca83746884
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 7 additions and 8 deletions

View File

@ -105,7 +105,6 @@ pub fn (mut ts TestSession) print_messages() {
pub fn new_test_session(_vargs string) TestSession {
mut skip_files := []string{}
skip_files << '_non_existing_'
$if solaris {
skip_files << 'examples/gg/gg2.v'
skip_files << 'examples/pico/pico.v'

View File

@ -5,18 +5,14 @@ import testing
import v.util
const (
vet_known_failing_exceptions = [
'nonexistent',
]
vet_known_failing_exceptions = []string{}
vet_folders = [
'vlib/sqlite',
'vlib/v',
'cmd/v',
'cmd/tools',
]
verify_known_failing_exceptions = [
'nonexistant',
]
verify_known_failing_exceptions = []string{}
vfmt_verify_list = [
'cmd/v/v.v',
'cmd/tools/vdoc/',
@ -74,6 +70,10 @@ const (
]
)
const vexe = os.getenv('VEXE')
const vroot = os.dir(vexe)
fn main() {
args_string := os.args[1..].join(' ')
pass_args := args_string.all_before('test-cleancode')
@ -81,7 +81,7 @@ fn main() {
}
fn tsession(vargs string, tool_source string, tool_cmd string, tool_args string, flist []string, slist []string) testing.TestSession {
testing.setup_new_vtmp_folder()
os.chdir(vroot)
util.prepare_tool_when_needed(tool_source)
testing.eheader('Run `$tool_cmd` over most .v files')
mut test_session := testing.new_test_session('$vargs $tool_args')