mirror of
https://github.com/vlang/v.git
synced 2025-09-15 23:42:28 +03:00
tools: use the same same skipping logic for the platform specific _test.v files in v test-self
too (#20815)
This commit is contained in:
parent
8215f21585
commit
f43b52860d
7 changed files with 19 additions and 18 deletions
|
@ -13,6 +13,8 @@ import runtime
|
|||
import rand
|
||||
import strings
|
||||
|
||||
pub const host_os = pref.get_host_os()
|
||||
|
||||
pub const github_job = os.getenv('GITHUB_JOB')
|
||||
|
||||
pub const runner_os = os.getenv('RUNNER_OS') // GitHub runner OS
|
||||
|
@ -386,6 +388,23 @@ pub fn (mut ts TestSession) test() {
|
|||
if ts.build_tools && dot_relative_file.ends_with('_test.v') {
|
||||
continue
|
||||
}
|
||||
|
||||
// Skip OS-specific tests if we are not running that OS
|
||||
// Special case for android_outside_termux because of its
|
||||
// underscores
|
||||
if file.ends_with('_android_outside_termux_test.v') {
|
||||
if !testing.host_os.is_target_of('android_outside_termux') {
|
||||
remaining_files << dot_relative_file
|
||||
ts.skip_files << file
|
||||
continue
|
||||
}
|
||||
}
|
||||
os_target := file.all_before_last('_test.v').all_after_last('_')
|
||||
if !testing.host_os.is_target_of(os_target) {
|
||||
remaining_files << dot_relative_file
|
||||
ts.skip_files << file
|
||||
continue
|
||||
}
|
||||
remaining_files << dot_relative_file
|
||||
}
|
||||
remaining_files = vtest.filter_vtest_only(remaining_files, fix_slashes: false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue