-
Notifications
You must be signed in to change notification settings - Fork 19
Fix windows tests #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
var builderArgs []string | ||
var discoveredTarPath string | ||
if runtime.GOOS == "windows" { | ||
builderArgs = []string{"-tags=windows2012R2"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we're using 2012R2 instead of something more recent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes from the file we deleted as part of this change:
builder, err := gexec.Build("code.cloudfoundry.org/buildpackapplifecycle/builder", "-tags=windows2012R2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me. Thanks for the PR!
These tests were written when Windows did not include a tar.exe, so it had to be downloaded for Windows tests. Newer versions of Windows include tar.exe, so we've updated the tests to fall back to trying a local tar.exe Signed-off-by: David Sabeti <[email protected]>
These tests were failing on Windows when the test executable was explicitly installed as 'hello', as opposed to using the native go build output of 'hello.exe'. Changing all invocations to use the 'basename' of the go built executable (in the case of windows an '.exe' extension is added) allowed the failing tests to succeed. Signed-off-by: David Sabeti <[email protected]>
Signed-off-by: Aram Price <[email protected]>
3877a3c
to
0d85ddc
Compare
…prover Diego Approver cloudfoundry/bbs#64 cloudfoundry/bbs#68 cloudfoundry/diego-dockerfiles@3aa03b8 cloudfoundry/diego-dockerfiles@77dccfa cloudfoundry/diego-dockerfiles@c69911c cloudfoundry/diego-dockerfiles@df0aed2 cloudfoundry/diego-release@05dcaba cloudfoundry/diego-release@390d5d7 cloudfoundry/diego-release@4d5e6a1 cloudfoundry/diego-release@5158007 cloudfoundry/diego-release#740 cloudfoundry/docs-cloudfoundry-concepts#181 cloudfoundry/dontpanic#39 cloudfoundry/executor#76 cloudfoundry/executor#80 cloudfoundry/grace#3 cloudfoundry/healthchecker-release#2 cloudfoundry/wg-app-platform-runtime-ci@03fa33d cloudfoundry/wg-app-platform-runtime-ci@3affeda PR Reviews: cloudfoundry/buildpackapplifecycle#55 cloudfoundry/cacheddownloader#18 cloudfoundry/diego-release#689 cloudfoundry/diego-release#690 cloudfoundry/diego-release#704 cloudfoundry/diego-release#728
…prover Diego Approver cloudfoundry/bbs#64 cloudfoundry/bbs#68 cloudfoundry/diego-dockerfiles@3aa03b8 cloudfoundry/diego-dockerfiles@77dccfa cloudfoundry/diego-dockerfiles@c69911c cloudfoundry/diego-dockerfiles@df0aed2 cloudfoundry/diego-release@05dcaba cloudfoundry/diego-release@390d5d7 cloudfoundry/diego-release@4d5e6a1 cloudfoundry/diego-release@5158007 cloudfoundry/diego-release#740 cloudfoundry/docs-cloudfoundry-concepts#181 cloudfoundry/dontpanic#39 cloudfoundry/executor#76 cloudfoundry/executor#80 cloudfoundry/grace#3 cloudfoundry/healthchecker-release#2 cloudfoundry/wg-app-platform-runtime-ci@03fa33d cloudfoundry/wg-app-platform-runtime-ci@3affeda PR Reviews: cloudfoundry/buildpackapplifecycle#55 cloudfoundry/cacheddownloader#18 cloudfoundry/diego-release#689 cloudfoundry/diego-release#690 cloudfoundry/diego-release#704 cloudfoundry/diego-release#728
Windows tests were failing for a few reasons:
TAR_URL
needed to be specified, but the historical location for a Windowstar.exe
was deleted. The good news is that we can use localtar.exe
available on most Windows VMs (example, the Diego team's CI's concourse worker)TAR_URL
is specified, the tests will still download and use the executable there. This could be useful if it becomes important to test with a specific version oftar.exe
.hello
vshello.exe
). Our changes preserve the native executable as determined bygo build
. This got the tests to pass.Bonus content:
@aramprice