Skip to content

[vcpkg] Refactor end-to-end tests#15081

Merged
ras0219-msft merged 3 commits intomicrosoft:masterfrom
ras0219:dev/roschuma/e2e-refactor
Dec 15, 2020
Merged

[vcpkg] Refactor end-to-end tests#15081
ras0219-msft merged 3 commits intomicrosoft:masterfrom
ras0219:dev/roschuma/e2e-refactor

Conversation

@ras0219
Copy link
Contributor

@ras0219 ras0219 commented Dec 13, 2020

This PR splits the end to end integration tests into separate files so they can be individually tested:

vcpkg> scripts/azure-pipelines/end-to-end-tests.ps1 -WorkingRoot testing -Triplet x64-windows -Filter "integrate"

Each suite begins by sourcing the prelude file, which resets the WorkingRoot to a known good state.

@ras0219 ras0219 force-pushed the dev/roschuma/e2e-refactor branch from 0ce2674 to de8c7b9 Compare December 13, 2020 01:03
@ras0219 ras0219 force-pushed the dev/roschuma/e2e-refactor branch from fcf964d to 52d2652 Compare December 14, 2020 21:34
@ras0219 ras0219 requested a review from BillyONeal December 14, 2020 21:34
Copy link
Contributor

@strega-nil strega-nil left a comment

Choose a reason for hiding this comment

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

Mostly minor stuff

# Test msbuild props and targets
$CurrentTest = "zlib:x86-windows-static msbuild scripts\testing\integrate-install\..."
Write-Host $CurrentTest
./vcpkg $commonArgs install zlib:x86-windows-static --x-binarysource=clear
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
./vcpkg $commonArgs install zlib:x86-windows-static --x-binarysource=clear
Run-Vcpkg @commonArgs install zlib:x86-windows-static --x-binarysource=clear

}
$CurrentTest = "zlib:x86-windows msbuild scripts\testing\integrate-install\..."
Write-Host $CurrentTest
./vcpkg $commonArgs install zlib:x86-windows --x-binarysource=clear
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
./vcpkg $commonArgs install zlib:x86-windows --x-binarysource=clear
Run-Vcpkg @commonArgs install zlib:x86-windows --x-binarysource=clear

foreach ($project in @("Project1", "NoProps")) {
$CurrentTest = "msbuild scripts\testing\integrate-install\$project.vcxproj"
Write-Host $CurrentTest
./vcpkg $commonArgs env "msbuild scripts\testing\integrate-install\$project.vcxproj /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ "
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
./vcpkg $commonArgs env "msbuild scripts\testing\integrate-install\$project.vcxproj /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ "
Run-Vcpkg @commonArgs env "msbuild scripts\testing\integrate-install\$project.vcxproj /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ "

process_output_directory(filesystem, root, args.packages_root_dir.get(), "packages", VCPKG_LINE_INFO);
scripts = process_input_directory(filesystem, root, args.scripts_root_dir.get(), "scripts", VCPKG_LINE_INFO);
builtin_ports =
process_output_directory(filesystem, root, args.builtin_ports_root_dir.get(), "ports", VCPKG_LINE_INFO);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
process_output_directory(filesystem, root, args.builtin_ports_root_dir.get(), "ports", VCPKG_LINE_INFO);
process_input_directory(filesystem, root, args.builtin_ports_root_dir.get(), "ports", VCPKG_LINE_INFO);

this should be an input directory, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's complicated, because it's an output directory for create.

@ras0219
Copy link
Contributor Author

ras0219 commented Dec 15, 2020

@strega-nil This PR is scoped to just split the tests as-is into separate files to unblock adding tests for all other outstanding feature PRs. It is not intended to have any functional changes (except moving the create test).

I'll leave further test cleanup to future work.

@ras0219-msft ras0219-msft merged commit 815396f into microsoft:master Dec 15, 2020
@ras0219 ras0219 deleted the dev/roschuma/e2e-refactor branch December 15, 2020 18:26
@strega-nil
Copy link
Contributor

@ras0219 mmh, alright.

strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
* [vcpkg] Refactor end-to-end tests

* [vcpkg] Cherry-pick x-builtin-ports-root from microsoft#14999

* [vcpkg] Move create test from unit tests to e2e

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
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.

5 participants