Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions include/vcpkg-test/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,15 @@ namespace vcpkg::Test

extern const Triplet X86_WINDOWS;
extern const Triplet X64_WINDOWS;
extern const Triplet X64_WINDOWS_STATIC;
extern const Triplet X64_WINDOWS_STATIC_MD;
extern const Triplet ARM64_WINDOWS;
extern const Triplet X86_UWP;
extern const Triplet X64_UWP;
extern const Triplet ARM_UWP;
extern const Triplet X64_ANDROID;
extern const Triplet X64_OSX;
extern const Triplet X64_LINUX;

/// <summary>
/// Map of source control files by their package name.
Expand Down
1 change: 1 addition & 0 deletions include/vcpkg/base/xmlserializer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <vcpkg/base/strings.h>
#include <vcpkg/base/stringview.h>

#include <string>
Expand Down
19 changes: 16 additions & 3 deletions include/vcpkg/ci-baseline.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#include <vcpkg/fwd/build.h>
#include <vcpkg/fwd/ci-baseline.h>

#include <vcpkg/base/expected.h>
Expand Down Expand Up @@ -54,7 +55,19 @@ namespace vcpkg

std::vector<CiBaselineLine> parse_ci_baseline(StringView text, StringView origin, ParseMessages& messages);

SortedVector<PackageSpec> parse_and_apply_ci_baseline(View<CiBaselineLine> lines,
ExclusionsMap& exclusions_map,
SkipFailures skip_failures);
struct CiBaselineData
{
SortedVector<PackageSpec> expected_failures;
SortedVector<PackageSpec> required_success;
};

CiBaselineData parse_and_apply_ci_baseline(View<CiBaselineLine> lines,
ExclusionsMap& exclusions_map,
SkipFailures skip_failures);

LocalizedString format_ci_result(const PackageSpec& spec,
Build::BuildResult result,
const CiBaselineData& cidata,
StringView cifile,
bool allow_unexpected_passing);
}
1 change: 1 addition & 0 deletions include/vcpkg/fwd/build.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ namespace vcpkg::Build
{
struct BuildInfo;
struct PreBuildInfo;
enum class BuildResult;
}
1 change: 1 addition & 0 deletions include/vcpkg/fwd/ci-baseline.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace vcpkg
{
Skip,
Fail,
Pass,
};
enum class SkipFailures : bool
{
Expand Down
6 changes: 6 additions & 0 deletions include/vcpkg/fwd/triplet.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#pragma once

namespace vcpkg
{
struct Triplet;
}
1 change: 1 addition & 0 deletions include/vcpkg/triplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <vcpkg/base/fwd/format.h>

#include <vcpkg/fwd/triplet.h>
#include <vcpkg/fwd/vcpkgcmdarguments.h>

#include <vcpkg/base/optional.h>
Expand Down
37 changes: 37 additions & 0 deletions include/vcpkg/xunitwriter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#pragma once

#include <vcpkg/fwd/build.h>
#include <vcpkg/fwd/packagespec.h>
#include <vcpkg/fwd/triplet.h>

#include <vcpkg/base/chrono.h>

#include <chrono>
#include <map>
#include <string>
#include <vector>

namespace vcpkg
{
struct XunitTest;

// https://xunit.net/docs/format-xml-v2
struct XunitWriter
{
public:
// Out of line con/destructor avoids exposing XunitTest
XunitWriter();
~XunitWriter();
void add_test_results(const PackageSpec& spec,
Build::BuildResult build_result,
const ElapsedTime& elapsed_time,
const std::chrono::system_clock::time_point& start_time,
const std::string& abi_tag,
const std::vector<std::string>& features);

std::string build_xml(Triplet controlling_triplet);

private:
std::map<std::string, std::vector<XunitTest>> m_tests;
};
}
5 changes: 3 additions & 2 deletions locales/messages.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"ChecksUnreachableCode": "unreachable code was reached",
"ChecksUpdateVcpkg": "updating vcpkg by rerunning bootstrap-vcpkg may resolve this failure.",
"CiBaselineAllowUnexpectedPassingRequiresBaseline": "--allow-unexpected-passing can only be used if a baseline is provided via --ci-baseline.",
"CiBaselineDisallowedCascade": "REGRESSION: {spec} cascaded, but it is required to pass. ({path}).",
"CiBaselineRegression": "REGRESSION: {spec} failed with {build_result}. If expected, add {spec}=fail to {path}.",
"CiBaselineRegressionHeader": "REGRESSIONS:",
"CiBaselineUnexpectedPass": "PASSING, REMOVE FROM FAIL LIST: {spec} ({path}).",
Expand Down Expand Up @@ -99,7 +100,7 @@
"ErrorVsCodeNotFoundPathExamined": "The following paths were examined:",
"ExcludedPackage": "Excluded {spec}",
"ExpectedCharacterHere": "expected '{expected}' here",
"ExpectedFailOrSkip": "expected 'fail' or 'skip' here",
"ExpectedFailOrSkip": "expected 'fail', 'skip', or 'pass' here",
"ExpectedPortName": "expected a port name here",
"ExpectedTripletName": "expected a triplet name here",
"FailedToProvisionCe": "Failed to provision vcpkg-ce.",
Expand Down Expand Up @@ -194,7 +195,7 @@
"ToolInWin10": "This utility is bundled with Windows 10 or later.",
"UnexpectedErrorDuringBulkDownload": "an unexpected error occurred during bulk download.",
"UnexpectedToolOutput": "{tool_name} ({path}) produced unexpected output when attempting to determine the version:",
"UnknownBaselineFileContent": "unrecognizable baseline entry; expected 'port:triplet=(fail|skip)'",
"UnknownBaselineFileContent": "unrecognizable baseline entry; expected 'port:triplet=(fail|skip|pass)'",
"UnknownBinaryProviderType": "unknown binary provider type: valid providers are 'clear', 'default', 'nuget', 'nugetconfig', 'interactive', and 'files'",
"UnknownTool": "vcpkg does not have a definition of this tool for this platform.",
"UnsupportedSystemName": "Could not map VCPKG_CMAKE_SYSTEM_NAME '{system_name}' to a vcvarsall platform. Supported system names are '', 'Windows' and 'WindowsStore'.",
Expand Down
6 changes: 4 additions & 2 deletions locales/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
"ChecksUnreachableCode": "unreachable code was reached",
"ChecksUpdateVcpkg": "updating vcpkg by rerunning bootstrap-vcpkg may resolve this failure.",
"CiBaselineAllowUnexpectedPassingRequiresBaseline": "--allow-unexpected-passing can only be used if a baseline is provided via --ci-baseline.",
"CiBaselineDisallowedCascade": "REGRESSION: {spec} cascaded, but it is required to pass. ({path}).",
"_CiBaselineDisallowedCascade.comment": "An example of {spec} is zlib:x64-windows. An example of {path} is /foo/bar.",
"CiBaselineRegression": "REGRESSION: {spec} failed with {build_result}. If expected, add {spec}=fail to {path}.",
"_CiBaselineRegression.comment": "An example of {spec} is zlib:x64-windows. An example of {build_result} is One of the BuildResultXxx messages (such as BuildResultSucceeded/SUCCEEDED). An example of {path} is /foo/bar.",
"CiBaselineRegressionHeader": "REGRESSIONS:",
Expand Down Expand Up @@ -179,7 +181,7 @@
"_ExcludedPackage.comment": "An example of {spec} is zlib:x64-windows.",
"ExpectedCharacterHere": "expected '{expected}' here",
"_ExpectedCharacterHere.comment": "{expected} is a locale-invariant delimiter; for example, the ':' or '=' in 'zlib:x64-windows=skip'",
"ExpectedFailOrSkip": "expected 'fail' or 'skip' here",
"ExpectedFailOrSkip": "expected 'fail', 'skip', or 'pass' here",
"ExpectedPortName": "expected a port name here",
"ExpectedTripletName": "expected a triplet name here",
"FailedToProvisionCe": "Failed to provision vcpkg-ce.",
Expand Down Expand Up @@ -336,7 +338,7 @@
"UnexpectedErrorDuringBulkDownload": "an unexpected error occurred during bulk download.",
"UnexpectedToolOutput": "{tool_name} ({path}) produced unexpected output when attempting to determine the version:",
"_UnexpectedToolOutput.comment": "The actual command line output will be appended after this message. An example of {tool_name} is aria2. An example of {path} is /foo/bar.",
"UnknownBaselineFileContent": "unrecognizable baseline entry; expected 'port:triplet=(fail|skip)'",
"UnknownBaselineFileContent": "unrecognizable baseline entry; expected 'port:triplet=(fail|skip|pass)'",
"UnknownBinaryProviderType": "unknown binary provider type: valid providers are 'clear', 'default', 'nuget', 'nugetconfig', 'interactive', and 'files'",
"UnknownTool": "vcpkg does not have a definition of this tool for this platform.",
"UnsupportedSystemName": "Could not map VCPKG_CMAKE_SYSTEM_NAME '{system_name}' to a vcvarsall platform. Supported system names are '', 'Windows' and 'WindowsStore'.",
Expand Down
Loading