Skip to content

Commit

Permalink
Remove bash dependency in test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name authored and sylvestre committed Dec 8, 2022
1 parent a1dae72 commit 8317499
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions scripts/extratest.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -o errexit
set -o pipefail
set -o nounset
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/sccache_rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8317499

Please sign in to comment.