scripts/build/test_suite/gcc.sh
author Martin Lund <mgl@doredevelopment.dk>
Wed May 19 17:53:04 2010 +0200 (2010-05-19)
changeset 1965 e3d532dd8b5d
child 1966 10ad7f230f4b
permissions -rw-r--r--
test-suite: Added new test suite feature (experimental)

This patch adds support for installing the gcc test suite. A helper
Makefile is provided for building and running the gcc tests.

The default configuration runs all gcc tests and requires automatic
ssh/scp login access to a networked target board. See README for
more details.

Note: Current feature is tested with the powerpc-unknown-linux-gnu
sample but it should work with others as well.

Signed-off-by: Martin Lund <mgl@doredevelopment.dk>
     1 # This file adds the functions to build the GCC test suite
     2 # Copyright 2010 DoréDevelopment
     3 # Created by Martin Lund <mgl@doredevelopment.dk>
     4 # Licensed under the GPL v2. See COPYING in the root of this package
     5 
     6 do_test_suite_gcc_get() { :; }
     7 do_test_suite_gcc_extract() { :; }
     8 do_test_suite_gcc_build() { :; }
     9 
    10 # Overide functions depending on configuration
    11 if [ "${CT_TEST_SUITE_GCC}" = "y" ]; then
    12 
    13 do_test_suite_gcc_build() {
    14  
    15     CT_DoStep INFO "Installing GCC test suite"
    16 
    17     CT_DoExecLog ALL mkdir -p "${CT_TEST_SUITE_DIR}/gcc-test-suite/gcc-${CT_CC_VERSION}/gcc"
    18     CT_DoExecLog ALL cp "${CT_TOP_DIR}/contrib/gcc-test-suite/Makefile" \
    19                         "${CT_TEST_SUITE_DIR}/gcc-test-suite"
    20     CT_DoExecLog ALL cp "${CT_TOP_DIR}/contrib/gcc-test-suite/default.cfg" \
    21                         "${CT_TEST_SUITE_DIR}/gcc-test-suite"
    22     CT_DoExecLog ALL cp "${CT_TOP_DIR}/contrib/gcc-test-suite/README" \
    23                         "${CT_TEST_SUITE_DIR}/gcc-test-suite"
    24     CT_DoExecLog ALL cp -r "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/testsuite" \
    25                            "${CT_TEST_SUITE_DIR}/gcc-test-suite/gcc-${CT_CC_VERSION}/gcc"
    26     sed "s/DG_GCC_VERSION .*/DG_GCC_VERSION = ${CT_CC_VERSION}/g" \
    27         ${CT_TEST_SUITE_DIR}/gcc-test-suite/default.cfg > \
    28         ${CT_TEST_SUITE_DIR}/gcc-test-suite/default.cfg.tmp
    29     sed "s/DG_TARGET .*/DG_TARGET = ${CT_TARGET}/g" \
    30         ${CT_TEST_SUITE_DIR}/gcc-test-suite/default.cfg.tmp > \
    31         ${CT_TEST_SUITE_DIR}/gcc-test-suite/default.cfg
    32     CT_DoExecLog ALL rm -f "${CT_TEST_SUITE_DIR}/gcc-test-suite/default.cfg.tmp"
    33     CT_EndStep
    34 }
    35 
    36 fi # CT_TEST_SUITE_GCC