blob: 65d2a767424ef69c2d5cba36ac8829c1469768c0 [file] [log] [blame]
Seewai Fuabd65c12021-07-21 10:30:11 -07001#! /bin/bash -e
2
3# Copyright 2021 The Chromium OS Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7# This script copy the test metadata from build to local test directory
8# Example:
9# ./copy_metadata.sh hana ./src/chromiumos/test/execution/data/metadata
10# This script is temporary solution for testing of testexecserver.
11# It will be removed after we implement a permanent method to export
12# test metadata to a single directory.
13
14board=$1
15dest=$2
16
17if [ -z "${board}" ]
18then
19 echo "board needs to be specified"
20 exit 1
21fi
22if [ -z "${dest}" ]
23then
24 echo "desination needs to be specified"
25 exit 1
26fi
27
28rm -rf "${dest:?}"/*
29mkdir -p "${dest:?}"/tast/local "${dest:?}"/tast/remote "${dest:?}"/autotest
30
31cp -p /build/"${board}"/usr/local/build/autotest/autotest_metadata.pb "${dest}"/autotest
32cp -p /build/"${board}"/usr/share/tast/metadata/local/cros.pb "${dest}"/tast/local
33cp -p /build/"${board}"/build/share/tast/metadata/local/crosint.pb "${dest}"/tast/local
34cp -p /usr/share/tast/metadata/remote/cros.pb "${dest}"/tast/remote