aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/oeqa/sdkmingw/case.py4
-rw-r--r--lib/oeqa/sdkmingw/context.py11
-rw-r--r--lib/oeqa/sdkmingw/testsdk.py5
3 files changed, 16 insertions, 4 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):
return s[1:-1]
return s
- command = ['wine', 'cmd', '/c', self.tc.wine_sdk_env, '>', 'NUL', '&&', 'cd', self.wine_test_dir, '&&']
+ command = ['wine', 'cmd', '/c', self.tc.wine_sdk_env, '>', 'NUL', '&&']
# Perform some massaging so that commands can be written naturally in
# test cases. shlex.split() in Non-posix mode gets us most of the way
@@ -65,7 +65,7 @@ class OESDKMinGWTestCase(OESDKTestCase):
command.extend(strip_quotes(s) for s in shlex.split(cmd, posix=False))
return subprocess.check_output(command, env=self.tc.get_wine_env(),
- stderr=subprocess.STDOUT, universal_newlines=True)
+ stderr=subprocess.STDOUT, universal_newlines=True, cwd=self.test_dir)
def assertIsTargetElf(self, path):
import oe.qa
diff --git a/lib/oeqa/sdkmingw/context.py b/lib/oeqa/sdkmingw/context.py
index edabcbd..5319223 100644
--- a/lib/oeqa/sdkmingw/context.py
+++ b/lib/oeqa/sdkmingw/context.py
@@ -12,10 +12,19 @@ class OESDKMinGWTestContext(OESDKTestContext):
sdk_files_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "files")
def __init__(self, td=None, logger=None, sdk_dir=None, sdk_env=None, wine_prefix=None,
- wine_arch=None, target_pkg_manifest=None, host_pkg_manifest=None):
+ wine_arch=None, wine_devices={}, target_pkg_manifest=None, host_pkg_manifest=None):
super(OESDKMinGWTestContext, self).__init__(td, logger, sdk_dir, sdk_env, target_pkg_manifest, host_pkg_manifest)
self.wine_prefix = wine_prefix
self.wine_arch = wine_arch
+ # Create the wine environment
+ subprocess.check_output(["wine", "cmd", "/c", "echo 1"], env=self.get_wine_env())
+
+ device_dir = "%s/dosdevices" % wine_prefix
+ bb.utils.mkdirhier(device_dir)
+ for device, path in wine_devices.items():
+ device_path = "%s/%s" % (device_dir, device)
+ os.symlink(os.path.relpath(path, device_dir), device_path)
+
self.wine_sdk_dir = self.wine_path(sdk_dir)
self.wine_sdk_env = self.wine_path(sdk_env)
diff --git a/lib/oeqa/sdkmingw/testsdk.py b/lib/oeqa/sdkmingw/testsdk.py
index 173cfd9..5c80bb4 100644
--- a/lib/oeqa/sdkmingw/testsdk.py
+++ b/lib/oeqa/sdkmingw/testsdk.py
@@ -44,6 +44,9 @@ class TestSDKMinGW(TestSDK):
return {
'wine_prefix': wine_prefix,
- 'wine_arch': d.getVar('TESTSDK_WINEARCH') or 'win64'
+ 'wine_arch': d.getVar('TESTSDK_WINEARCH') or 'win64',
+ 'wine_devices': {
+ 'w:': d.getVar("WORKDIR"),
}
+ }