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 {
196196 fi
197197}
198198
199- WORKINGDIR=$PWD
200-
201199command_available " $SOLC " --version
202200command_available jq --version
203201
@@ -214,12 +212,17 @@ IMPORT_TEST_FILES=$(find "${TEST_DIRS[@]}" -name "*.sol" -and -not -name "boost_
214212NSOURCES=" $( echo " ${IMPORT_TEST_FILES} " | wc -l) "
215213echo " Looking at ${NSOURCES} .sol files..."
216214
215+ COUNTER=0
216+ TEST_DIR=$( mktemp -d -t " import-export-test-XXXXXX" )
217+ pushd " $TEST_DIR " > /dev/null
218+
217219for solfile in $IMPORT_TEST_FILES
218220do
219221 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
223226
224227 set +e
225228 OUTPUT=$( " $SPLITSOURCES " " $solfile " )
244247 # All other return codes will be treated as critical errors. The script will exit.
245248 printError " \n\nGot unexpected return code ${SPLITSOURCES_RC} from '${SPLITSOURCES} ${solfile} '. Aborting."
246249 printError " \n\n${OUTPUT} \n\n"
247-
248- cd " $WORKINGDIR "
249- # Delete temporary files
250- rm -rf " $FILETMP "
251-
252250 exit 1
253251 fi
254252
255- cd " $WORKINGDIR "
256- # Delete temporary files
257- rm -rf " $FILETMP "
253+ popd > /dev/null
254+ (( ++ COUNTER))
258255done
259256
257+ popd > /dev/null
258+ rm -r " $TEST_DIR "
259+
260260echo
261261
262262if (( FAILED == 0 ))
You can’t perform that action at this time.
0 commit comments