From 475611069560540caa5453b44691525f26e2fb3b Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 16 Jun 2009 16:13:25 +0200 Subject: Add GCC version to testsuite run output and systemtap.sum file. Prints the gcc being used and full version. Also adds short version number to systemtap.sum file (plus full version string). Will make comparing failures based on compiler version being used easier. * testsuite/lib/systemtap.exp (print_systemtap_version): Also print location and full version of gcc being used. (get_system_info): Get gcc version number and long version string. * testsuite/lib/stap_run.exp (print_system_info): Output GCC version. --- testsuite/lib/systemtap.exp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'testsuite/lib/systemtap.exp') diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index 379f6c58..3cd7a6ea 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -43,6 +43,12 @@ proc print_systemtap_version {} { print "systemtap location: $location" print "systemtap version: $version" + + set location [exec /usr/bin/which gcc] + set version [exec gcc --version | head -1] + + print "gcc location: $location" + print "gcc version: $version" } @@ -152,7 +158,7 @@ proc shutdown_server {} { } proc get_system_info {} { - global Host Snapshot Distro env + global Host Snapshot Distro GCC_Version env set Host [exec /bin/uname -a] if [file exists ../SNAPSHOT] { @@ -173,6 +179,12 @@ proc get_system_info {} { if [file exists $f] then {set Distro [exec /bin/cat $f]; break } } } + # Easily parsable version first major minor patch level + set n [exec echo "__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__" | cpp -P] + set n [string map {" " "."} $n] + # Plus full version between square brackets. + set full [exec gcc --version | head -1] + set GCC_Version "$n \[$full\]" } if {! [setup_systemtap_environment]} then { -- cgit From 8e02c67338ae99f487d736ad4a5f19b9065b1453 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 16 Jun 2009 16:28:28 +0200 Subject: Strip out newlines in GCC version string. * testsuite/lib/systemtap.exp (get_system_info): Remove possible newlines from GCC_Version string. --- testsuite/lib/systemtap.exp | 1 + 1 file changed, 1 insertion(+) (limited to 'testsuite/lib/systemtap.exp') diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp index 3cd7a6ea..e04fe837 100644 --- a/testsuite/lib/systemtap.exp +++ b/testsuite/lib/systemtap.exp @@ -182,6 +182,7 @@ proc get_system_info {} { # Easily parsable version first major minor patch level set n [exec echo "__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__" | cpp -P] set n [string map {" " "."} $n] + set n [string map {"\n" ""} $n] # Plus full version between square brackets. set full [exec gcc --version | head -1] set GCC_Version "$n \[$full\]" -- cgit