Add log for unexpected success in negative tests
authorJames Helferty <jhelferty@nvidia.com>
Thu, 1 Jun 2017 16:20:27 +0000 (12:20 -0400)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 6 Jun 2017 08:41:03 +0000 (04:41 -0400)
This adds logging of shader source whenever one of the affected
negative enhanced layout tests unpexpectedly succeeds.

VK-GL-CTS issue: 460

Components: OpenGL

Affects:

KHR-GL45.enhanced_layouts.glsl_contant_immutablity
KHR-GL45.enhanced_layouts.uniform_block_layout_qualifier_conflict
KHR-GL45.enhanced_layouts.uniform_block_member_invalid_offset_alignment
KHR-GL45.enhanced_layouts.uniform_block_member_overlapping_offsets
KHR-GL45.enhanced_layouts.uniform_block_member_align_non_power_of_2
KHR-GL45.enhanced_layouts.ssb_layout_qualifier_conflict
KHR-GL45.enhanced_layouts.varying_structure_member_location
KHR-GL45.enhanced_layouts.varying_block_member_locations
KHR-GL45.enhanced_layouts.varying_block_automatic_member_locations
KHR-GL45.enhanced_layouts.varying_location_limit
KHR-GL45.enhanced_layouts.varying_exceeding_components
KHR-GL45.enhanced_layouts.varying_component_without_location
KHR-GL45.enhanced_layouts.varying_component_of_invalid_type
KHR-GL45.enhanced_layouts.input_component_aliasing
KHR-GL45.enhanced_layouts.output_component_aliasing
KHR-GL45.enhanced_layouts.varying_location_aliasing_with_mixed_types
KHR-GL45.enhanced_layouts.varying_location_aliasing_with_mixed_interpolation
KHR-GL45.enhanced_layouts.varying_location_aliasing_with_mixed_auxiliary_storage
KHR-GL45.enhanced_layouts.xfb_input
KHR-GL45.enhanced_layouts.xfb_too_small_stride
KHR-GL45.enhanced_layouts.xfb_variable_stride
KHR-GL45.enhanced_layouts.xfb_duplicated_stride
KHR-GL45.enhanced_layouts.xfb_multiple_vertex_streams
KHR-GL45.enhanced_layouts.xfb_exceed_buffer_limit
KHR-GL45.enhanced_layouts.xfb_exceed_offset_limit
KHR-GL45.enhanced_layouts.xfb_block_member_buffer
KHR-GL45.enhanced_layouts.xfb_output_overlapping
KHR-GL45.enhanced_layouts.xfb_invalid_offset_alignment
KHR-GL45.enhanced_layouts.xfb_capture_unsized_array

(and any GL44 equivalents)

Change-Id: Ie8e93c73e43828322a0860cc4820b72a9fb1f8d3

external/openglcts/modules/gl/gl4cEnhancedLayoutsTests.cpp

index 46a7da5..2abae5b 100644 (file)
@@ -6140,6 +6140,12 @@ bool NegativeTestBase::testCase(GLuint test_case_index)
 
                if (is_build_error != is_failure_expected)
                {
+                       if (!is_build_error)
+                       {
+                               m_context.getTestContext().getLog()
+                                       << tcu::TestLog::Message << "Unexpected success: " << tcu::TestLog::EndMessage;
+                               Utils::Shader::LogSource(m_context, cs_source, Utils::Shader::COMPUTE);
+                       }
                        test_case_result = false;
                }
        }
@@ -6207,6 +6213,16 @@ bool NegativeTestBase::testCase(GLuint test_case_index)
 
                if (is_build_error != is_failure_expected)
                {
+                       if (!is_build_error)
+                       {
+                               m_context.getTestContext().getLog()
+                                       << tcu::TestLog::Message << "Unexpected success: " << tcu::TestLog::EndMessage;
+                               Utils::Shader::LogSource(m_context, vs_source, Utils::Shader::VERTEX);
+                               Utils::Shader::LogSource(m_context, tcs_source, Utils::Shader::TESS_CTRL);
+                               Utils::Shader::LogSource(m_context, tes_source, Utils::Shader::TESS_EVAL);
+                               Utils::Shader::LogSource(m_context, gs_source, Utils::Shader::GEOMETRY);
+                               Utils::Shader::LogSource(m_context, fs_source, Utils::Shader::FRAGMENT);
+                       }
                        test_case_result = false;
                }
        }