diff options
author | Bevan Weiss <bevan.weiss@gmail.com> | 2024-07-28 00:12:25 +1000 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2024-12-26 08:26:26 -0800 |
commit | ee41358bb583619ef4fe6707958dc3c6c62cd13f (patch) | |
tree | 04d702b39cd37be9b6c66c897f6c774a7dd1c0a6 /src/test/burn | |
parent | 85745284cd76858f8699190c53719607e0058712 (diff) | |
download | wix-ee41358bb583619ef4fe6707958dc3c6c62cd13f.tar.gz wix-ee41358bb583619ef4fe6707958dc3c6c62cd13f.tar.bz2 wix-ee41358bb583619ef4fe6707958dc3c6c62cd13f.zip |
Fix up COM+ to be back in working order under Wix4+
Table names updated for Wix4 prefix.
Custom action names similarly updated.
Table names Wix4ComPlusUserInApplicationRole,
Wix4ComPlusGroupInApplicationRole and Wix4ComPlusApplicationRoleProperty
had to be shortened to fit within MSI 31 character table name limit.
Migrated from fixed GUID for RegistrationHelper to use CLSIDFromProgID in
an attempt to fix behaviour under .NET 4+ DLLs.
Added setting of Partition enable if a Partition is configured in authoring,
new Windows config has Partitions disabled by default, and they don't work
at all under Windows workstation (non-server) versions.
Added a new Runtime condition for `RequireWindowsServer` which will skip
execution of Runtime test on workstation/desktop OSes, since COM+ Partitions
only work correctly under Windows Server.
Quite a lot of basic typos fixed also.
Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Diffstat (limited to 'src/test/burn')
-rw-r--r-- | src/test/burn/WixTestTools/RuntimeFactAttribute.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/test/burn/WixTestTools/RuntimeFactAttribute.cs b/src/test/burn/WixTestTools/RuntimeFactAttribute.cs index f73c87a2..573a9de2 100644 --- a/src/test/burn/WixTestTools/RuntimeFactAttribute.cs +++ b/src/test/burn/WixTestTools/RuntimeFactAttribute.cs | |||
@@ -5,6 +5,7 @@ namespace WixTestTools | |||
5 | using System; | 5 | using System; |
6 | using System.Security.Principal; | 6 | using System.Security.Principal; |
7 | using WixInternal.TestSupport.XunitExtensions; | 7 | using WixInternal.TestSupport.XunitExtensions; |
8 | using System.Runtime.InteropServices; | ||
8 | 9 | ||
9 | public class RuntimeFactAttribute : SkippableFactAttribute | 10 | public class RuntimeFactAttribute : SkippableFactAttribute |
10 | { | 11 | { |
@@ -12,6 +13,16 @@ namespace WixTestTools | |||
12 | 13 | ||
13 | public static bool RuntimeTestsEnabled { get; } | 14 | public static bool RuntimeTestsEnabled { get; } |
14 | public static bool RunningAsAdministrator { get; } | 15 | public static bool RunningAsAdministrator { get; } |
16 | public static bool RunningOnWindowsServer { get; } | ||
17 | |||
18 | [DllImport("shlwapi.dll", SetLastError = true, EntryPoint = "#437")] | ||
19 | private static extern bool IsOS(int os); | ||
20 | private static bool IsWindowsServer() | ||
21 | { | ||
22 | const int OS_ANYSERVER = 29; | ||
23 | return IsOS(OS_ANYSERVER); | ||
24 | } | ||
25 | |||
15 | 26 | ||
16 | static RuntimeFactAttribute() | 27 | static RuntimeFactAttribute() |
17 | { | 28 | { |
@@ -21,6 +32,25 @@ namespace WixTestTools | |||
21 | 32 | ||
22 | var testsEnabledString = Environment.GetEnvironmentVariable(RequiredEnvironmentVariableName); | 33 | var testsEnabledString = Environment.GetEnvironmentVariable(RequiredEnvironmentVariableName); |
23 | RuntimeTestsEnabled = Boolean.TryParse(testsEnabledString, out var testsEnabled) && testsEnabled; | 34 | RuntimeTestsEnabled = Boolean.TryParse(testsEnabledString, out var testsEnabled) && testsEnabled; |
35 | |||
36 | RunningOnWindowsServer = IsWindowsServer(); | ||
37 | } | ||
38 | |||
39 | private bool _RequireWindowsServer; | ||
40 | public bool RequireWindowsServer | ||
41 | { | ||
42 | get | ||
43 | { | ||
44 | return _RequireWindowsServer; | ||
45 | } | ||
46 | set | ||
47 | { | ||
48 | _RequireWindowsServer = value; | ||
49 | if (_RequireWindowsServer && !RunningOnWindowsServer) | ||
50 | { | ||
51 | this.Skip = $"These tests are only run on Windows Server"; | ||
52 | } | ||
53 | } | ||
24 | } | 54 | } |
25 | 55 | ||
26 | public RuntimeFactAttribute() | 56 | public RuntimeFactAttribute() |