Changeset 255695 in webkit


Ignore:
Timestamp:
Feb 4, 2020 2:05:35 PM (4 years ago)
Author:
Jonathan Bedard
Message:

TestWebKitAPI: Handle case where test result does not contain path
https://bugs.webkit.org/show_bug.cgi?id=207216

Reviewed by Tim Horton.

  • TestWebKitAPI/TestsController.cpp:

(TestWebKitAPI::Printer::OnTestPartResult): It's possible that the TestPartResult
will not contain a file name. We should handle this case.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r255694 r255695  
     12020-02-04  Jonathan Bedard  <jbedard@apple.com>
     2
     3        TestWebKitAPI: Handle case where test result does not contain path
     4        https://bugs.webkit.org/show_bug.cgi?id=207216
     5
     6        Reviewed by Tim Horton.
     7
     8        * TestWebKitAPI/TestsController.cpp:
     9        (TestWebKitAPI::Printer::OnTestPartResult): It's possible that the TestPartResult
     10        will not contain a file name. We should handle this case.
     11
    1122020-02-04  Jonathan Bedard  <jbedard@apple.com>
    213
  • trunk/Tools/TestWebKitAPI/TestsController.cpp

    r246490 r255695  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4141
    4242        std::stringstream stream;
    43         stream << "\n" << test_part_result.file_name() << ":" << test_part_result.line_number() << "\n" << test_part_result.summary() << "\n\n";
     43        stream << "\n";
     44        if (test_part_result.file_name())
     45            stream << test_part_result.file_name() << ":" << test_part_result.line_number();
     46        else
     47            stream << "File name unavailable";
     48        stream << "\n" << test_part_result.summary() << "\n\n";
    4449        failures += stream.str();
    4550    }
Note: See TracChangeset for help on using the changeset viewer.