ci: add `VTEST_JUST_ESSENTIAL=1 ./v test-self` mode. Use it for alpine-docker-musl-gcc .

master
Delyan Angelov 2022-06-09 15:25:11 +03:00
parent 39e54a508b
commit e1360ccf8c
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 83 additions and 2 deletions

View File

@ -46,8 +46,8 @@ jobs:
- name: All code is formatted - name: All code is formatted
run: ./v test-cleancode run: ./v test-cleancode
- name: Test V fixed tests - name: Run only essential tests
run: ./v test-self run: VTEST_JUST_ESSENTIAL=1 ./v test-self
ubuntu-docker-musl: ubuntu-docker-musl:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04

View File

@ -6,7 +6,83 @@ import v.pref
const github_job = os.getenv('GITHUB_JOB') const github_job = os.getenv('GITHUB_JOB')
const just_essential = os.getenv('VTEST_JUST_ESSENTIAL') != ''
const ( const (
essential_list = [
'cmd/tools/vvet/vet_test.v',
'vlib/arrays/arrays_test.v',
'vlib/bitfield/bitfield_test.v',
//
'vlib/builtin/int_test.v',
'vlib/builtin/array_test.v',
'vlib/builtin/float_test.v',
'vlib/builtin/byte_test.v',
'vlib/builtin/rune_test.v',
'vlib/builtin/builtin_test.v',
'vlib/builtin/map_of_floats_test.v',
'vlib/builtin/string_int_test.v',
'vlib/builtin/utf8_test.v',
'vlib/builtin/map_test.v',
'vlib/builtin/string_test.v',
'vlib/builtin/sorting_test.v',
'vlib/builtin/gated_array_string_test.v',
'vlib/builtin/array_shrinkage_test.v',
'vlib/builtin/isnil_test.v',
'vlib/builtin/string_match_glob_test.v',
'vlib/builtin/string_strip_margin_test.v',
//
'vlib/cli/command_test.v',
'vlib/crypto/md5/md5_test.v',
'vlib/dl/dl_test.v',
'vlib/encoding/base64/base64_test.v',
'vlib/encoding/utf8/encoding_utf8_test.v',
'vlib/encoding/utf8/utf8_util_test.v',
'vlib/flag/flag_test.v',
'vlib/json/json_decode_test.v',
'vlib/math/math_test.v',
'vlib/net/tcp_test.v',
'vlib/net/http/http_test.v',
'vlib/net/http/server_test.v',
'vlib/net/http/request_test.v',
'vlib/io/io_test.v',
'vlib/io/os_file_reader_test.v',
'vlib/os/process_test.v',
'vlib/os/file_test.v',
'vlib/os/notify/notify_test.v',
'vlib/os/filepath_test.v',
'vlib/os/environment_test.v',
'vlib/os/glob_test.v',
'vlib/os/os_test.v',
'vlib/rand/random_numbers_test.v',
'vlib/rand/wyrand/wyrand_test.v',
'vlib/runtime/runtime_test.v',
'vlib/semver/semver_test.v',
'vlib/sync/stdatomic/atomic_test.v',
'vlib/sync/thread_test.v',
'vlib/sync/waitgroup_test.v',
'vlib/sync/pool/pool_test.v',
'vlib/strings/builder_test.v',
'vlib/strconv/atof_test.v',
'vlib/strconv/atoi_test.v',
'vlib/strconv/f32_f64_to_string_test.v',
'vlib/strconv/format_test.v',
'vlib/strconv/number_to_base_test.v',
'vlib/time/time_test.v',
'vlib/toml/tests/toml_test.v',
'vlib/v/compiler_errors_test.v',
'vlib/v/doc/doc_test.v',
'vlib/v/eval/interpret_test.v',
'vlib/v/fmt/fmt_keep_test.v',
'vlib/v/fmt/fmt_test.v',
'vlib/v/gen/c/coutput_test.v',
'vlib/v/gen/js/program_test.v',
'vlib/v/gen/native/macho_test.v',
'vlib/v/gen/native/tests/native_test.v',
'vlib/v/pkgconfig/pkgconfig_test.v',
'vlib/v/tests/inout/compiler_test.v',
'vlib/x/json2/json2_test.v',
]
skip_test_files = [ skip_test_files = [
'cmd/tools/vdoc/html_tag_escape_test.v', /* can't locate local module: markdown */ 'cmd/tools/vdoc/html_tag_escape_test.v', /* can't locate local module: markdown */
'cmd/tools/vdoc/tests/vdoc_file_test.v', /* fails on Windows; order of output is not as expected */ 'cmd/tools/vdoc/tests/vdoc_file_test.v', /* fails on Windows; order of output is not as expected */
@ -177,6 +253,11 @@ fn main() {
all_test_files << os.walk_ext(os.join_path(vroot, 'cmd'), '_test.v') all_test_files << os.walk_ext(os.join_path(vroot, 'cmd'), '_test.v')
test_js_files := os.walk_ext(os.join_path(vroot, 'vlib'), '_test.js.v') test_js_files := os.walk_ext(os.join_path(vroot, 'vlib'), '_test.js.v')
all_test_files << test_js_files all_test_files << test_js_files
if just_essential {
rooted_essential_list := essential_list.map(os.join_path(vroot, it))
all_test_files = all_test_files.filter(rooted_essential_list.contains(it))
}
testing.eheader(title) testing.eheader(title)
mut tsession := testing.new_test_session(cmd_prefix, true) mut tsession := testing.new_test_session(cmd_prefix, true)
tsession.files << all_test_files.filter(!it.contains('testdata' + os.path_separator)) tsession.files << all_test_files.filter(!it.contains('testdata' + os.path_separator))