Commit 2c703b1a by Courtney Goeltzenleuchter Committed by Commit Bot

Print the testConfig in dEQP tests.

This will help debug failures on the bots that could be caused by the wrong test config being used. As a side effect this changes the condition array of GPUTestConfig to use an angle::BitSetT BUG=chromium:997351 Change-Id: If742cd3d416694d5df6c3e6c1d722a24f487a960 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879585 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 's avatarIan Elliott <ianelliott@google.com>
parent 88a74e59
......@@ -268,6 +268,19 @@ void dEQPCaseList::initialize()
GPUTestConfig testConfig = GPUTestConfig(api);
#if !defined(ANGLE_PLATFORM_ANDROID)
// Note: These prints mess up parsing of test list when running on Android.
std::cout << "Using test config with:" << std::endl;
for (uint32_t condition : testConfig.getConditions())
{
const char *name = GetConditionName(condition);
if (name != nullptr)
{
std::cout << " " << name << std::endl;
}
}
#endif
if (!mTestExpectationsParser.loadTestExpectationsFromFile(testConfig,
testExpectationsPath.value()))
{
......
......@@ -7,7 +7,7 @@
#ifndef TEST_EXPECTATIONS_GPU_TEST_CONFIG_H_
#define TEST_EXPECTATIONS_GPU_TEST_CONFIG_H_
#include <array>
#include <common/bitset_utils.h>
namespace angle
{
......@@ -67,7 +67,7 @@ struct GPUTestConfig
kNumberOfConditions,
};
typedef std::array<bool, GPUTestConfig::kNumberOfConditions> ConditionArray;
using ConditionArray = angle::BitSet<GPUTestConfig::kNumberOfConditions>;
GPUTestConfig();
GPUTestConfig(const API &api);
......
......@@ -268,6 +268,27 @@ inline bool NamesMatching(const char *ref, const char *testName)
} // anonymous namespace
const char *GetConditionName(uint32_t condition)
{
if (condition == GPUTestConfig::kConditionNone)
{
return nullptr;
}
for (const TokenInfo &info : kTokenData)
{
if (info.condition == condition)
{
// kConditionNone is used to tag tokens that aren't conditions, but this case has been
// handled above.
ASSERT(info.condition != GPUTestConfig::kConditionNone);
return info.name;
}
}
return nullptr;
}
GPUTestExpectationsParser::GPUTestExpectationsParser()
{
// Some sanity check.
......
......@@ -86,6 +86,8 @@ class GPUTestExpectationsParser
std::vector<std::string> mErrorMessages;
};
const char *GetConditionName(uint32_t condition);
} // namespace angle
#endif // TEST_EXPECTATIONS_GPU_TEST_EXPECTATIONS_PARSER_H_
......@@ -20,10 +20,7 @@ class GPUTestConfigTester : public GPUTestConfig
public:
GPUTestConfigTester()
{
for (bool &condition : mConditions)
{
condition = false;
}
mConditions.reset();
mConditions[GPUTestConfig::kConditionWin] = true;
mConditions[GPUTestConfig::kConditionNVIDIA] = true;
mConditions[GPUTestConfig::kConditionD3D11] = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment