OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [run-all-tests.sh] - Diff between revs 550 and 553

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 550 Rev 553
Line 130... Line 130...
    close_mess=$5
    close_mess=$5
 
 
    expect -f - <<EOF > /dev/null 2>&1
    expect -f - <<EOF > /dev/null 2>&1
    spawn "${command}"
    spawn "${command}"
 
 
    set timeout 2
    set timeout 30
    expect {
    expect {
        "${command}> " {}
        "${command}> " {}
        timeout    {exit 1}
        timeout    {exit 1}
    }
    }
 
 
    send "open ${ip}\n"
    send "open ${ip}\n"
 
 
    set timeout 5
 
    expect {
    expect {
        -re "${conn_prompt}" {}
        -re "${conn_prompt}" {}
        timeout   {exit 2}
        timeout   {exit 2}
    }
    }
 
 
    send "root\n"
    send "root\n"
 
 
    set timeout 2
 
    expect {
    expect {
        -re "${op_prompt}" {}
        -re "${op_prompt}" {}
        timeout   {exit 3}
        timeout   {exit 3}
    }
    }
 
 
    send "exit\n"
    send "exit\n"
 
 
    set timeout 5
 
    expect {
    expect {
        -re "${close_mess}" {exit 0}
        -re "${close_mess}" {exit 0}
        timeout {exit 4}
        timeout {exit 4}
    }
    }
EOF
EOF
Line 265... Line 262...
    sed -e 's/\r//g' < ${res_dir}/${tool}.sum > ${tool}/${sum_file}
    sed -e 's/\r//g' < ${res_dir}/${tool}.sum > ${tool}/${sum_file}
    rm -rf ${res_dir}
    rm -rf ${res_dir}
 
 
    # If the telnet or FTP to the IP address is dead, we assume the test
    # If the telnet or FTP to the IP address is dead, we assume the test
    # failed, the target machine having died (at last partially), so we return
    # failed, the target machine having died (at last partially), so we return
    # failure.
    # failure having blown away that IP address.
 
 
 
    # We also need to fail if we see any TCL or expect error messages (with
 
    # the string "ERROR: ". These are indicative of transient failures.
    ip=`sed < ${tool}/${log_file} -n -e 's/OR32 target hostname is //p'`
    ip=`sed < ${tool}/${log_file} -n -e 's/OR32 target hostname is //p'`
    if check_telnet_ftp ${ip}
    if check_telnet_ftp ${ip}
    then
    then
 
        if grep "ERROR: " ${tool}/${log_file} > /dev/null 2>&1
 
        then
 
            echo "Running ${test_file} on ${ip} hit TCL/expect failure"
 
            mv ${tool}/${log_file} ${tool}/${log_file}-failed-$$-${index}
 
            mv ${tool}/${sum_file} ${tool}/${sum_file}-failed-$$-${index}
 
            res=1
 
        else
        echo "Running ${test_file} on ${ip} completed successfully"
        echo "Running ${test_file} on ${ip} completed successfully"
        res=0
        res=0
 
        fi
    else
    else
        echo "Running ${test_file} on ${ip} died"
        echo "Running ${test_file} on ${ip} died with code $?"
        mv ${tool}/${log_file} ${tool}/${log_file}-failed-$$-${index}
        mv ${tool}/${log_file} ${tool}/${log_file}-failed-$$-${index}
        mv ${tool}/${sum_file} ${tool}/${sum_file}-failed-$$-${index}
        mv ${tool}/${sum_file} ${tool}/${sum_file}-failed-$$-${index}
        ${root_dir}/get-ip.sh --delete ${ip}
        ${root_dir}/get-ip.sh --delete ${ip}
        res=1
        res=1
    fi
    fi
Line 331... Line 339...
    src_dir=$1
    src_dir=$1
    shift
    shift
    tool=$1
    tool=$1
    shift
    shift
 
 
 
    # If we have no IP addresses, give up here.
 
    if ${root_dir}/get-ip.sh > /dev/null 2>&1
 
    then
 
        true
 
    else
 
        echo "No IP addresses - exiting"
 
        exit 1
 
    fi
 
 
    # Create the local config file for DejaGnu
    # Create the local config file for DejaGnu
    create_local_config ${test_dir}
    create_local_config ${test_dir}
 
 
    for t in $*
    for t in $*
    do
    do
Line 345... Line 362...
        done
        done
 
 
        # Run the test in the background
        # Run the test in the background
        (
        (
            index=1
            index=1
 
 
            until run_test_block ${test_dir} ${src_dir} ${tool} ${t} ${index}
            until run_test_block ${test_dir} ${src_dir} ${tool} ${t} ${index}
            do
            do
 
                # Give up if there are no more IP addresses.
 
                if ${root_dir}/get-ip.sh > /dev/null 2>&1
 
                then
 
                    continue
 
                else
 
                    break
 
                fi
                index=$(( ${index} + 1 ))
                index=$(( ${index} + 1 ))
            done
            done
 
 
            inc_count
            inc_count
        ) &
        ) &
 
 
 
        # If we have exhausted all the IP addresses, give up here.
 
        if ${root_dir}/get-ip.sh > /dev/null 2>&1
 
        then
 
            true
 
        else
 
            echo "Out of IP addresses - exiting"
 
            exit 1
 
        fi
    done
    done
}
}
 
 
 
 
# Initalize all the global variables.
# Initalize all the global variables.
Line 578... Line 612...
               conformance-18#conformance.exp=${conf18_list} \
               conformance-18#conformance.exp=${conf18_list} \
               conformance-19#conformance.exp=${conf19_list} \
               conformance-19#conformance.exp=${conf19_list} \
               conformance-20#conformance.exp=${conf20_list} \
               conformance-20#conformance.exp=${conf20_list} \
               conformance-21#conformance.exp=${conf21_list}"
               conformance-21#conformance.exp=${conf21_list}"
 
 
 
 
run_tool_tests ${gcc_test_dir} ${gcc_src_dir} "gcc" ${gcc_test_list}
run_tool_tests ${gcc_test_dir} ${gcc_src_dir} "gcc" ${gcc_test_list}
run_tool_tests ${gcc_test_dir} ${gcc_src_dir} "g++" ${gpp_test_list}
run_tool_tests ${gcc_test_dir} ${gcc_src_dir} "g++" ${gpp_test_list}
run_tool_tests ${lib_test_dir} ${lib_src_dir} "libstdc++" ${lib_test_list}
run_tool_tests ${lib_test_dir} ${lib_src_dir} "libstdc++" ${lib_test_list}
 
 
# Wait for all the tests to finish
# Wait for all the tests to finish

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.