diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/manual.py | 19 | ||||
-rw-r--r-- | tests/integration/project/elements/manual/import-file.bst | 5 | ||||
-rw-r--r-- | tests/integration/project/elements/manual/manual-stage-custom.bst | 13 |
3 files changed, 37 insertions, 0 deletions
diff --git a/tests/integration/manual.py b/tests/integration/manual.py index defc2503c..22b87fb9f 100644 --- a/tests/integration/manual.py +++ b/tests/integration/manual.py @@ -204,3 +204,22 @@ def test_manual_command_subdir(cli, datafiles): result.assert_success() with open(os.path.join(checkout, "hello")) as f: assert f.read() == "hello from subdir\n" + + +# Test staging artifacts into subdirectories +@pytest.mark.datafiles(DATA_DIR) +@pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox") +def test_manual_stage_custom(cli, datafiles): + project = str(datafiles) + checkout = os.path.join(cli.directory, "checkout") + + # Verify that the element builds, and has the correct expected output. + result = cli.run(project=project, args=["build", "manual/manual-stage-custom.bst"]) + result.assert_success() + result = cli.run( + project=project, args=["artifact", "checkout", "manual/manual-stage-custom.bst", "--directory", checkout] + ) + result.assert_success() + + with open(os.path.join(checkout, "test.txt")) as f: + assert f.read() == "This is another test\n" diff --git a/tests/integration/project/elements/manual/import-file.bst b/tests/integration/project/elements/manual/import-file.bst new file mode 100644 index 000000000..195841951 --- /dev/null +++ b/tests/integration/project/elements/manual/import-file.bst @@ -0,0 +1,5 @@ +kind: import + +sources: +- kind: local + path: files/import-source diff --git a/tests/integration/project/elements/manual/manual-stage-custom.bst b/tests/integration/project/elements/manual/manual-stage-custom.bst new file mode 100644 index 000000000..abd29c88a --- /dev/null +++ b/tests/integration/project/elements/manual/manual-stage-custom.bst @@ -0,0 +1,13 @@ +kind: manual + +depends: +- base.bst + +build-depends: +- filename: manual/import-file.bst + config: + location: /flying-ponies + +config: + install-commands: + - cp /flying-ponies/subdir/test.txt %{install-root} |