diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2022-12-08 10:48:19 -0600 |
---|---|---|
committer | Joshua Watt <JPEWhacker@gmail.com> | 2022-12-08 10:49:05 -0600 |
commit | f40731611e9682928db78c83db72d384c2edee10 (patch) | |
tree | 457ee5aeeb7a81944e350f8aa3891a3a5d11b110 /lib/oeqa/sdkmingw/case.py | |
parent | 4a066511a944ec946efa7a4571029c992cf0ae00 (diff) | |
download | meta-mingw-f40731611e9682928db78c83db72d384c2edee10.tar.gz |
tests: Map WORKDIR to W: to shorten paths
In some cases Wine (and Windows proper) struggle with very long paths;
in particular the way that gcc invokes the 'cc1' subprogram is limited
in how deep the path to the subprogram can be. This can cause issues
when testing the SDK under wine, as the paths can easily get quite long
and exceed this limit. In order to work around this, setup the Wine test
context so that the W: drive maps to the SDK image ${WORKDIR}, which
allows wine to effectively use paths relative to this directory making
them significantly shorter.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Diffstat (limited to 'lib/oeqa/sdkmingw/case.py')
-rw-r--r-- | lib/oeqa/sdkmingw/case.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/oeqa/sdkmingw/case.py b/lib/oeqa/sdkmingw/case.py index 169c143..dee7d3d 100644 --- a/lib/oeqa/sdkmingw/case.py +++ b/lib/oeqa/sdkmingw/case.py | |||
@@ -56,7 +56,7 @@ class OESDKMinGWTestCase(OESDKTestCase): | |||
56 | return s[1:-1] | 56 | return s[1:-1] |
57 | return s | 57 | return s |
58 | 58 | ||
59 | command = ['wine', 'cmd', '/c', self.tc.wine_sdk_env, '>', 'NUL', '&&', 'cd', self.wine_test_dir, '&&'] | 59 | command = ['wine', 'cmd', '/c', self.tc.wine_sdk_env, '>', 'NUL', '&&'] |
60 | 60 | ||
61 | # Perform some massaging so that commands can be written naturally in | 61 | # Perform some massaging so that commands can be written naturally in |
62 | # test cases. shlex.split() in Non-posix mode gets us most of the way | 62 | # test cases. shlex.split() in Non-posix mode gets us most of the way |
@@ -65,7 +65,7 @@ class OESDKMinGWTestCase(OESDKTestCase): | |||
65 | command.extend(strip_quotes(s) for s in shlex.split(cmd, posix=False)) | 65 | command.extend(strip_quotes(s) for s in shlex.split(cmd, posix=False)) |
66 | 66 | ||
67 | return subprocess.check_output(command, env=self.tc.get_wine_env(), | 67 | return subprocess.check_output(command, env=self.tc.get_wine_env(), |
68 | stderr=subprocess.STDOUT, universal_newlines=True) | 68 | stderr=subprocess.STDOUT, universal_newlines=True, cwd=self.test_dir) |
69 | 69 | ||
70 | def assertIsTargetElf(self, path): | 70 | def assertIsTargetElf(self, path): |
71 | import oe.qa | 71 | import oe.qa |