Remove bash dependency in test scripts

This commit is contained in:
Your Name 2022-12-08 01:07:16 +00:00 коммит произвёл Sylvestre Ledru
Родитель a1dae7205d
Коммит 831749901e
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -o errexit
set -o pipefail
set -o nounset
@ -80,11 +80,11 @@ elif [ "$1" = test ]; then
set +x
if ! which docker; then
echo -e "WARNING: =====\n\ndocker not present, some tests will fail\n\n=====\n\n\n\n\n"
printf "WARNING: =====\n\ndocker not present, some tests will fail\n\n=====\n\n\n\n\n"
sleep 5
fi
if ! which icecc-create-env; then
echo -e "WARNING: =====\n\nicecc-create-env not present, some tests will fail\n\n=====\n\n\n\n\n"
printf "WARNING: =====\n\nicecc-create-env not present, some tests will fail\n\n=====\n\n\n\n\n"
sleep 5
fi
set -x

Просмотреть файл

@ -87,12 +87,12 @@ fn create_mock_rustc(dir: PathBuf) {
let rustc = bin.join("rustc");
write!(
File::create(&rustc).unwrap(),
r#"#!/usr/bin/env bash
r#"#!/usr/bin/env sh
set -e
build=0
while (( "$#" )); do
while [ "$#" -gt 0 ]; do
case "$1" in
-vV)
echo rustc 1.0.0
@ -124,7 +124,7 @@ while (( "$#" )); do
shift
done
if (( build )); then
if [ "$build" -eq 1 ]; then
echo $(($(cat counter) + 1)) > counter
cp counter RUST_FILE
fi