Skip to content
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

Add .devcontainer sufficient to run our tests #1611

Merged
merged 7 commits into from
Mar 20, 2025

Conversation

BillyONeal
Copy link
Member

No description provided.

ADD https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb /packages-microsoft-prod.deb
ADD https://deb.nodesource.com/setup_20.x /nodesource_setup.sh

ENV APT_PACKAGES="git curl zip unzip tar build-essential cmake ninja-build powershell nodejs"
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm pretty sure I need to add some more here for binary caching e2e tests to pass due to mono. Testing in GitHub Codespaces now

@BillyONeal BillyONeal marked this pull request as draft March 12, 2025 21:33
@BillyONeal
Copy link
Member Author

BillyONeal commented Mar 12, 2025

Drafted this for now because for some reason it isn't working in codespaces:

/workspaces/vcpkg-tool/azure-pipelines/end-to-end-tests-prelude.ps1:48: Write-Stack                                     
/workspaces/vcpkg-tool/azure-pipelines/end-to-end-tests-prelude.ps1:99: Throw-IfFailed                                  
/workspaces/vcpkg-tool/azure-pipelines/end-to-end-tests-dir/add.ps1:58: <ScriptBlock>                                   
/workspaces/vcpkg-tool/azure-pipelines/end-to-end-tests.ps1:146: <ScriptBlock>                                          
Exception: /workspaces/vcpkg-tool/azure-pipelines/end-to-end-tests-prelude.ps1:100:9                                    
Line |
 100 |          throw "'$Script:CurrentTest' had a step with a nonzero exit c …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | '/workspaces/vcpkg-tool/build/vcpkg-shell.ps1 add port sqlite3[core,zlib] --triplet x64-linux --x-buildtrees-root=/workspaces/vcpkg-tool/build/work/testing/buildtrees
     | --x-install-root=/workspaces/vcpkg-tool/build/work/testing/installed --x-packages-root=/workspaces/vcpkg-tool/build/work/testing/packages --x-manifest-root=/workspaces/vcpkg-tool/build/work/testing/add_port' had a step with a
     | nonzero exit code:

pwsh is trying to run vcpkg-in-development.ps1 as a 'generic shell script' rather than a PowerShell script so it explodes horribly

@JavierMatosD
Copy link
Contributor

image

I wish we would just spit out the actual error rather than just saying there was one...

@BillyONeal
Copy link
Member Author

I wish we would just spit out the actual error rather than just saying there was one...

We do print the actual error most of the time.

@BillyONeal
Copy link
Member Author

pwsh is trying to run vcpkg-in-development.ps1 as a 'generic shell script' rather than a PowerShell script so it explodes horribly

Guess at the cause: trying to run the original .ps1 from bash rather than from pwsh in the first place

@BillyONeal
Copy link
Member Author

The 'impossible' behavior where sometimes invoking the built binary just exits with no output was caused by:

                "CMAKE_CXX_FLAGS": "-fprofile-arcs -fPIC -O0 -fsanitize=undefined -fsanitize=address",
                "CMAKE_EXE_LINKER_FLAGS": "-static-libasan",

I'm guessing primarily -fprofile-arcs but not sure.

@BillyONeal BillyONeal marked this pull request as ready for review March 19, 2025 21:24
@BillyONeal
Copy link
Member Author

image

It works now! :D

@BillyONeal BillyONeal merged commit 418bd01 into microsoft:main Mar 20, 2025
6 checks passed
@BillyONeal BillyONeal deleted the devcontainer branch March 20, 2025 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants