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)
This commit is contained in:
chriseth 2020-11-10 17:29:58 +01:00 committed by GitHub
commit d3a016b597
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -261,12 +261,6 @@ printTask "Running general commandline tests..."
inputFiles="$(find "${tdir}" -name 'input.*' -type f -exec printf "%s\n" "{}" \;)"
inputCount="$(echo "${inputFiles}" | wc -l)"
if (( ${inputCount} == 0 ))
then
printError "No input files found."
exit 1
fi
if (( ${inputCount} > 1 ))
then
printError "Ambiguous input. Found input files in multiple formats:"
@ -277,6 +271,11 @@ printTask "Running general commandline tests..."
# Use printf to get rid of the trailing newline
inputFile=$(printf "%s" "${inputFiles}")
# If no files specified, assume input.sol as the default
if [ -z "${inputFile}" ]; then
inputFile="${tdir}/input.sol"
fi
if [ "${inputFile}" = "${tdir}/input.json" ]
then
stdin="${inputFile}"