Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

[[ WindowsCI ]] Add travis configuration for windows #7076

Closed
wants to merge 8 commits into from

Conversation

livecodeali
Copy link
Member

@livecodeali livecodeali commented May 31, 2019

This patch adds travis configuration for windows.

A number of tweaks have been made to the source code, but they are mostly optional and controlled by environment variables so they do not affect other builds. One minor change is that make.cmd is now expected to be run from the base folder rather than from within the build-win-<arch> folder. This is because some environments appear to have a problem executing cmd.exe /C ../make.cmd and are much happier with cmd.exe /C make.cmd

On Travis we use a chocolatey-installed winflexbison package to provide flex and bison dependencies - they are then named win_flex and win_bison, so control of whether these are used or not in the yacc step has been implemented via an environment variable USE_WINFLEXBISON.

For an as-yet unidentified reason, the generation of lcidlc support files fails in Travis' windows build environment, so we skip it. An environment variable SKIP_LCIDLC is used to handle this.

The current configure.bat script requires user input to run, so this PR tweaks the script to remove that requirement if the build is running on Travis.

A python script has been added which twiddles the appropriate bit of a windows executable to turn it into a console application - this is needed to be able to run tests using the standalone engine.

Finally a whole bunch of tests have been fixed, tweaked, skipped or removed in order to get everything passing.

@livecodeali livecodeali reopened this May 31, 2019
@livecodeali livecodeali force-pushed the travis-ci-windows branch 5 times, most recently from eeeab38 to 2adf9c6 Compare June 3, 2019 13:35
@livecodeali livecodeali changed the title Travis ci windows [[ WindowsCI ]] Add travis configuration for windows Jun 3, 2019
@livecodeali livecodeali force-pushed the travis-ci-windows branch 2 times, most recently from c43071d to bde19da Compare June 3, 2019 13:46
@livecodeali livecodeali removed the WIP label Jun 3, 2019
@livecodeali livecodeali force-pushed the travis-ci-windows branch 4 times, most recently from 1d0dfad to 0a317e8 Compare June 3, 2019 15:35
@livecodeali livecodeali added this to the 9.5.0-dp-2 milestone Jun 3, 2019
@livecodeali
Copy link
Member Author

🍾 🍾 🍾 !

@@ -35,7 +35,12 @@ on TestCombineStrings
sort lines of tArray by item 1 of each
sort lines of tUncombinedData by item 1 of each

TestAssert "Combine strings", tUncombinedData is tArray
if the platform is "win32" then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not clear why these are broken on win32 and not on other platforms - unless the input data is being generated differently... My concern is that the test is actually broken on all platforms, and it is just serendipitous that it is okay on Linux/macOS...

Copy link
Contributor

@runrevmark runrevmark Jun 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, I'm inclined to mark this test as broken for all platforms.


TestAssert "Combine numbers and strings", tUncombinedData is tArray

if the platform is "win32" then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as with the above...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

@montegoulding
Copy link
Member

@livecodeali do you have a copy of the lcidlc error? If we ever want to do https://quality.livecode.com/show_bug.cgi?id=22059 then we will need to sort it.

@livecodeali
Copy link
Member Author

https://api.travis-ci.org/v3/job/540785162/log.txt

(ClCompile target) -> 
  c:\users\travis\build\livecode\livecode\build-win-x86_64\livecode\debug\obj\global_intermediate\lcidlc\encodedjavasupport.c(1): error C2059: syntax error: '.' [C:\Users\travis\build\livecode\livecode\build-win-x86_64\livecode\lcidlc\lcidlc.vcxproj]
  c:\users\travis\build\livecode\livecode\build-win-x86_64\livecode\debug\obj\global_intermediate\lcidlc\encodedjavasupport.c(1): error C2017: illegal escape sequence [C:\Users\travis\build\livecode\livecode\build-win-x86_64\livecode\lcidlc\lcidlc.vcxproj]
  c:\users\travis\build\livecode\livecode\build-win-x86_64\livecode\debug\obj\global_intermediate\lcidlc\encodedsupport.c(1): error C2059: syntax error: '.' [C:\Users\travis\build\livecode\livecode\build-win-x86_64\livecode\lcidlc\lcidlc.vcxproj]
  c:\users\travis\build\livecode\livecode\build-win-x86_64\livecode\debug\obj\global_intermediate\lcidlc\encodedsupport.c(1): error C2017: illegal escape sequence [C:\Users\travis\build\livecode\livecode\build-win-x86_64\livecode\lcidlc\lcidlc.vcxproj]

It looks like it's not generating the support files correctly for some reason...

@montegoulding
Copy link
Member

Hmm... Ok. Would be interesting to see the files. Perhaps a Perl version issue???

@livecodeali
Copy link
Member Author

Yeah that was my vague suspicion

@livecodeali livecodeali force-pushed the travis-ci-windows branch 4 times, most recently from 7c7d452 to 9ce5dcf Compare June 5, 2019 16:44
@livecodeali
Copy link
Member Author

@runrevmark OK, been less lazy with the tests and fixed a bunch (in particular the widget ones which seems to be an issue with capturing the error dialog using wait for messages - perhaps there were additional messages happening on windows?

@peter-b
Copy link
Contributor

peter-b commented Jun 7, 2019

@livecodeali Congratulations! Awesome work getting the tests to run on Windows. 👏 👏

@livecodeali livecodeali force-pushed the travis-ci-windows branch 2 times, most recently from a4a0601 to 92e6844 Compare June 11, 2019 07:29
@livecodeali
Copy link
Member Author

@peter-b Heh, thanks... it's been quite a long road. I've had them running via buildbot before, but not in a way that can be merged. However that did help as I'd fixed a lot of tests already for this!

@livecodepanos livecodepanos removed this from the 9.5.0-rc-1 milestone Sep 17, 2019
This patch tweaks the various path calculations in test makefiles
(and the common makefile) to support testing windows executables
This patch adds a python script which twiddles the appropriate bit
in a windows executable to make it a console application. Console 
applications do not open a separate console window when invoked on 
the command line - the command prompt only returns when the executable 
process finishes. This is the necessary behavior for the standalone
engine when running tests.
This patch fixes, removes or skips a number of tests that fail or
are no longer correct on windows.
This patch allows the use of flex and bison which have been 
installed via the chocolatey package winflexbison as the method
of installing via cygwin does not work on Travis' windows 
containers. Use of win_flex and win_bison can be controlled with
an environment variable `USE_WINFLEXBISON`
This patch removes the need to run make.cmd from within the 
generated build folder.
This patch ensures that if we are running on Travis, the
configure script does not pause for warnings as this requires
user input and we want the build to continue even if there
are warnings.
This patch adds a windows target to the travis configuration file.
This build uses the chocolatey winflexbison package, skips
building lcidlc and only runs LiveCode script based tests, and
is restricted to extension and engine tests for now.
On Travis' windows container, the generation of lcidlc's support files
fails and causes a compilation error. This patch adds a mechanism for
skipping lcidlc builds.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants