| 1 |
#!/usr/bin/env bash |
| 2 |
|
| 3 |
# Copyright 2015 Google Inc. All rights reserved. |
| 4 |
# |
| 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 |
TEST_SUITE_NAME="${TEST_SUITE_NAME:-$0}" |
| 18 |
|
| 19 |
cd $(dirname $0) |
| 20 |
|
| 21 |
JSONNET_BIN="${JSONNET_BIN:-../../jsonnet}" |
| 22 |
|
| 23 |
source ../../test_suite/tests.source |
| 24 |
|
| 25 |
init |
| 26 |
|
| 27 |
shopt -s nullglob |
| 28 |
|
| 29 |
FAILED=0 |
| 30 |
SUCCESS=0 |
| 31 |
|
| 32 |
test_eval "$JSONNET_BIN" "stdlib-content-test.jsonnet" 0 "true" "PLAIN" |
| 33 |
|
| 34 |
deinit |
| 35 |
|
| 36 |
if [ "$FAILED" -eq 0 ] ; then |
| 37 |
echo "$TEST_SUITE_NAME: All $EXECUTED tests executed correctly." |
| 38 |
else |
| 39 |
echo "$TEST_SUITE_NAME: $FAILED / $EXECUTED tests failed." |
| 40 |
exit 1 |
| 41 |
fi |
| 42 |
|
| 43 |
|