blob: 28c60b28fbf3defd00d212ec7fa69b1254236c00 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package test
import (
"path/filepath"
"time"
"v.io/jiri"
"v.io/x/devtools/internal/test"
)
const (
defaultMojoTestTimeout = 10 * time.Minute
)
// vanadiumMojoSyncbaseTest runs the tests for the Vanadium Mojo Syncbase
// service.
func vanadiumMojoSyncbaseTest(jirix *jiri.X, testName string, _ ...Opt) (*test.Result, error) {
testDir := filepath.Join(jirix.Root, "release", "mojo", "syncbase")
return runMakefileTest(jirix, testName, testDir, "test", nil, []string{"v23:dart", "v23:mojo"}, defaultMojoTestTimeout)
}
// vanadiumMojoV23ProxyUnitTest runs the unit tests for the vanadium <-> mojo "v23proxy"
func vanadiumMojoV23ProxyUnitTest(jirix *jiri.X, testName string, _ ...Opt) (*test.Result, error) {
testDir := filepath.Join(jirix.Root, "release", "mojo", "v23proxy")
return runMakefileTest(jirix, testName, testDir, "test-unit", nil, []string{"v23:base", "v23:mojo", "v23:dart"}, defaultMojoTestTimeout)
}
// vanadiumMojoV23ProxyIntegrationTest runs the integration tests for the vanadium <-> mojo "v23proxy"
func vanadiumMojoV23ProxyIntegrationTest(jirix *jiri.X, testName string, _ ...Opt) (*test.Result, error) {
testDir := filepath.Join(jirix.Root, "release", "mojo", "v23proxy")
return runMakefileTest(jirix, testName, testDir, "test-integration", nil, []string{"v23:base", "v23:mojo", "v23:dart"}, defaultMojoTestTimeout)
}