From 625de446907e8720f0114422683b78a898dd6878 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Mon, 8 Jan 2018 14:56:37 -0500 Subject: Make api_check.py warning more informative about what needs to be fixed. Currently the warning does not mention that fpdfview_c_api_test.c needs to be updated, and someone unfamiliar with the code needs to ask of dig into the warning script to find what went wrong. Change-Id: I56848438959ec64b0eab978d2e3638d4d4dc8e49 Reviewed-on: https://pdfium-review.googlesource.com/22430 Commit-Queue: Henrique Nakashima Reviewed-by: Lei Zhang --- testing/tools/api_check.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/testing/tools/api_check.py b/testing/tools/api_check.py index 29754e4b56..ee769bcda5 100755 --- a/testing/tools/api_check.py +++ b/testing/tools/api_check.py @@ -101,7 +101,8 @@ def main(): src_path = os.path.dirname(os.path.dirname(os.path.dirname(script_abspath))) public_functions = _GetFunctionsFromPublicHeaders(src_path) - api_test_path = os.path.join(src_path, 'fpdfsdk', 'fpdfview_c_api_test.c') + api_test_relative_path = os.path.join('fpdfsdk', 'fpdfview_c_api_test.c') + api_test_path = os.path.join(src_path, api_test_relative_path) test_functions = _GetFunctionsFromTest(api_test_path) result = True @@ -124,7 +125,13 @@ def main(): check = _CheckAndPrintFailures(non_existent, 'Tested functions do not exist') result = result and check - return 0 if result else 1 + if not result: + print ('Some checks failed. Make sure %s is in sync with the public API ' + 'headers.' + % api_test_relative_path); + return 1 + + return 0 if __name__ == '__main__': -- cgit v1.2.3