blob: 25fa4ebfd757aaf817c0da40c0f916b98a654116 [file] [log] [blame]
Damien Martin-Guillerez5f9c6ba2015-04-09 21:10:33 +00001#!/bin/bash
2#
Damien Martin-Guillerezf88f4d82015-09-25 13:56:55 +00003# Copyright 2015 The Bazel Authors. All rights reserved.
Damien Martin-Guillerez5f9c6ba2015-04-09 21:10:33 +00004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17# Setting up the environment for Bazel completion script test
18
19[ -z "$TEST_SRCDIR" ] && { echo "TEST_SRCDIR not set!" >&2; exit 1; }
20
21# Load the unit-testing framework
Kristina Chodorow93fbc3e2016-04-27 17:03:28 +000022source "${TEST_SRCDIR}/io_bazel/src/test/shell/unittest.bash" \
23 || { echo "Failed to source unittest.bash" >&2; exit 1; }
Damien Martin-Guillerez5f9c6ba2015-04-09 21:10:33 +000024
25set_up() {
26 mkdir -p $TEST_TMPDIR/workspace
27 cd $TEST_TMPDIR/workspace
28 touch $TEST_TMPDIR/workspace/WORKSPACE
29}
30
31tear_down() {
32 rm -fr $TEST_TMPDIR/workspace/*
33}