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