diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2019-10-08 17:15:26 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-10-08 17:15:26 +0000 |
commit | d268ff6fff7ab22e1080a500e0469f3dc9a54274 (patch) | |
tree | 55ee26297fd454040f7bd2c5b44907ee060af5ae | |
parent | 31b23110443365e1608fd45c3c7242ce4e8b1060 (diff) | |
parent | 3079bb918e81f08f974421b0f648eb36592a0ace (diff) | |
download | buildstream-d268ff6fff7ab22e1080a500e0469f3dc9a54274.tar.gz |
Merge branch 'bschubert/fix-windows-symlink' into 'master'
tests/frontend/buildcheckout.py: Create required symlinks on the fly
See merge request BuildStream/buildstream!1629
-rw-r--r-- | tests/frontend/buildcheckout.py | 16 | ||||
l--------- | tests/frontend/project/files/files-and-links/basicfolder/basicsymlink | 1 |
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py index 7044739a1..5079800ab 100644 --- a/tests/frontend/buildcheckout.py +++ b/tests/frontend/buildcheckout.py @@ -526,6 +526,14 @@ def test_build_checkout_tarball_links(datafiles, cli): checkout = os.path.join(cli.directory, 'checkout.tar') extract = os.path.join(cli.directory, 'extract') + # Create the link before running the tests. + # This is needed for users working on Windows, git checks out symlinks as files which content is the name + # of the symlink and the test therefore doesn't have the correct content + os.symlink( + os.path.join("..", "basicfile"), + os.path.join(project, "files", "files-and-links", "basicfolder", "basicsymlink") + ) + result = cli.run(project=project, args=['build', 'import-links.bst']) result.assert_success() @@ -548,6 +556,14 @@ def test_build_checkout_links(datafiles, cli): project = str(datafiles) checkout = os.path.join(cli.directory, 'checkout') + # Create the link before running the tests. + # This is needed for users working on Windows, git checks out symlinks as files which content is the name + # of the symlink and the test therefore doesn't have the correct content + os.symlink( + os.path.join("..", "basicfile"), + os.path.join(project, "files", "files-and-links", "basicfolder", "basicsymlink") + ) + result = cli.run(project=project, args=['build', 'import-links.bst']) result.assert_success() diff --git a/tests/frontend/project/files/files-and-links/basicfolder/basicsymlink b/tests/frontend/project/files/files-and-links/basicfolder/basicsymlink deleted file mode 120000 index e2b4f7423..000000000 --- a/tests/frontend/project/files/files-and-links/basicfolder/basicsymlink +++ /dev/null @@ -1 +0,0 @@ -../basicfile
\ No newline at end of file |