-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This script uses valgrind to spin up a real Windows box to run pre-built tests in it, thus avoiding to rely only on Github action or dual booting for running tests on Windows. Signed-off-by: Charles Oliveira <[email protected]>
- Loading branch information
Showing
4 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
build/ | ||
testing.log | ||
*.out | ||
*.exe | ||
.cpackget* | ||
tmp/ | ||
.vagrant/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
# All Vagrant configuration is done below. The "2" in Vagrant.configure | ||
# configures the configuration version (we support older styles for | ||
# backwards compatibility). Please don't change it unless you know what | ||
# you're doing. | ||
Vagrant.configure("2") do |config| | ||
# The most common configuration options are documented and commented below. | ||
# For a complete reference, please see the online documentation at | ||
# https://docs.vagrantup.com. | ||
|
||
# Every Vagrant development environment requires a box. You can search for | ||
# boxes at https://vagrantcloud.com/search. | ||
config.vm.box = "senglin/win-10-enterprise-vs2015community" | ||
config.vm.box_version = "1.0.0" | ||
|
||
config.vm.synced_folder "./", "/vagrant" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
echo "Testing on Windows" | ||
|
||
is_vagrant_up=$1 | ||
|
||
# Spin up windows box | ||
if [ -z $is_vagrant_up ] | ||
then | ||
vagrant up | ||
fi | ||
|
||
cd cmd | ||
|
||
# Build test binaries for windows and run it | ||
PACKAGES="utils installer xml" | ||
for package in $PACKAGES | ||
do | ||
cd $package | ||
GOOS=windows go test -c | ||
vagrant ssh -- -t "cd ../../vagrant/cmd/$package; ./$package.test.exe $ARGS" | ||
cd .. | ||
done | ||
|
||
# Shut down windows box | ||
if [ -z $is_vagrant_up ] | ||
then | ||
vagrant halt | ||
fi |