File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -196,8 +196,6 @@ function test_import_export_equivalence {
196
196
fi
197
197
}
198
198
199
- WORKINGDIR=$PWD
200
-
201
199
command_available " $SOLC " --version
202
200
command_available jq --version
203
201
@@ -214,12 +212,17 @@ IMPORT_TEST_FILES=$(find "${TEST_DIRS[@]}" -name "*.sol" -and -not -name "boost_
214
212
NSOURCES=" $( echo " ${IMPORT_TEST_FILES} " | wc -l) "
215
213
echo " Looking at ${NSOURCES} .sol files..."
216
214
215
+ COUNTER=0
216
+ TEST_DIR=$( mktemp -d -t " import-export-test-XXXXXX" )
217
+ pushd " $TEST_DIR " > /dev/null
218
+
217
219
for solfile in $IMPORT_TEST_FILES
218
220
do
219
221
echo -n " ·"
220
- # create a temporary sub-directory
221
- FILETMP=$( mktemp -d)
222
- cd " $FILETMP "
222
+
223
+ TEST_SUBDIR=" $( printf " %05d" " $COUNTER " ) -$( basename " $solfile " ) "
224
+ mkdir " $TEST_SUBDIR "
225
+ pushd " $TEST_SUBDIR " > /dev/null
223
226
224
227
set +e
225
228
OUTPUT=$( " $SPLITSOURCES " " $solfile " )
244
247
# All other return codes will be treated as critical errors. The script will exit.
245
248
printError " \n\nGot unexpected return code ${SPLITSOURCES_RC} from '${SPLITSOURCES} ${solfile} '. Aborting."
246
249
printError " \n\n${OUTPUT} \n\n"
247
-
248
- cd " $WORKINGDIR "
249
- # Delete temporary files
250
- rm -rf " $FILETMP "
251
-
252
250
exit 1
253
251
fi
254
252
255
- cd " $WORKINGDIR "
256
- # Delete temporary files
257
- rm -rf " $FILETMP "
253
+ popd > /dev/null
254
+ (( ++ COUNTER))
258
255
done
259
256
257
+ popd > /dev/null
258
+ rm -r " $TEST_DIR "
259
+
260
260
echo
261
261
262
262
if (( FAILED == 0 ))
You can’t perform that action at this time.
0 commit comments