aboutsummaryrefslogtreecommitdiff
path: root/src/test/burn/TestBA
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-08-03 14:55:23 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-08-03 15:57:24 -0500
commit124fef398a26bc8e139e889a2345602d2478590c (patch)
tree002c77e0c1d72b0cc0e46bed3c6f02d4179625fe /src/test/burn/TestBA
parenta896fec453056aa5e1ad803b04a672d2dceda981 (diff)
downloadwix-124fef398a26bc8e139e889a2345602d2478590c.tar.gz
wix-124fef398a26bc8e139e889a2345602d2478590c.tar.bz2
wix-124fef398a26bc8e139e889a2345602d2478590c.zip
Add ability to skip a local path candidate if it failed verification.
Fixes 6818
Diffstat (limited to 'src/test/burn/TestBA')
-rw-r--r--src/test/burn/TestBA/TestBA.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/test/burn/TestBA/TestBA.cs b/src/test/burn/TestBA/TestBA.cs
index 7e3d2623..e73c907e 100644
--- a/src/test/burn/TestBA/TestBA.cs
+++ b/src/test/burn/TestBA/TestBA.cs
@@ -155,6 +155,9 @@ namespace WixToolset.Test.BA
155 this.quitAfterDetect = false; 155 this.quitAfterDetect = false;
156 } 156 }
157 157
158 this.ImportContainerSources();
159 this.ImportPayloadSources();
160
158 this.wait.WaitOne(); 161 this.wait.WaitOne();
159 162
160 if (this.action == LaunchAction.Help) 163 if (this.action == LaunchAction.Help)
@@ -657,6 +660,54 @@ namespace WixToolset.Test.BA
657 this.Engine.Log(LogLevel.Standard, String.Concat("TESTBA", relation, ": ", message)); 660 this.Engine.Log(LogLevel.Standard, String.Concat("TESTBA", relation, ": ", message));
658 } 661 }
659 662
663 private void ImportContainerSources()
664 {
665 string testName = this.Engine.GetVariableString("TestGroupName");
666 using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}\container", testName)))
667 {
668 if (testKey == null)
669 {
670 return;
671 }
672
673 foreach (var containerId in testKey.GetSubKeyNames())
674 {
675 using (RegistryKey subkey = testKey.OpenSubKey(containerId))
676 {
677 string initialSource = subkey == null ? null : subkey.GetValue("InitialLocalSource") as string;
678 if (initialSource != null)
679 {
680 this.Engine.SetLocalSource(containerId, null, initialSource);
681 }
682 }
683 }
684 }
685 }
686
687 private void ImportPayloadSources()
688 {
689 string testName = this.Engine.GetVariableString("TestGroupName");
690 using (RegistryKey testKey = Registry.LocalMachine.OpenSubKey(String.Format(@"Software\WiX\Tests\TestBAControl\{0}\payload", testName)))
691 {
692 if (testKey == null)
693 {
694 return;
695 }
696
697 foreach (var payloadId in testKey.GetSubKeyNames())
698 {
699 using (RegistryKey subkey = testKey.OpenSubKey(payloadId))
700 {
701 string initialSource = subkey == null ? null : subkey.GetValue("InitialLocalSource") as string;
702 if (initialSource != null)
703 {
704 this.Engine.SetLocalSource(null, payloadId, initialSource);
705 }
706 }
707 }
708 }
709 }
710
660 private List<string> ReadVerifyArguments() 711 private List<string> ReadVerifyArguments()
661 { 712 {
662 string testName = this.Engine.GetVariableString("TestGroupName"); 713 string testName = this.Engine.GetVariableString("TestGroupName");