[asterisk-commits] kpfleming: branch 1.8 r352612 - /branches/1.8/main/test.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 25 15:16:57 CST 2012
Author: kpfleming
Date: Wed Jan 25 15:16:54 2012
New Revision: 352612
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=352612
Log:
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.
Modified:
branches/1.8/main/test.c
Modified: branches/1.8/main/test.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/test.c?view=diff&rev=352612&r1=352611&r2=352612
==============================================================================
--- branches/1.8/main/test.c (original)
+++ branches/1.8/main/test.c Wed Jan 25 15:16:54 2012
@@ -38,7 +38,7 @@
#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 @@
last_results.total_time / 1000, last_results.total_time % 1000,
last_results.total_tests);
fprintf(f_xml, "\t<properties>\n");
- fprintf(f_xml, "\t\t<property name=\"version\" value=\"%s\"/>\n", ASTERISK_VERSION);
+ fprintf(f_xml, "\t\t<property name=\"version\" value=\"%s\"/>\n", ast_get_version());
fprintf(f_xml, "\t</properties>\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);
More information about the asterisk-commits
mailing list