aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-07-12 16:37:46 +0200
committerAleksandr Nogikh <nogikh@google.com>2023-07-12 14:58:29 +0000
commit860811962461dbc8d8fb3af4fd7f65cf50857661 (patch)
treeac3ce52dfdd48dbcbe9e738447ce0e6a9f39bf39
parentb9754d58c294db4bce541c127d90603c9bfe2cb0 (diff)
all: restructure tests
Let presubmit_dashboard run dashboard tests and presubmit_build run all others.
-rw-r--r--.github/workflows/ci.yml2
-rw-r--r--Makefile15
-rw-r--r--dashboard/app/util_test.go3
3 files changed, 7 insertions, 13 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e296a1286..6de7a125f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -69,7 +69,7 @@ jobs:
path: .cache
key: cache
- name: run
- run: gopath/src/github.com/google/syzkaller/.github/workflows/run.sh syz-env timeout --signal=SIGINT 15m make presubmit_big
+ run: gopath/src/github.com/google/syzkaller/.github/workflows/run.sh syz-env timeout --signal=SIGINT 15m make presubmit_dashboard
- name: codecov
uses: codecov/codecov-action@2a829b95deaeea2d11d127cc0358005714ff35ea # v3
with:
diff --git a/Makefile b/Makefile
index e3d9ebbe5..69e63e472 100644
--- a/Makefile
+++ b/Makefile
@@ -116,7 +116,7 @@ endif
check_copyright check_language check_whitespace check_links check_diff check_commits check_shebang \
presubmit presubmit_aux presubmit_build presubmit_arch_linux presubmit_arch_freebsd \
presubmit_arch_netbsd presubmit_arch_openbsd presubmit_arch_darwin presubmit_arch_windows \
- presubmit_arch_executor presubmit_big presubmit_race presubmit_old
+ presubmit_arch_executor presubmit_dashboard presubmit_race presubmit_old
all: host target
host: manager runtest repro mutate prog2c db upgrade
@@ -316,7 +316,7 @@ presubmit_build: descriptions
# This does not check build of test files, but running go test takes too long (even for building).
$(GO) build ./...
$(MAKE) lint
- $(MAKE) test
+ SYZ_SKIP_DASHBOARD=1 $(MAKE) test
presubmit_arch_linux: descriptions
env HOSTOS=linux HOSTARCH=amd64 $(MAKE) host
@@ -364,15 +364,8 @@ presubmit_arch_executor: descriptions
env TARGETOS=test TARGETARCH=32_shmem $(MAKE) executor
env TARGETOS=test TARGETARCH=32_fork_shmem $(MAKE) executor
-presubmit_big: descriptions
- # This target runs on CI in syz-env,
- # so we can test packages that need GCloud SDK or OS toolchains.
- # Run tests with clang on Linux.
- # syz-env also contains toolchains for NetBSD/Fuchsia/Akaros,
- # but these OSes use fixed toolchains and are not affected by SYZ_CLANG=yes.
- # This way we get maximum coverage: smoke run tests Linux/gcc,
- # while this run tests Linux/clang + the additional OSes.
- SYZ_CLANG=yes $(GO) test -short -vet=off -coverprofile=.coverage.txt ./dashboard/app ./pkg/csource ./pkg/cover
+presubmit_dashboard: descriptions
+ SYZ_CLANG=yes $(GO) test -short -vet=off -coverprofile=.coverage.txt ./dashboard/app
presubmit_race: descriptions
# -race requires cgo
diff --git a/dashboard/app/util_test.go b/dashboard/app/util_test.go
index ca61a0a54..bccb0de49 100644
--- a/dashboard/app/util_test.go
+++ b/dashboard/app/util_test.go
@@ -49,7 +49,8 @@ type Ctx struct {
var skipDevAppserverTests = func() bool {
_, err := exec.LookPath("dev_appserver.py")
// Don't silently skip tests on CI, we should have gcloud sdk installed there.
- return err != nil && os.Getenv("SYZ_ENV") == ""
+ return err != nil && os.Getenv("SYZ_ENV") == "" ||
+ os.Getenv("SYZ_SKIP_DASHBOARD") != ""
}()
func NewCtx(t *testing.T) *Ctx {