| 1 |
1931 |
hjz |
|
| 2 |
976 |
jianian |
#################################################################
|
| 3 |
|
|
# Entry for the dejagnu testing framework
|
| 4 |
|
|
# dejagnu will first try to load this file
|
| 5 |
|
|
# In this file, we try to set the configuration globally and
|
| 6 |
|
|
# some global variables.
|
| 7 |
|
|
#################################################################
|
| 8 |
|
|
# Configuration we are going to use
|
| 9 |
1931 |
hjz |
set conf open64-O2
|
| 10 |
976 |
jianian |
|
| 11 |
|
|
# Today's date in YYYY-MM-DD format
|
| 12 |
1931 |
hjz |
#set date [clock format [clock scan [system date]] -format "%Y-%m-%d"]
|
| 13 |
|
|
set date [exec date +%F]
|
| 14 |
976 |
jianian |
|
| 15 |
|
|
# Home for the test framework
|
| 16 |
1931 |
hjz |
if {[info exists env(DEJAGNU)]} {
|
| 17 |
|
|
set testhome [split $env(DEJAGNU) /]
|
| 18 |
|
|
set len [expr [llength $testhome] - 1]
|
| 19 |
|
|
set testhome [join [lreplace $testhome $len $len] /]
|
| 20 |
|
|
} else {
|
| 21 |
|
|
set testhome [pwd]
|
| 22 |
|
|
set dejagnu $testhome
|
| 23 |
|
|
append dejagnu "/site.exp"
|
| 24 |
|
|
if {[file exists $dejagnu]} {
|
| 25 |
|
|
set env(DEJAGNU) $dejagnu
|
| 26 |
|
|
} else {
|
| 27 |
|
|
puts ""
|
| 28 |
|
|
puts "******Error:DEJAGNU variable is empty and site.exp doesn't exist in current directory!!"
|
| 29 |
|
|
puts "Please set DEJAGNU to point to your site.exp file"
|
| 30 |
|
|
puts ""
|
| 31 |
|
|
exit
|
| 32 |
|
|
}
|
| 33 |
|
|
}
|
| 34 |
976 |
jianian |
|
| 35 |
1931 |
hjz |
# check for TOOLROOT and COMP_TARGET_ROOT
|
| 36 |
|
|
#if {![info exists env(TOOLROOT)]} {
|
| 37 |
|
|
# puts "******Error: TOOLROOT is not set."
|
| 38 |
|
|
# exit
|
| 39 |
|
|
#} elseif {![file isdirectory $env(TOOLROOT)]} {
|
| 40 |
|
|
# puts "******Error: TOOLROOT directory $env(TOOLROOT) doesn't exist."
|
| 41 |
|
|
# exit
|
| 42 |
|
|
#}
|
| 43 |
|
|
#if {![info exists env(COMP_TARGET_ROOT)]} {
|
| 44 |
|
|
# puts "******Error: COMP_TARGET_ROOT is not set."
|
| 45 |
|
|
#} elseif {![file isdirectory $env(COMP_TARGET_ROOT)]} {
|
| 46 |
|
|
# puts "******Error: COMP_TARGET_ROOT directory $env(COMP_TARGET_ROOT) doesn't exist."
|
| 47 |
|
|
#}
|
| 48 |
|
|
|
| 49 |
976 |
jianian |
# the dir for storing log files
|
| 50 |
1931 |
hjz |
set logdir $testhome/log/$date/
|
| 51 |
976 |
jianian |
|
| 52 |
|
|
# the dir for storing historical data
|
| 53 |
|
|
set datdir $testhome/dat
|
| 54 |
|
|
|
| 55 |
|
|
# the dir for storing configuration files
|
| 56 |
|
|
set confdir $testhome/conf
|
| 57 |
|
|
|
| 58 |
|
|
# the output for the test cases
|
| 59 |
|
|
set testoutput $testhome/output/$date
|
| 60 |
|
|
|
| 61 |
|
|
# log file for putting compiler update/building
|
| 62 |
|
|
set compiler_build_log $logdir/compiler-build.log
|
| 63 |
|
|
set check_in_log $logdir/checkin.log
|
| 64 |
|
|
|
| 65 |
1931 |
hjz |
set lib_build_log $logdir/lib-build.log
|
| 66 |
|
|
set lib_check_in_log $logdir/lib-checkin.log
|
| 67 |
976 |
jianian |
|
| 68 |
1931 |
hjz |
set cc {}
|
| 69 |
|
|
set cxx {}
|
| 70 |
|
|
set fc {}
|
| 71 |
|
|
set cflags {}
|
| 72 |
|
|
set cxxflags {}
|
| 73 |
|
|
set fflags {}
|
| 74 |
|
|
set sim {}
|
| 75 |
|
|
set comp_home {}
|
| 76 |
|
|
set sim_home {}
|
| 77 |
|
|
set lib_home {}
|
| 78 |
1943 |
hjz |
set platform [exec uname -m | sed -e s/i.86/i386/]
|
| 79 |
1931 |
hjz |
#set maximum timeout 2 minutes
|
| 80 |
|
|
set max_timeout 120
|
| 81 |
|
|
|
| 82 |
|
|
#ignore these directories
|
| 83 |
|
|
set ignoredirs [list "conf" "dat" "doc" "log" "output"]
|
| 84 |
|
|
|
| 85 |
|
|
set smoking_test_list ""
|
| 86 |
|
|
lappend smoking_test_list "sl1/fsim/fsim_sl1.exp"
|
| 87 |
|
|
lappend smoking_test_list "sl1/compiler/compiler_sl1.exp"
|
| 88 |
|
|
lappend smoking_test_list "sl1/cpp/cpp_sl1.exp"
|
| 89 |
|
|
lappend smoking_test_list "sl2/fsim/fsim_sl2.exp"
|
| 90 |
|
|
lappend smoking_test_list "sl2/compiler/compiler_sl2.exp"
|
| 91 |
|
|
lappend smoking_test_list "sl2/libtest/libtest_sl2.exp"
|
| 92 |
|
|
|
| 93 |
|
|
# cases listed in pre_test_cases will be run orderly before others
|
| 94 |
|
|
# musted be relative path
|
| 95 |
|
|
set pre_test_list ""
|
| 96 |
|
|
lappend pre_test_list "build_tool/build_tool.exp"
|
| 97 |
|
|
|
| 98 |
976 |
jianian |
system mkdir -p $logdir
|
| 99 |
|
|
system mkdir -p $testoutput
|
| 100 |
|
|
|