From 927606dc397b08959ac30b4ddbf74a977a6b7bf9 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 19 Jan 2021 10:41:51 +0200 Subject: [PATCH] tools: rename `v test-compiler-full` to `v test-self` --- .github/workflows/alpine.test.sh | 2 +- .github/workflows/ci.yml | 60 +++++++++---------- .github/workflows/periodic.yml | 6 +- TESTS.md | 4 +- cmd/tools/check_os_api_parity.v | 2 +- cmd/tools/vcomplete.v | 2 +- cmd/tools/vtest-all.v | 2 +- .../{vtest-compiler-full.v => vtest-self.v} | 2 +- cmd/v/help/other.txt | 2 +- cmd/v/v.v | 13 ++-- 10 files changed, 48 insertions(+), 47 deletions(-) rename cmd/tools/{vtest-compiler-full.v => vtest-self.v} (98%) diff --git a/.github/workflows/alpine.test.sh b/.github/workflows/alpine.test.sh index 1113250ef8..e3cd164d7f 100755 --- a/.github/workflows/alpine.test.sh +++ b/.github/workflows/alpine.test.sh @@ -15,7 +15,7 @@ ls -lat ## try running the known failing tests first to get faster feedback ./v test vlib/builtin/string_test.v vlib/strings/builder_test.v -./v test-compiler-full +./v test-self ./v build-vbinaries diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e440b21851..4f2f6eb228 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,8 +104,8 @@ jobs: run: | ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works - - name: Fixed tests - run: ./v -silent test-compiler-full + - name: Self tests + run: ./v -silent test-self - name: Test time functions in a timezone UTC-12 run: TZ=Etc/GMT+12 ./v test vlib/time/ - name: Test time functions in a timezone UTC-3 @@ -155,7 +155,7 @@ jobs: env - name: Test V fixed tests run: | - ./v -silent test-compiler-full + ./v -silent test-self macos: runs-on: macOS-latest @@ -204,8 +204,8 @@ jobs: run: | ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works - - name: Fixed tests - run: VJOBS=1 ./v -silent test-compiler-full + - name: Self tests + run: VJOBS=1 ./v -silent test-self - name: Build examples run: ./v build-examples - name: Build examples with -autofree @@ -285,11 +285,11 @@ jobs: run: | ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works - - name: Fixed tests + - name: Self tests run: | - ./v -silent test-compiler-full - - name: Fixed tests (-prod) - run: ./v -o vprod -prod cmd/v && ./vprod -silent test-compiler-full + ./v -silent test-self + - name: Self tests (-prod) + run: ./v -o vprod -prod cmd/v && ./vprod -silent test-self - name: Build examples run: ./v build-examples - name: Build examples with -autofree @@ -370,11 +370,11 @@ jobs: run: | ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works - - name: Fixed tests + - name: Self tests run: | - ./v -silent test-compiler-full - - name: Fixed tests (-prod) - run: ./v -o vprod -prod cmd/v && ./vprod -silent test-compiler-full + ./v -silent test-self + - name: Self tests (-prod) + run: ./v -o vprod -prod cmd/v && ./vprod -silent test-self - name: Build examples run: ./v build-examples - name: Build examples with -autofree @@ -428,8 +428,8 @@ jobs: ## sudo apt-get install --quiet -y libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev - name: Build V run: make -j4 && ./v -cc clang -cg -cflags -Werror -o v cmd/v - - name: Fixed tests (-fsanitize=undefined) - run: ./v -cc clang -cflags "-fsanitize=undefined" -o v2 cmd/v && ./v2 -cflags -fsanitize=undefined test-compiler-full + - name: Self tests (-fsanitize=undefined) + run: ./v -cc clang -cflags "-fsanitize=undefined" -o v2 cmd/v && ./v2 -cflags -fsanitize=undefined test-self tests-sanitize-address: runs-on: ubuntu-20.04 @@ -451,8 +451,8 @@ jobs: ## sudo apt-get install --quiet -y libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev - name: Build V run: make -j4 && ./v -cc clang -cg -cflags -Werror -o v cmd/v - - name: Fixed tests (-fsanitize=address) - run: ASAN_OPTIONS=detect_leaks=0 ./v -cflags -fsanitize=address test-compiler-full + - name: Self tests (-fsanitize=address) + run: ASAN_OPTIONS=detect_leaks=0 ./v -cflags -fsanitize=address test-self tests-sanitize-memory: runs-on: ubuntu-20.04 @@ -474,8 +474,8 @@ jobs: ## sudo apt-get install --quiet -y libsdl2-dev libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev - name: Build V run: make -j4 && ./v -cc clang -cg -cflags -Werror -o v cmd/v - - name: Fixed tests (-fsanitize=memory) - run: ./v -cflags -fsanitize=memory test-compiler-full + - name: Self tests (-fsanitize=memory) + run: ./v -cflags -fsanitize=memory test-self # ubuntu-autofree-selfcompile: # runs-on: ubuntu-20.04 @@ -516,7 +516,7 @@ jobs: ./cmd/tools/test_if_v_test_system_works - name: Test V fixed tests run: | - ./v -silent test-compiler-full + ./v -silent test-self # ubuntu-musl: # runs-on: ubuntu-20.04 @@ -543,8 +543,8 @@ jobs: # ## run: ./v -o hi.js examples/hello_v_js.v && node hi.js # - name: quick debug # run: ./v -stats vlib/strconv/format_test.v -# - name: Fixed tests -# run: ./v -silent test-compiler-full +# - name: Self tests +# run: ./v -silent test-self ubuntu-llvm-mingw: runs-on: ubuntu-20.04 @@ -579,9 +579,9 @@ jobs: run: | ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works - - name: Fixed tests + - name: Self tests run: | - .\v.exe -silent test-compiler-full + .\v.exe -silent test-self # - name: Test # run: | # .\v.exe -silent test-all @@ -621,10 +621,10 @@ jobs: run: | ./v cmd/tools/test_if_v_test_system_works.v ./cmd/tools/test_if_v_test_system_works - - name: Fixed tests + - name: Self tests run: | - ./v -cg cmd\tools\vtest-compiler-full.v - ./v -silent test-compiler-full + ./v -cg cmd\tools\vtest-self.v + ./v -silent test-self - name: Build examples run: ./v build-examples # - name: Test @@ -657,9 +657,9 @@ jobs: run: | .\v.exe cmd/tools/test_if_v_test_system_works.v .\cmd\tools\test_if_v_test_system_works.exe - - name: Fixed tests + - name: Self tests run: | - .\v.exe -silent test-compiler-full + .\v.exe -silent test-self # - name: Test # run: | # .\v.exe -silent test-all @@ -728,7 +728,7 @@ jobs: - name: V self compilation with g++ run: ./v -cc g++-9 -o v2 cmd/v && ./v2 -cc g++-9 -o v3 cmd/v ## - name: Running tests with g++ -## run: ./v -cc g++-9 -silent test-compiler-full +## run: ./v -cc g++-9 -silent test-self install-modules: runs-on: ubuntu-20.04 diff --git a/.github/workflows/periodic.yml b/.github/workflows/periodic.yml index 6d0f1034f0..9e2bc6d141 100644 --- a/.github/workflows/periodic.yml +++ b/.github/workflows/periodic.yml @@ -19,7 +19,7 @@ jobs: - name: Symlink V run: sudo ./v symlink - name: Run network tests - run: ./v -d network -silent test-compiler-full + run: ./v -d network -silent test-self network-tests-macos: @@ -38,7 +38,7 @@ jobs: - name: Ensure thirdparty/cJSON/cJSON.o is compiled, before running tests. run: ./v examples/json.v - name: Run network tests - run: ./v -d network -silent test-compiler-full + run: ./v -d network -silent test-self network-windows-msvc: @@ -55,4 +55,4 @@ jobs: echo $VFLAGS .\make.bat -msvc - name: Run network tests - run: .\v.exe -d network -silent test-compiler-full + run: .\v.exe -d network -silent test-self diff --git a/TESTS.md b/TESTS.md index ccde2bc29b..94b6e25207 100644 --- a/TESTS.md +++ b/TESTS.md @@ -62,7 +62,7 @@ This runs various CI tests, e.g.: Check that most .v files, are invariant of `v fmt` runs. -## `v test-compiler-full` +## `v test-self` Run `vlib` module tests, *including* the compiler tests. @@ -79,7 +79,7 @@ most likely pass. Slowest, but most comprehensive. It works, by running these in succession: * `v test-cleancode` -* `v test-compiler-full` +* `v test-self` * `v test-fmt` * `v build-tools` * `v build-examples` diff --git a/cmd/tools/check_os_api_parity.v b/cmd/tools/check_os_api_parity.v index 9b79f0a192..6d72156d80 100644 --- a/cmd/tools/check_os_api_parity.v +++ b/cmd/tools/check_os_api_parity.v @@ -61,7 +61,7 @@ fn main() { } howmany := app.api_differences.len eprintln('NB: please, do run `git clean -xf` after this tool, or at least `find thirdparty/ |grep .o$|xargs rm`') - eprintln('otherwise, `./v test-compiler-full` may show false positives, due to .o files compiled with a cross compiler.') + eprintln('otherwise, `./v test-self` may show false positives, due to .o files compiled with a cross compiler.') if howmany > 0 { eprintln(term.header('Found $howmany modules with different APIs', '=')) for m in app.api_differences.keys() { diff --git a/cmd/tools/vcomplete.v b/cmd/tools/vcomplete.v index f9e41d5122..fc5010c215 100644 --- a/cmd/tools/vcomplete.v +++ b/cmd/tools/vcomplete.v @@ -53,7 +53,7 @@ const ( 'bin2v', 'test', 'test-fmt', - 'test-compiler-full', + 'test-self', 'test-cleancode', 'repl', 'complete', diff --git a/cmd/tools/vtest-all.v b/cmd/tools/vtest-all.v index 529d131c71..ae56b6d70a 100644 --- a/cmd/tools/vtest-all.v +++ b/cmd/tools/vtest-all.v @@ -37,7 +37,7 @@ fn get_all_commands() []Command { okmsg: 'All .v files can be processed with `v fmt`. NB: the result may not always be compilable, it just means that `v fmt` does not crash.' } res << Command{ - line: '$vexe $vargs -progress test-compiler-full' + line: '$vexe $vargs -progress test-self' okmsg: 'There are no _test.v file regressions.' } res << Command{ diff --git a/cmd/tools/vtest-compiler-full.v b/cmd/tools/vtest-self.v similarity index 98% rename from cmd/tools/vtest-compiler-full.v rename to cmd/tools/vtest-self.v index eee8751d40..1fd8ccaec4 100644 --- a/cmd/tools/vtest-compiler-full.v +++ b/cmd/tools/vtest-self.v @@ -94,7 +94,7 @@ fn main() { os.chdir(vroot) args := os.args.clone() args_string := args[1..].join(' ') - cmd_prefix := args_string.all_before('test-compiler-full') + cmd_prefix := args_string.all_before('test-self') title := 'testing all fixed tests' all_test_files := os.walk_ext(os.join_path(vroot, 'vlib'), '_test.v') testing.eheader(title) diff --git a/cmd/v/help/other.txt b/cmd/v/help/other.txt index 1d5e2cfa15..a8a7921926 100644 --- a/cmd/v/help/other.txt +++ b/cmd/v/help/other.txt @@ -14,7 +14,7 @@ but which are used less frequently by users: test-fmt Test if all files in the current directory are formatted properly. - test-compiler-full Test if V is working properly by running all tests, including the compiler ones. + test-self Test if V is working properly by running all tests, including the compiler ones. NB: this can 1-2 minutes to run. test-parser Test that the V parser works with the given files, as if diff --git a/cmd/v/v.v b/cmd/v/v.v index 84a9ea25eb..2281593cb3 100644 --- a/cmd/v/v.v +++ b/cmd/v/v.v @@ -22,9 +22,10 @@ const ( 'test-all', /* runs most of the tests and other checking tools, that will be run by the CI */ 'test-fmt', 'test-parser', - 'test-fixed', /* deprecated by test-compiler-full */ - 'test-compiler', /* deprecated by test-compiler-full */ - 'test-compiler-full', + 'test-self', + 'test-fixed', /* deprecated by test-self */ + 'test-compiler', /* deprecated by test-self */ + 'test-compiler-full', /* deprecated by test-self */ 'test-cleancode', 'repl', 'complete', @@ -79,12 +80,12 @@ fn main() { eprintln('-usecache is currently disabled on windows') exit(1) } - if command == 'test-fixed' { - eprintln('Please use `v test-compiler-full` instead.') + if command in ['test-fixed', 'test-compiler-full'] { + eprintln('Please use `v test-self` instead.') exit(1) } if command == 'test-compiler' { - eprintln('Please use either `v test-all`, `v test-compiler-full`, `v build-examples`, `v build-tools` or `v build-vbinaries` instead.') + eprintln('Please use either `v test-all`, `v test-self`, `v build-examples`, `v build-tools` or `v build-vbinaries` instead.') exit(1) } if command == 'test-vet' {