Skip to content

Commit 9181b57

Browse files
committed
fix server tests
add appvey RDP try logging the install-windows.qs
1 parent 6b4c457 commit 9181b57

File tree

4 files changed

+194
-63
lines changed

4 files changed

+194
-63
lines changed

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ artifacts:
1616
name: oss.tar.gz
1717

1818
init:
19-
#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
19+
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
2020

2121
clone_folder: C:\projects\openstudio-server
2222

ci/appveyor/install-windows.qs

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,49 @@
1-
function Controller () {
2-
// silent install is not an option until QtIFW v3.0.1
3-
// gui.setSilent(true);
1+
function Controller() {
2+
console.log("Controller created");
3+
// gui.setSilent(true); // cannot use until QtIFW v3.0.1, keep commented
44
}
55

66
Controller.prototype.IntroductionPageCallback = function () {
7-
gui.clickButton(buttons.NextButton);
7+
console.log("IntroductionPageCallback");
8+
gui.clickButton(buttons.NextButton);
89
}
910

1011
Controller.prototype.ComponentSelectionPageCallback = function () {
11-
var widget = gui.currentPageWidget();
12-
13-
// to install a subset of components, uncomment the code below and edit as neccesary
14-
//widget.deselectAll();
15-
//widget.selectComponent('SketchUpPlugin');
16-
//widget.selectComponent('CLI');
17-
//widget.selectComponent('RubyAPI');
18-
//widget.selectComponent('CSharpAPI');
19-
//widget.selectComponent('PAT');
20-
//widget.selectComponent('OpenStudioApp');
21-
//widget.selectComponent('DView');
22-
//widget.selectComponent('EnergyPlus');
23-
//widget.selectComponent('Radiance');
24-
//widget.selectComponent('Resources');
25-
26-
gui.clickButton(buttons.NextButton);
12+
console.log("ComponentSelectionPageCallback");
13+
var widget = gui.currentPageWidget();
14+
if (widget) {
15+
console.log("ComponentSelectionPage widget OK");
16+
// If you want defaults, do nothing else.
17+
// Example if you ever want to tweak:
18+
// widget.deselectAll();
19+
// widget.selectComponent("CLI");
20+
}
21+
gui.clickButton(buttons.NextButton);
2722
}
2823

2924
Controller.prototype.TargetDirectoryPageCallback = function () {
30-
// set install directory if needed
31-
var widget = gui.currentPageWidget();
32-
widget.TargetDirectoryLineEdit.setText("c:\\openstudio")
33-
gui.clickButton(buttons.NextButton);
25+
console.log("TargetDirectoryPageCallback");
26+
var widget = gui.currentPageWidget();
27+
if (widget && widget.TargetDirectoryLineEdit) {
28+
widget.TargetDirectoryLineEdit.setText("c:\\openstudio");
29+
console.log("Set target directory to c:\\openstudio");
30+
} else {
31+
console.log("TargetDirectoryLineEdit not found on this page");
32+
}
33+
gui.clickButton(buttons.NextButton);
3434
}
3535

3636
Controller.prototype.StartMenuDirectoryPageCallback = function () {
37-
gui.clickButton(buttons.NextButton);
37+
console.log("StartMenuDirectoryPageCallback");
38+
gui.clickButton(buttons.NextButton);
3839
}
3940

4041
Controller.prototype.ReadyForInstallationPageCallback = function () {
41-
gui.clickButton(buttons.NextButton);
42+
console.log("ReadyForInstallationPageCallback");
43+
gui.clickButton(buttons.NextButton);
4244
}
4345

4446
Controller.prototype.FinishedPageCallback = function () {
45-
gui.clickButton(buttons.FinishButton);
46-
}
47+
console.log("FinishedPageCallback");
48+
gui.clickButton(buttons.FinishButton);
49+
}

ci/appveyor/setup.cmd

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
@echo off
2+
REM Path to this script's directory
3+
set "SCRIPT_DIR=%~dp0"
24
REM Set initial PATH with Git, Ruby binaries, and DevKit
35
set PATH=C:\Ruby32-x64\bin;C:\DevKit\bin;C:\Program Files\Git\mingw64\bin;C:\projects\openstudio\bin;%PATH%
46

@@ -20,14 +22,19 @@ if %ERRORLEVEL% neq 0 (
2022
dir .
2123

2224
REM “Unblock” the file so Windows does not refuse to execute it
23-
powershell -Command "Unblock-File -Path '%OS_INSTALL_NAME%'"
25+
powershell -Command "Unblock-File -Path '%CD%\%OS_INSTALL_NAME%'"
2426

25-
REM Execute the OpenStudio installer
27+
REM echo Execute the OpenStudio installer
2628
REM %OS_INSTALL_NAME% --script ci/appveyor/install-windows.qs
2729
REM 3) Run the OpenStudio installer in “quiet” mode, pointing to our QScript
28-
echo Launching installer…
30+
REM echo Launching installer…
2931
REM Use “.\” to ensure we’re running the downloaded EXE in the current directory
30-
start "" /wait "%OS_INSTALL_NAME%" --script ci/appveyor/install-windows.qs
32+
REM start "" /wait "%OS_INSTALL_NAME%" --script ci/appveyor/install-windows.qs
33+
REM Add logging so we can see if the QScript runs
34+
"%OS_INSTALL_NAME%" ^
35+
--script "%SCRIPT_DIR%install-windows.qs" ^
36+
--verbose ^
37+
--log "%TEMP%\openstudio-installer.log"
3138
if %ERRORLEVEL% neq 0 (
3239
echo.
3340
echo ERROR: OpenStudio installer "%OS_INSTALL_NAME%" returned error code %ERRORLEVEL%. Aborting.

0 commit comments

Comments
 (0)