File tree 2 files changed +4
-3
lines changed 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,8 @@ function check_jar {
122
122
# Usage:
123
123
# check_jar "name" "path/to/package.jar" "sources/dir" 'lambda to exec on failure'
124
124
local new_files=" $( find " $DOTTY_ROOT /$3 " \( -iname " *.scala" -o -iname " *.java" \) -newer " $2 " ) "
125
- if [ ! -z " $new_files " ]; then
125
+ # If the find failed, or if it found new files...
126
+ if [ " $? " -ne 0 ] || [ ! -z " $new_files " ]; then
126
127
printf " New files detected in $1 , rebuilding..."
127
128
rm " $2 "
128
129
eval " $4 "
Original file line number Diff line number Diff line change @@ -91,9 +91,9 @@ class TestScripts {
91
91
s " Project recompiled when it didn't need to be. Status $ret, output: $lineSep$output" )
92
92
}
93
93
94
- /** dotc script should work after deleting .packages */
94
+ /** dotc script should work after corrupting .packages */
95
95
@ Test def reCreatesPackagesIfNecessary = doUnlessWindows {
96
- delete( " ./. packages" )
96
+ executeScript( " sed -i.old 's/2.1/2.X/' ./. packages" ) // That's going to replace 2.11 with 2.X1
97
97
val (retFirstBuild, _) = executeScript(" ./bin/dotc ./tests/pos/HelloWorld.scala" )
98
98
assert(retFirstBuild == 0 , " building dotc failed" )
99
99
}
You can’t perform that action at this time.
0 commit comments