diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-08-23 22:29:35 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-08-28 21:46:41 +0300 |
commit | 8a094bb0481a9c53646cc15db2e8acecafc3d10c (patch) | |
tree | 4fd7012b6a26eb852d42fba8b52bfcf8f1cf2fdd /tests/ci/data.test | |
parent | 7e0e141273032c7afc1a9129512aa42c672fcf5d (diff) |
Add basic support for CI request handling
Diffstat (limited to 'tests/ci/data.test')
-rw-r--r-- | tests/ci/data.test | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/ci/data.test b/tests/ci/data.test new file mode 100644 index 0000000..c30a691 --- /dev/null +++ b/tests/ci/data.test @@ -0,0 +1,39 @@ +# file : tests/ci/data.test +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +# Pre-created CI request submission data directory that will be copied by +# subsequent tests and scope setup commands. The common approach will be that +# group scopes copy and modify the parent scope submission directory as +# required by the nested tests and scopes. Tests will also clone the parent +# scope submission data directory to optionally modify it, use and cleanup at +# the end. Note that configuration can not be shared between multiple +# submission handler processes. Also we need to make sure that submission data +# directories are not cloned while being used by submission handler scripts. +# +request_id = 4cfa00ec-8459-4f4f-9ef0-8883ddcc4f5b +data_dir = $request_id/ + ++mkdir $data_dir + ++cat <<"EOI" >=$data_dir/request.manifest + : 1 + id: $request_id + repository: https://example.com/hello.git#master + package: foo + package: bar/1.0 + timestamp: 2018-08-24T18:08:01Z + EOI + +root_data_dir = $~/$data_dir + +# The most commonly used submission data directory cloning command that copies +# it from the parent scope working directory. +# +clone_data = cp --no-cleanup -r ../$data_dir ./ +clone_data_clean = cp --no-cleanup -r ../$data_dir ./ &$data_dir/*** + +# Clones the original submission data directory. +# +clone_root_data = cp --no-cleanup -r $root_data_dir ./ +clone_root_data_clean = cp --no-cleanup -r $root_data_dir ./ &$data_dir/*** |