mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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:
commit
d3a016b597
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user