extension/tools/release: add env var to control test skipping

Some of the go test require extra tools. VSCODE_GO_TEST_ALL is
used to control whether the test should be skipped or errored
if the required tool is missing.

For LUCI test, test is triggered by "go test ./..." meaning test will
skip if the tool is missing.
For docker test, test is triggered by
"VSCODE_GO_TEST_ALL=true go test ./..." meaning the test can not be
skipped.

Choose "TEST_ALL" over "CAN_SKIP" to avoid double negative.

For golang/vscode-go#3533

Change-Id: I7fdad5e872a377882aa274d27d88ae6ddffb613e
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/643855
Reviewed-by: Robert Findley <rfindley@google.com>
Commit-Queue: Hongxiang Jiang <hxjiang@golang.org>
Auto-Submit: Hongxiang Jiang <hxjiang@golang.org>
kokoro-CI: kokoro <noreply+kokoro@google.com>
diff --git a/build/all.bash b/build/all.bash
index ac38ebd..8ab1588 100755
--- a/build/all.bash
+++ b/build/all.bash
@@ -53,7 +53,7 @@
   npm run compile
 
   echo "**** Run Go tests ****"
-  go test ./...
+  VSCODE_GO_TEST_ALL="true" go test ./...
 
   echo "**** Run test ****"
   npm run unit-test
diff --git a/extension/tools/release/release_test.go b/extension/tools/release/release_test.go
index e9d02b9..5c8097f 100644
--- a/extension/tools/release/release_test.go
+++ b/extension/tools/release/release_test.go
@@ -39,6 +39,13 @@
 }
 
 func TestRelease(t *testing.T) {
+	if _, err := exec.LookPath("npx"); err != nil {
+		if value, found := os.LookupEnv("VSCODE_GO_TEST_ALL"); found && value == "true" {
+			t.Errorf("required tool npx not found: %v", err)
+		} else {
+			t.Skipf("npx is not found (%v), skipping...", err)
+		}
+	}
 	for _, fullCommand := range []string{
 		"build-vscgo -out=/tmp/artifacts",
 		"package -out=/tmp/artifacts",