Skip to content

Commit c119d16

Browse files
Nivaldo Bondançafacebook-github-bot
Nivaldo Bondança
authored andcommitted
Created script to help with testing rest of ktfmt
Summary: Since we often forget to test things here, I'm creating this scripting and pluging it into our buck testing infra. Hopefully this Reviewed By: cortinico Differential Revision: D58448053 fbshipit-source-id: 746697888c7f1572f60262a0396bada00d3a1055
1 parent 587a232 commit c119d16

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

smoke_tests.sh

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/sh
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -e
17+
18+
# Absolute path to this script, e.g. /home/user/ktfmt/smoke_tests.sh
19+
SCRIPT=$(readlink -f "$0")
20+
# Absolute path this script is in, thus /home/user/ktfmt/
21+
ROOT_DIR=$(dirname "$SCRIPT")
22+
23+
echo "Testing ktfmt core library"
24+
echo
25+
cd "$ROOT_DIR"
26+
mvn clean install
27+
echo
28+
29+
echo "Testing ktfmt IDEA plugin"
30+
echo
31+
cd "$ROOT_DIR/ktfmt_idea_plugin"
32+
./gradlew :build
33+
echo
34+
35+
echo "Testing online formatter"
36+
echo
37+
cd "$ROOT_DIR/online_formatter"
38+
./gradlew :build
39+
echo

0 commit comments

Comments
 (0)