# file      : tests/project.testscript
# license   : MIT; see accompanying LICENSE file

# Create and initialize a sample build2 C++ executable project that will be
# copied by subsequent tests and scopes setup commands. The common approach
# will be that group scopes copy and modify the parent scope project as
# required by the nested tests and scopes. Tests will also clone the parent
# scope project to optionally modify it, use and cleanup at the end. Note that
# project can not be shared between multiple bdep processes. Also we need to
# make sure that projects are not cloned while being used by bdep.
#
# Make sure that the initial branch is named as 'master', since tests may rely
# on that.
#
+$new --vcs git,branch=master prj 2>! &prj/*** # By default: -t exe -l c++.

# The most commonly used project cloning command that copies it from the
# parent scope working directory.
#
clone_prj = [cmdline] cp -pr ../prj ./

# Clones the original project from the root scope working directory.
#
clone_root_prj = [cmdline] cp -pr $~/prj ./

# Setup a test command to use a cloned project directory by default.
#
test.arguments += -d prj
