From 4e279f00914180bd6a6cd75b1c453d5acd6bfbe3 Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Wed, 13 Jan 2016 17:25:50 +0100 Subject: [PATCH] Add tct/build_tct.sh script to build Native TCT Change-Id: Ic37573ec68a408a0d3e9272dfe664dfb8e006e45 Signed-off-by: Aleksander Mistewicz --- tct/build_tct.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100755 tct/build_tct.sh diff --git a/tct/build_tct.sh b/tct/build_tct.sh new file mode 100755 index 0000000..3f59b82 --- /dev/null +++ b/tct/build_tct.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script takes up to three arguments, the syntax is: +# build_tct.sh $ARCH $NATIVE_TCT_REPO [$RESULTS] +# +# It will generate list of all available testsuites in NATIVE_TCT_REPO, +# compile them for ARCH one-by-one and copy produced zip files to RESULTS. +# If RESULTS argument is not given, it is set to ${TESTLAB_SCRIPTS}/native_tct/${ARCH}. +# +# Author: Aleksander Mistewicz + +ARCH="${1}" +NATIVE_TCT_REPO="${2}" +RESULTS="${3}" + +TESTLAB_SCRIPTS="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)" + +. "${TESTLAB_SCRIPTS}/common.sh" +. "${TESTLAB_SCRIPTS}/build/build.sh" + +test -n "${ARCH}" || die "Missing argument: arch" +test -n "${NATIVE_TCT_REPO}" || die "Missing argument: native_tct_repo" + +PACKAGES_PATH="/opt/tct/tizen_native_3.0/packages/" + +mkdir -p "${PACKAGES_PATH}/tv" +mkdir -p "${PACKAGES_PATH}/common" + +NATIVE_TCT_LIST_PATH="/tmp/${ARCH}-$(date +%M%S)" + +gen_list "${NATIVE_TCT_REPO}" "${NATIVE_TCT_LIST_PATH}" + +cd "${NATIVE_TCT_REPO}" + +while IFS= read LINE +do + ARCH="${ARCH}" ./tcbuild build "${LINE}" + ARCH="${ARCH}" ./tcbuild install "${LINE}" +done < "${NATIVE_TCT_LIST_PATH}" + +test -n "${RESULTS}" || RESULTS="${TESTLAB_SCRIPTS}/native_tct/${ARCH}/" +mkdir -p "${RESULTS}" +mv "${PACKAGES_PATH}/tv/"* "${RESULTS}" +mv "${PACKAGES_PATH}/common/"* "${RESULTS}" + +cd "${OLDPWD}" -- 2.7.4