From dc28c787d1c092dc48769450354d23bfb921866c Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 28 Sep 2019 14:40:09 +0300 Subject: [PATCH] travis: re-write the vget test in V --- .travis.yml | 7 ------- compiler/main.v | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 703a2a0747..6eca128215 100644 --- a/.travis.yml +++ b/.travis.yml @@ -87,10 +87,3 @@ script: git clone https://github.com/vlang/vid cd vid && ../v -debug -o vid . fi - - | - if [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then - v install nedpals.args - # ensure nedpals.args is installed - [[ -d ~/.vmodules/nedpals/args]] - git remote -v | grep 'https://github.com/nedpals/v-args (fetch)' - fi diff --git a/compiler/main.v b/compiler/main.v index da21f457cf..58340c1449 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -1023,6 +1023,19 @@ fn install_v(args[]string) { } } +fn (v &V) test_vget() { + ret := os.system('v install nedpals.args') + if ret != 0 { + println('failed to run v install') + exit(1) + } + if !os.file_exists(ModPath + '/nedpals/args') { + println('v failed to install a test module') + exit(1) + } + println('vget is OK') +} + fn (v &V) test_v() { if !os.dir_exists('vlib') { println('run "v test v" next to the vlib/ directory') @@ -1102,6 +1115,8 @@ fn (v &V) test_v() { bmark.stop() println( bmark.total_message('building examples') ) + v.test_vget() + if failed { exit(1) }