-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest-all
executable file
·64 lines (55 loc) · 1.48 KB
/
test-all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
export RUSTFLAGS="--cap-lints=warn"
REPOSITORIES="
servo/rust-url
servo/rust-cssparser
servo/rust-selectors
servo/rust-quicksort
servo/rust-smallvec
servo/rust-fnv
servo/html5ever
servo/string-cache
servo/tendril
SimonSapin/rust-std-candidates
SimonSapin/rust-wtf8
SimonSapin/rust-casefold
SimonSapin/rust-rctree
SimonSapin/kuchiki
"
YELLOW=33
RED=31
function color {
COLOR=$1
shift
echo -e "\033[1;${COLOR}m$@\033[0m"
}
FAILED=""
for REPOSITORY in $REPOSITORIES
do
echo "travis_fold:start:$REPOSITORY"
if [ -d clones/$REPOSITORY ]
then
(cd clones/$REPOSITORY && git fetch && git reset --hard origin/master && git submodule update)
else
git clone --recursive https://github.com/$REPOSITORY.git clones/$REPOSITORY
fi
if [ -f clones/$REPOSITORY/Makefile ]
then
color $YELLOW 'Running `make test` in' $REPOSITORY...
make -C clones/$REPOSITORY test || FAILED="$FAILED $REPOSITORY"
elif [ -f clones/$REPOSITORY/Cargo.toml ]
then
color $YELLOW 'Running `cargo test` in' $REPOSITORY...
cargo test --manifest-path clones/$REPOSITORY/Cargo.toml --all || FAILED="$FAILED $REPOSITORY"
else
color $RED 'Found neither `Makefile` not `Cargo.toml` in' $REPOSITORY
RESULT=1
fi
echo "travis_fold:start:$REPOSITORY"
done
if [ -n "$FAILED" ]
then
echo
color $RED "Tests in some repositories have failed:$FAILED"
exit 1
fi