From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13071 invoked by alias); 17 Feb 2011 16:53:43 -0000 Received: (qmail 13058 invoked by uid 22791); 17 Feb 2011 16:53:41 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Feb 2011 16:53:36 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Pq76k-0004oL-Hv from Peter_Watkins@mentor.com for gcc-help@gcc.gnu.org; Thu, 17 Feb 2011 08:53:34 -0800 Received: from na3-mail.mgc.mentorg.com ([147.34.99.66]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 17 Feb 2011 08:53:34 -0800 Received: from [147.34.41.113] ([147.34.41.113]) by na3-mail.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Feb 2011 08:53:34 -0800 Message-ID: <4D5D5261.5070208@mentor.com> Date: Thu, 17 Feb 2011 17:17:00 -0000 From: Peter Watkins User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Reducing testcase sets using GCC Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg00263.txt.bz2 Our company has a suite of testcases we run before checking in code. We'd like to reduce the number of tescases we have to run by running only the testcases affected by the source code changes the developer made. We have code coverage data for each testcase in the form of functions covered. i.e. each testcase knows which C++ functions in our product get called when the testcase executes. I'm trying to determine which functions got changed in our product based on the changes a developer made to the source code. So given foo-new.cxx and foo-old.cxx, I'd like to know which functions are different between these two. Presently I'm planning on comparing pre-processed copies of the two version. i.e. diff foo-new.i foo-old.i. Then from the diff, I'll try to determine which functions are changed. However I'm not familiar with GCC's plethora of options and debug outputs. Does GCC provide an easy way of telling if a function or symbol changed between two versions of a source file? Has anyone else faced the problem of reducing a set of testcases given a set of source code changes? How did you solve the problem? Thanks, Peter