about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2018-12-27 12:16:08 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2018-12-27 16:56:07 +0100
commitbcc309f27d8c619877bb9083031627b3fde29349 (patch)
tree9c99649a0f6d1e594b930cf39f73af52e4096cdc
parent721f688eff3dd5db77c92e8a887f1ff7255ba0ab (diff)
downloadrust-bcc309f27d8c619877bb9083031627b3fde29349.tar.gz
rust-bcc309f27d8c619877bb9083031627b3fde29349.zip
base tests: switch to nightly toolchain before checking formatting of tests with rustfmt
this errored because rustfmt is not available on the master toolchain
-rwxr-xr-xci/base-tests.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/ci/base-tests.sh b/ci/base-tests.sh
index 537f7e124d4..d4da158a35f 100755
--- a/ci/base-tests.sh
+++ b/ci/base-tests.sh
@@ -42,9 +42,13 @@ set +x
 
 # some lints are sensitive to formatting, exclude some files
 needs_formatting=false
+# switch to nightly
+rustup default nightly
 for file in `find tests -not -path "tests/ui/methods.rs" -not -path "tests/ui/format.rs" -not -path "tests/ui/formatting.rs" -not -path "tests/ui/empty_line_after_outer_attribute.rs" -not -path "tests/ui/double_parens.rs" -not -path "tests/ui/doc.rs" -not -path "tests/ui/unused_unit.rs" | grep "\.rs$"` ; do
 rustfmt ${file} --check  || echo "${file} needs reformatting!" ; needs_formatting=true
 done
+# switch back to master
+rustup default master
 
 if [ "${needs_reformatting}" = true ] ; then
     echo "Tests need reformatting!"