From bfedbd32b233c073b66a76a635c6e1b655cf2018 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Wed, 25 Jan 2012 21:18:22 +0000 Subject: [PATCH] Avoid unnecessary rebuilds of main/test.c. main/test.c includes "asterisk/version.h", when it should include "asterisk/ast_version.h" instead (and it should use the ast_get_version() and ast_get_version_num() functions). This commit modifies it to extract the Asterisk version information using the proper APIs, and as a result means that main/test.c no longer needs to be rebuilt when a Subversion checkout is updated or modified. ........ Merged revisions 352612 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@352616 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main/test.c b/main/test.c index 741c0f5404..07ddc4d786 100644 --- a/main/test.c +++ b/main/test.c @@ -38,7 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$"); #include "asterisk/utils.h" #include "asterisk/cli.h" #include "asterisk/term.h" -#include "asterisk/version.h" +#include "asterisk/ast_version.h" #include "asterisk/paths.h" #include "asterisk/time.h" #include "asterisk/manager.h" @@ -386,14 +386,14 @@ static int test_generate_results(const char *name, const char *category, const c last_results.total_time / 1000, last_results.total_time % 1000, last_results.total_tests); fprintf(f_xml, "\t\n"); - fprintf(f_xml, "\t\t\n", ASTERISK_VERSION); + fprintf(f_xml, "\t\t\n", ast_get_version()); fprintf(f_xml, "\t\n"); } /* txt header information */ if (f_txt) { - fprintf(f_txt, "Asterisk Version: %s\n", ASTERISK_VERSION); - fprintf(f_txt, "Asterisk Version Number: %d\n", ASTERISK_VERSION_NUM); + fprintf(f_txt, "Asterisk Version: %s\n", ast_get_version()); + fprintf(f_txt, "Asterisk Version Number: %s\n", ast_get_version_num()); fprintf(f_txt, "Number of Tests: %d\n", last_results.total_tests); fprintf(f_txt, "Number of Tests Executed: %d\n", (last_results.total_passed + last_results.total_failed)); fprintf(f_txt, "Passed Tests: %d\n", last_results.total_passed);