tools.vpm: skip slow tests, that do need network access, when -d network is not provided

This commit is contained in:
Delyan Angelov 2023-12-10 12:14:56 +02:00
parent 08189d649c
commit e6bb6df591
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED
6 changed files with 24 additions and 0 deletions

View file

@ -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)