Skip to content

Commit 9ab5306

Browse files
committed
melting-pot: add an option to skip the build
This still prepares the melting pot according to the given criteria, but does not actually call "mvn test" at the end. It will be very useful for regression testing with cram.
1 parent 05edd0c commit 9ab5306

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

melting-pot.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ parseArguments() {
132132
-f|--force)
133133
force=1
134134
;;
135+
-s|--skipBuild)
136+
skipBuild=1
137+
;;
135138
-h|--help)
136139
usage=1
137140
;;
@@ -151,7 +154,7 @@ parseArguments() {
151154
if [ "$usage" ]
152155
then
153156
echo "Usage: $(basename "$0") <project> [-c <GAVs>] \\
154-
[-i <GAs>] [-e <GAs>] [-r <URLs>] [-l <dir>] [-o <dir>] [-vfh]
157+
[-i <GAs>] [-e <GAs>] [-r <URLs>] [-l <dir>] [-o <dir>] [-vfsh]
155158
156159
<project>
157160
The project to build, including dependencies, with consistent versions.
@@ -175,6 +178,8 @@ parseArguments() {
175178
Enable verbose/debugging output.
176179
-f, --force
177180
Wipe out the output directory if it already exists.
181+
-s, --skipBuild
182+
Skips the final build step. Useful for automated testing.
178183
-h, --help
179184
Display this usage information."
180185
exit 1
@@ -405,9 +410,15 @@ meltDown() {
405410
generatePOM
406411

407412
# Build everything.
408-
debug "Building the project!"
409-
# NB: All code is fresh; no need to clean.
410-
mvn $args test
413+
if [ "$skipBuild" ]
414+
then
415+
debug "Skipping the build; the command would have been:"
416+
debug "mvn $args test"
417+
else
418+
debug "Building the project!"
419+
# NB: All code is fresh; no need to clean.
420+
mvn $args test
421+
fi
411422

412423
debug "$1: complete"
413424
}

0 commit comments

Comments
 (0)