about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2022-04-23 10:48:12 -0400
committerAntoni Boucher <bouanto@zoho.com>2022-04-23 10:48:12 -0400
commit889c402258e063c6ad4db9a340cbd78f8e5d668c (patch)
tree189cc9acff0a01a7a3fe008f1a931766f380d9b3
parent4210fd49cbea8ef241138a2fb77612f43e0b87a7 (diff)
downloadrust-889c402258e063c6ad4db9a340cbd78f8e5d668c.tar.gz
rust-889c402258e063c6ad4db9a340cbd78f8e5d668c.zip
Fix test.sh --build
-rwxr-xr-xtest.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/test.sh b/test.sh
index 897649e7adb..8b390f95a4b 100755
--- a/test.sh
+++ b/test.sh
@@ -18,6 +18,7 @@ flags=
 gcc_master_branch=1
 channel="debug"
 func=all
+build_only=0
 
 while [[ $# -gt 0 ]]; do
     case $1 in
@@ -72,6 +73,10 @@ while [[ $# -gt 0 ]]; do
             func=build_sysroot
             shift
             ;;
+        "--build")
+            build_only=1
+            shift
+            ;;
         *)
             echo "Unknown option $1"
             exit 1
@@ -89,7 +94,7 @@ else
     cargo rustc $flags
 fi
 
-if [[ "$1" == "--build" ]]; then
+if (( $build_only == 1 )); then
     exit
 fi