platform_GCC: delete old test am: 73e7f48ca2 am: 33d47993c2
Change-Id: I0aca20aa2b84b578c536ebd29c70841e13e214a9
diff --git a/server/site_tests/platform_GCC/boards/chromeos-machine.exp b/server/site_tests/platform_GCC/boards/chromeos-machine.exp
deleted file mode 100644
index 572aaea..0000000
--- a/server/site_tests/platform_GCC/boards/chromeos-machine.exp
+++ /dev/null
@@ -1,10 +0,0 @@
-load_base_board_description "unix"
-
-# Set hostname and username. # Make sure SSH keys are set up prior to run.
-set_board_info hostname $env(DEJAGNU_HOSTNAME)
-set_board_info username root
-
-set_board_info shell_prompt "dejagnu>"
-set_board_info rsh_prog "$env(DEJAGNU_SCRIPTS)/dejagnu_ssh"
-set_board_info rcp_prog "$env(DEJAGNU_SCRIPTS)/dejagnu_scp"
-
diff --git a/server/site_tests/platform_GCC/control b/server/site_tests/platform_GCC/control
deleted file mode 100644
index 124f331..0000000
--- a/server/site_tests/platform_GCC/control
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-AUTHOR = "Chrome OS Team"
-NAME = "GCC"
-TIME = "LONG"
-TEST_CATEGORY = "Functional"
-TEST_CLASS = "platform"
-TEST_TYPE = "server"
-
-DOC = """
-This test runs the GCC test suite which uses the DejaGNU unittest framework. This test requires that DejaGNU be installed and that setup_board is run with FEATURES=noclean so that the toolchain files are available for testing.
-"""
-
-def run_server_tests(machine):
- client = hosts.create_host(machine)
- job.run_test("platform_GCC", host=client, args=args)
-
-job.parallel_on_machines(run_server_tests, machines)
diff --git a/server/site_tests/platform_GCC/dejagnu_cleanup_remote b/server/site_tests/platform_GCC/dejagnu_cleanup_remote
deleted file mode 100755
index 10644d0..0000000
--- a/server/site_tests/platform_GCC/dejagnu_cleanup_remote
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-. "$(dirname $(readlink -f $0))/dejagnu_remote.sh"
-dejagnu_cleanup_remote
diff --git a/server/site_tests/platform_GCC/dejagnu_init_remote b/server/site_tests/platform_GCC/dejagnu_init_remote
deleted file mode 100755
index 8d3b3ca..0000000
--- a/server/site_tests/platform_GCC/dejagnu_init_remote
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-. "$(dirname $(readlink -f $0))/dejagnu_remote.sh"
-dejagnu_init_remote "$1"
diff --git a/server/site_tests/platform_GCC/dejagnu_remote.sh b/server/site_tests/platform_GCC/dejagnu_remote.sh
deleted file mode 100644
index 4f90e6a..0000000
--- a/server/site_tests/platform_GCC/dejagnu_remote.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-find_common_sh() {
- local common_paths=(/usr/lib/crosutils $(dirname "$0"))
- local path
-
- SCRIPT_ROOT=
- for path in "${common_paths[@]}"; do
- local common="${path}/common.sh"
- if ([ -r "${common}" ] && . "${common}" && [ -d "${SCRIPTS_DIR}" ]); then
- SCRIPT_ROOT="${path}"
- break
- fi
- done
-}
-find_common_sh
-. "${SCRIPT_ROOT}/common.sh" || ! echo "Unable to load common.sh" || exit 1
-
-DEFAULT_PRIVATE_KEY="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts/\
-ssh_keys/testing_rsa"
-
-TMP="/tmp/dejagnu-tests/"
-TMP_PRIVATE_KEY=${TMP}/private_key
-TMP_KNOWN_HOSTS=${TMP}/known_hosts
-CONTROL_PATH="${TMP}/%r@%h:%p"
-SSH_ARGS="-p22 -o StrictHostKeyChecking=no \
- -o UserKnownHostsFile=${TMP_KNOWN_HOSTS} -i ${TMP_PRIVATE_KEY}"
-
-dejagnu_init_remote() {
- mkdir -p ${TMP}
- cp ${DEFAULT_PRIVATE_KEY} ${TMP_PRIVATE_KEY}
- chmod 0400 ${TMP_PRIVATE_KEY}
- PS1=. TERM=linux ssh ${SSH_ARGS} -t -t -M -S "${CONTROL_PATH}" root@$1 \
- >/dev/null 2>&1 &
- echo $! > "${TMP}/master-pid"
- dejagnu_ssh root@$1 -- "echo Connection OK."
-}
-
-dejagnu_cleanup_remote() {
- set +e
- kill "$(cat ${TMP}/master-pid)"
- set -e
- rm -rf "${TMP}"
-}
-
-dejagnu_ssh() {
- COMMAND="ssh ${SSH_ARGS} -t -o ControlPath=${CONTROL_PATH} $@"
- # TODO(raymes): Remove this timeout hack once our tests run without
- # infinite loops.
- TIMEOUT_COMMAND="$(echo "$COMMAND" | sed "s/sh -c '/sh -c 'timeout 5 /g")"
- $TIMEOUT_COMMAND
-}
-
-dejagnu_scp() {
- scp ${SSH_ARGS} -o ControlPath="${CONTROL_PATH}" $@
-}
diff --git a/server/site_tests/platform_GCC/dejagnu_scp b/server/site_tests/platform_GCC/dejagnu_scp
deleted file mode 100755
index faf661e..0000000
--- a/server/site_tests/platform_GCC/dejagnu_scp
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-. "$(dirname $(readlink -f $0))/dejagnu_remote.sh"
-dejagnu_scp $@
diff --git a/server/site_tests/platform_GCC/dejagnu_ssh b/server/site_tests/platform_GCC/dejagnu_ssh
deleted file mode 100755
index 79fc0b8..0000000
--- a/server/site_tests/platform_GCC/dejagnu_ssh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-. "$(dirname $(readlink -f $0))/dejagnu_remote.sh"
-dejagnu_ssh $@
diff --git a/server/site_tests/platform_GCC/platform_GCC.py b/server/site_tests/platform_GCC/platform_GCC.py
deleted file mode 100644
index 0fc22d7..0000000
--- a/server/site_tests/platform_GCC/platform_GCC.py
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import glob, logging, os, shutil
-from autotest_lib.client.common_lib import error
-from autotest_lib.server import test, utils
-from optparse import OptionParser
-
-class platform_GCC(test.test):
- """Class for running the GCC dejagnu tests."""
- version = 1
- results = {}
-
- TEST_STATUSES = ('PASS', 'FAIL', 'UNRESOLVED', 'UNTESTED', 'UNSUPPORTED',
- 'XFAIL', 'KFAIL', 'XPASS', 'KPASS')
- TARBALL = '/usr/local/dejagnu/gcc/tests.tar.gz'
-
- def parse_log(self, log):
- results = {}
- counts = {}
- log_file = open(log, 'rb')
- for line in log_file:
- if line.startswith(self.TEST_STATUSES):
- result, testname = line.split(': ', 1)
- testname = testname.strip()
- if testname in results:
- counts[testname] += 1
- unique_testname = '%s (%d)' % (testname, counts[testname])
- else:
- counts[testname] = 1
- unique_testname = testname
- results[unique_testname] = result
- log_file.close()
- return results
-
-
- def compare_logs(self, baseline, new):
- baseline_results = self.parse_log(baseline)
- logging.info('%d results parsed in baseline (%s).' %
- (len(baseline_results), baseline))
- new_results = self.parse_log(new)
- logging.info('%d results parsed in new log (%s).' %
- (len(new_results), new))
-
- differences = []
- for testname in new_results.keys():
- if testname not in baseline_results:
- differences.append((testname, 'NOTEXECUTED',
- new_results[testname]))
- elif new_results[testname] != baseline_results[testname]:
- differences.append((testname, baseline_results[testname],
- new_results[testname]))
- for testname in baseline_results.keys():
- if testname not in new_results:
- differences.append((testname, baseline_results[testname],
- 'NOTEXECUTED'))
- return differences
-
-
- def run_once(self, host=None, args=[]):
- self.client = host
-
- parser = OptionParser()
- parser.add_option('--gcc_dir',
- dest='gcc_dir',
- default='/var/tmp/portage/cross-*/gcc-*/work/gcc-*build*',
- help='Path to the gcc build directory.')
- parser.add_option('--test_flags',
- dest='test_flags',
- default='',
- help='Options to pass to dejagnu.')
-
- options, args = parser.parse_args(args)
-
- utils.system('%s %s' %
- (os.path.join(self.bindir, 'dejagnu_init_remote'),
- self.client.ip))
-
- gcc_dirs = glob.glob(options.gcc_dir)
- if len(gcc_dirs) == 0:
- # If there is no directory present, try untarring the tarball
- # installed by the gcc package.
- logging.info('No gcc directory found, attempting to untar from %s'
- % self.TARBALL)
- os.chdir('/')
- os.system('tar -xzf %s' % self.TARBALL)
- gcc_dirs = glob.glob(options.gcc_dir)
- if len(gcc_dirs) == 0:
- raise error.TestFail('No gcc directory to test was found')
-
- gcc_dir = gcc_dirs[0]
-
- logging.info('Testing gcc in the following directory: %s' % gcc_dir)
- exp_file = os.path.join(self.bindir, 'site.exp')
- client_hostname = str(self.client.ip)
- test_flags = options.test_flags
- test_command = ('cd %s; DEJAGNU="%s" DEJAGNU_SCRIPTS=%s '
- 'DEJAGNU_HOSTNAME=%s make '
- 'RUNTESTFLAGS="%s" check-gcc' % (gcc_dir, exp_file,
- self.bindir, client_hostname, test_flags))
- utils.system(test_command)
-
- error_messages = []
- for log in ('gcc', 'g++'):
- log_from = os.path.join(gcc_dir, 'gcc/testsuite/%s/%s.log' %
- (log, log))
- log_to = os.path.join(self.resultsdir, '%s.log' % (log))
- shutil.copy(log_from, log_to)
-
- baseline = os.path.join(self.bindir, '%s.log' % (log))
-
- differences = self.compare_logs(baseline, log_to)
- for difference in differences:
- error_string = ('(%s) "%s" Expected: "%s" Actual: "%s"' %
- (log_to, difference[0],
- difference[1], difference[2]))
- error_messages.append(error_string)
- keyname = log.replace('+', 'p')
- self.results['%s_differences' % keyname] = len(differences)
-
- self.write_perf_keyval(self.results)
-
- if len(error_messages) != 0:
- raise error.TestFail('\n'.join(error_messages))
-
- def cleanup(self):
- utils.system(os.path.join(self.bindir, 'dejagnu_cleanup_remote'))
diff --git a/server/site_tests/platform_GCC/site.exp b/server/site_tests/platform_GCC/site.exp
deleted file mode 100644
index beaa958..0000000
--- a/server/site_tests/platform_GCC/site.exp
+++ /dev/null
@@ -1 +0,0 @@
-set target_list "chromeos-machine"