mirror of
https://github.com/vlang/v.git
synced 2025-09-12 08:57:09 -04:00
tools.vpm: skip slow tests, that do need network access, when -d network
is not provided
This commit is contained in:
parent
08189d649c
commit
e6bb6df591
@ -8,6 +8,10 @@ const v = os.quoted_path(@VEXE)
|
||||
const test_path = os.join_path(os.vtmp_dir(), 'vpm_dependency_test_${rand.ulid()}')
|
||||
|
||||
fn testsuite_begin() {
|
||||
$if !network ? {
|
||||
eprintln('> skipping ${@FILE}, when `-d network` is missing')
|
||||
exit(0)
|
||||
}
|
||||
os.setenv('VMODULES', test_path, true)
|
||||
os.setenv('VPM_DEBUG', '', true)
|
||||
os.setenv('VPM_NO_INCREMENT', '1', true)
|
||||
|
@ -11,6 +11,10 @@ import test_utils
|
||||
const test_path = os.join_path(os.vtmp_dir(), 'vpm_install_test_${rand.ulid()}')
|
||||
|
||||
fn testsuite_begin() {
|
||||
$if !network ? {
|
||||
eprintln('> skipping ${@FILE}, when `-d network` is missing')
|
||||
exit(0)
|
||||
}
|
||||
test_utils.set_test_env(test_path)
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,10 @@ const expect_exe = os.quoted_path(os.find_abs_path_of_executable('expect') or {
|
||||
})
|
||||
|
||||
fn testsuite_begin() {
|
||||
$if !network ? {
|
||||
eprintln('> skipping ${@FILE}, when `-d network` is missing')
|
||||
exit(0)
|
||||
}
|
||||
test_utils.set_test_env(test_path)
|
||||
// Explicitly disable fail on prompt.
|
||||
os.setenv('VPM_FAIL_ON_PROMPT', '', true)
|
||||
|
@ -9,6 +9,10 @@ import test_utils
|
||||
const test_path = os.join_path(os.vtmp_dir(), 'vpm_install_version_test_${rand.ulid()}')
|
||||
|
||||
fn testsuite_begin() {
|
||||
$if !network ? {
|
||||
eprintln('> skipping ${@FILE}, when `-d network` is missing')
|
||||
exit(0)
|
||||
}
|
||||
test_utils.set_test_env(test_path)
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,10 @@ import test_utils
|
||||
const test_path = os.join_path(os.vtmp_dir(), 'vpm_outdated_test_${rand.ulid()}')
|
||||
|
||||
fn testsuite_begin() {
|
||||
$if !network ? {
|
||||
eprintln('> skipping ${@FILE}, when `-d network` is missing')
|
||||
exit(0)
|
||||
}
|
||||
test_utils.set_test_env(test_path)
|
||||
os.mkdir_all(test_path)!
|
||||
os.chdir(test_path)!
|
||||
|
@ -7,6 +7,10 @@ const v = os.quoted_path(@VEXE)
|
||||
const test_path = os.join_path(os.vtmp_dir(), 'vpm_update_test_${rand.ulid()}')
|
||||
|
||||
fn testsuite_begin() {
|
||||
$if !network ? {
|
||||
eprintln('> skipping ${@FILE}, when `-d network` is missing')
|
||||
exit(0)
|
||||
}
|
||||
test_utils.set_test_env(test_path)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user