aboutsummaryrefslogtreecommitdiff
path: root/tests/project.test
blob: 444ca00f3aff5e5f59412c411e9cefa507268a84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# file      : tests/project.test
# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

.include git.test

# 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.
#
# By default: -t exe -l c++.
#
+$new prj --vcs ($git_supported ? git : none) 2>- &prj/***

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

# Clones the original project from the root scope working directory.
#
clone_root_prj = cp -p -r $~/prj ./

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