Skip to content

Commit

Permalink
give tests more window-finding time for appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
gurnec committed Sep 6, 2016
1 parent 73e3880 commit 1d047a6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
7 changes: 5 additions & 2 deletions UnitTests/HashProp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

using Xunit;
using TestStack.White;
using TestStack.White.Configuration;
using TestStack.White.UIItems;
using TestStack.White.UIItems.WindowItems;
using TestStack.White.UIItems.Finders;
Expand Down Expand Up @@ -56,12 +57,13 @@ Window OpenHashPropWindow(string filename)
sei.nShow = 1; // SW_SHOWNORMAL
ShellExecuteExW(ref sei);

TestStack.White.Configuration.CoreAppXmlConfiguration.Instance.FindWindowTimeout = 1500; // 1.5 sec.

// Find the file properties sheet window
Window prop_window = null;

// Prior to Windows 10, the file properties sheet opens in the curent process
int orig_timeout = CoreAppXmlConfiguration.Instance.FindWindowTimeout;
if ((int)Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentMajorVersionNumber", 0) >= 10)
CoreAppXmlConfiguration.Instance.FindWindowTimeout = 1500; // likely to fail on Windows 10+, so use a short timeout (1.5s) in that case
if (! is_com_surrogate)
{
Application app = Application.Attach(Process.GetCurrentProcess());
Expand Down Expand Up @@ -89,6 +91,7 @@ Window OpenHashPropWindow(string filename)
Assert.NotNull(prop_window);
is_com_surrogate = true;
}
CoreAppXmlConfiguration.Instance.FindWindowTimeout = orig_timeout;

return prop_window;
}
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2.4.0.48-beta
version: 2.4.0.51-beta

image: Visual Studio 2015

Expand Down
8 changes: 4 additions & 4 deletions installer/HashCheck.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Unicode true

Name "HashCheck"
OutFile "HashCheckSetup-v2.4.0.48-beta.exe"
OutFile "HashCheckSetup-v2.4.0.51-beta.exe"

RequestExecutionLevel admin
ManifestSupportedOS all
Expand Down Expand Up @@ -53,13 +53,13 @@ FunctionEnd
!insertmacro MUI_LANGUAGE "Ukrainian"
!insertmacro MUI_LANGUAGE "Catalan"

VIProductVersion "2.4.0.48-beta"
VIProductVersion "2.4.0.51-beta"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "HashCheck Shell Extension"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "2.4.0.48-beta"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "2.4.0.51-beta"
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "Installer distributed from https://github.com/gurnec/HashCheck/releases"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright © 2008-2016 Kai Liu, Christopher Gurnee, Tim Schlueter, et al. All rights reserved."
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Installer (x86/x64) from https://github.com/gurnec/HashCheck/releases"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "2.4.0.48-beta"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "2.4.0.51-beta"

; With solid compression, files that are required before the
; actual installation should be stored first in the data block,
Expand Down
4 changes: 2 additions & 2 deletions version.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#define HASHCHECK_NAME_STR "HashCheck Shell Extension"

// Full version: MUST be in the form of major,minor,revision,build
#define HASHCHECK_VERSION_FULL 2,4,0,48
#define HASHCHECK_VERSION_FULL 2,4,0,51

// String version: May be any suitable string
#define HASHCHECK_VERSION_STR "2.4.0.48-beta"
#define HASHCHECK_VERSION_STR "2.4.0.51-beta"

#ifdef _USRDLL
// PE version: MUST be in the form of major.minor
Expand Down

0 comments on commit 1d047a6

Please sign in to comment.