aboutsummaryrefslogtreecommitdiff
path: root/tests/config.testscript
blob: 442cf3676d6e72f12712c264f1a40ce0c52b626e (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
# file      : tests/config.testscript
# license   : MIT; see accompanying LICENSE file

# Create an empty configuration 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 configuration as required by the nested tests and
# scopes. Tests will also clone the parent scope configuration to optionally
# modify it, use and cleanup at the end. Note that configuration can not be
# shared between multiple bpkg processes. Also we need to make sure that
# configurations are not cloned while being used by bpkg.
#
cfg_uuid = "00000000-0000-0000-0000-000000000001"
+$cfg_create -d cfg --uuid $cfg_uuid 2>- &cfg/***

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

# Clones the original (presumably empty) configuration from the root scope
# working directory.
#
clone_root_cfg = [cmdline] cp -pr $~/cfg ./

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