cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync#!/bin/sh
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync## @file
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# VirtualBox Test Execution Service Architecture Wrapper for Solaris.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync#
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync#
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# Copyright (C) 2010-2014 Oracle Corporation
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync#
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# available from http://www.virtualbox.org. This file is free software;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# you can redistribute it and/or modify it under the terms of the GNU
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# General Public License (GPL) as published by the Free Software
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync#
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# The contents of this file may alternatively be used under the terms
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# of the Common Development and Distribution License Version 1.0
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# VirtualBox OSE distribution, in which case the provisions of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# CDDL are applicable instead of those of the GPL.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync#
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# You may elect to license modified versions of this file under the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# terms and conditions of either the GPL or the CDDL or both.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync#
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# 1. Change directory to the script directory (usually /opt/VBoxTest/).
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncset -x
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncMY_DIR=`dirname "$0"`
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsynccd "${MY_DIR}"
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# 2. Determine the architecture.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncMY_ARCH=`isainfo -k`
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsynccase "${MY_ARCH}" in
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync amd64)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync MY_ARCH=amd64
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ;;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync i386)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync MY_ARCH=x86
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ;;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync echo "vboxtxs.sh: Unsupported architecture '${MY_ARCH}' returned by isainfo -k." >&2
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync exit 2;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ;;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncesac
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# 3. Exec the service.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncexec "./${MY_ARCH}/TestExecService" \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync --cdrom="/cdrom/cdrom0/" \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync --scratch="/var/tmp/VBoxTest/" \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync --no-display-output \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync $*
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncexit 3;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync