test.sh: add rust/cargo runner
This commit is contained in:
parent
3b768f045c
commit
ba84afae67
1 changed files with 7 additions and 3 deletions
10
test.sh
10
test.sh
|
@ -8,9 +8,13 @@ YEAR=2020
|
||||||
|
|
||||||
run_solution() {
|
run_solution() {
|
||||||
if [ -d "$solution" ]; then
|
if [ -d "$solution" ]; then
|
||||||
runfile=$solution/run.sh
|
if [ -f "$solution/Cargo.toml" ]; then
|
||||||
[ -f "$runfile" ] || { echo "Error: $runfile not found" >&2; exit 1; }
|
cargo run --quiet --manifest-path "$solution/Cargo.toml" < "$input"
|
||||||
"$runfile" "$input"
|
else
|
||||||
|
runfile=$solution/run.sh
|
||||||
|
[ -f "$runfile" ] || { echo "Error: $runfile not found" >&2; exit 1; }
|
||||||
|
"$runfile" "$input"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
case "$(basename "$solution")" in
|
case "$(basename "$solution")" in
|
||||||
*.hs)
|
*.hs)
|
||||||
|
|
Loading…
Reference in a new issue