-
Notifications
You must be signed in to change notification settings - Fork 444
/
tests.sh
executable file
·29 lines (27 loc) · 978 Bytes
/
tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
set -e
JSONNET_BIN="${JSONNET_BIN:-./jsonnet}"
TEST_SNIPPET="std.assertEqual(({ x: 1, y: self.x } { x: 2 }).y, 2)"
printf "snippet: "
"$JSONNET_BIN" -e "${TEST_SNIPPET}" || FAIL=TRUE
if [ -z "$DISABLE_LIB_TESTS" ]; then
printf 'libjsonnet_test_snippet: '
LD_LIBRARY_PATH=. ./libjsonnet_test_snippet "${TEST_SNIPPET}" || FAIL=TRUE
printf 'libjsonnet_test_file: '
LD_LIBRARY_PATH=. ./libjsonnet_test_file "test_suite/object.jsonnet" || FAIL=TRUE
echo -n 'libjsonnet_test_locale: '
LD_LIBRARY_PATH=. ./libjsonnet_test_locale || FAIL=TRUE
fi
examples/check.sh || FAIL=TRUE
examples/terraform/check.sh || FAIL=TRUE
test_cmd/run_cmd_tests.sh || FAIL=TRUE
test_suite/run_tests.sh || FAIL=TRUE
doc/_stdlib_gen/run_tests.sh || FAIL=TRUE
if [ -z "$DISABLE_FMT_TESTS" ]; then
test_suite/run_fmt_tests.sh || FAIL=TRUE
test_suite/run_fmt_idempotence_tests.sh || FAIL=TRUE
fi
if [ -n "$FAIL" ]; then
echo "TESTS FAILED"
exit 1
fi