Skip to content

Commit d3a016b

Browse files
authored
Merge pull request #10251 from ethereum/cmdline-tests-input-sol-by-default
Assume input.sol by default in command-line tests (restores old behavior) (reopened)
2 parents 55ac5de + 25badc4 commit d3a016b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

test/cmdlineTests.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,6 @@ printTask "Running general commandline tests..."
261261

262262
inputFiles="$(find "${tdir}" -name 'input.*' -type f -exec printf "%s\n" "{}" \;)"
263263
inputCount="$(echo "${inputFiles}" | wc -l)"
264-
if (( ${inputCount} == 0 ))
265-
then
266-
printError "No input files found."
267-
exit 1
268-
fi
269-
270264
if (( ${inputCount} > 1 ))
271265
then
272266
printError "Ambiguous input. Found input files in multiple formats:"
@@ -277,6 +271,11 @@ printTask "Running general commandline tests..."
277271
# Use printf to get rid of the trailing newline
278272
inputFile=$(printf "%s" "${inputFiles}")
279273

274+
# If no files specified, assume input.sol as the default
275+
if [ -z "${inputFile}" ]; then
276+
inputFile="${tdir}/input.sol"
277+
fi
278+
280279
if [ "${inputFile}" = "${tdir}/input.json" ]
281280
then
282281
stdin="${inputFile}"

0 commit comments

Comments
 (0)