summaryrefslogtreecommitdiff
path: root/tests/testutils
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2019-01-03 13:58:32 +0000
committerChandan Singh <chandan@chandansingh.net>2019-01-03 19:34:49 +0000
commitca547f19b4f9c8709b4ea2642e3796284ab67cd0 (patch)
tree353742deaade458d0ea9478681a515723f422796 /tests/testutils
parent669b55b008cd487fdeea0628eb248562f7679cd1 (diff)
downloadbuildstream-ca547f19b4f9c8709b4ea2642e3796284ab67cd0.tar.gz
tests/frontend/buildcheckout.py: Fix bad filename issue for Windows
In BuildStream/buildstream!1028, we added a test specifically to test that BuildStream correctly raises an warning when the name of an element contains characters that are invalid on Windows. Unfortunately, we didn't see it coming that it would make it impossible to checkout this branch on Windows. Fix it by generating this file, only if we are not running on Windows. * tests/testutils/site.py: Add `IS_WINDOWS` check * tests/frontend/buildcheckout.py: Generate file with invalid filename on the fly * Remove tests/frontend/project/elements/invalid-chars. Fixes #842. Note that this may still cause issues on WSL when running tests on a shared filesystem, but that seems to be a generic issue on WSL with `os.rename`.
Diffstat (limited to 'tests/testutils')
-rw-r--r--tests/testutils/site.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/testutils/site.py b/tests/testutils/site.py
index c7625cccf..6ef22babb 100644
--- a/tests/testutils/site.py
+++ b/tests/testutils/site.py
@@ -52,5 +52,6 @@ except ImportError:
HAVE_ARPY = False
IS_LINUX = os.getenv('BST_FORCE_BACKEND', sys.platform).startswith('linux')
+IS_WINDOWS = (os.name == 'nt')
MACHINE_ARCH = Platform.get_host_arch()