# file      : tests/build/root.build
# license   : MIT; see accompanying LICENSE file

# Use remote instead of local repository locations for tests.
#
# Note that this is an "instead of" rather than "in addition to" configuration
# so ideally you would want to run both with and without this enabled. This is
# also one of the reasons remote tests are not enabled by default (the other
# being that they take forever).
#
config [bool] config.bpkg.tests.remote ?= false

# Additionally enable tests that use ssh protocol for remote git repositories.
# If true, it is assumed that the password-less ssh authentication is arranged
# for git.build2.org.
#
config [bool] config.bpkg.tests.git.ssh ?= false

# Using the project configuration variables all over the testscripts makes
# them look hairy. Thus, let's provide short aliases for these variables.
#
remote  = $config.bpkg.tests.remote
git_ssh = $config.bpkg.tests.git.ssh

# We need to configure C++ module to pass the compiler path to some of bpkg
# test commands.
#
using cxx.config

# Setup the bpkg that we are testing.
#
import bpkg = bpkg%exe{bpkg}
testscript{*}: test = $bpkg

# Specify the test target for cross-testing.
#
test.target = $cxx.target
