mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
- Ensure we use up to date build container when running tests. - Parallelise host setup for integration tests. - Pass some more circle env vars through to ./tools/tests so the scheduler works. - Gather coverage from multiple shards. - Create files as the right owner inside the container. - Parallelise the circle.yaml - Parallelise the intergration tests using existing machinery - Build experimental in parallel. - Use custom scheduler prefix for integration tests, so schedules don't clash with weave.
32 lines
636 B
Bash
Executable File
32 lines
636 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [ $# -lt 2 ]; then
|
|
echo "Usage: $0 <cmd> [args...]"
|
|
echo " Will run cmd arg1, cmd arg2 etc on different circle shared,"
|
|
echo " based on what the scheduler says."
|
|
exit 2
|
|
fi
|
|
|
|
if [ -z "$CIRCLECI" ]; then
|
|
echo "I'm afraid this only works when run on CircleCI"
|
|
exit 1
|
|
fi
|
|
|
|
COMMAND=$1
|
|
shift 1
|
|
|
|
INPUTS="$*"
|
|
INPUTS=$(echo $INPUTS | "../tools/sched" sched parallel-$CIRCLE_BUILD_NUM $CIRCLE_NODE_TOTAL $CIRCLE_NODE_INDEX)
|
|
|
|
echo Doing $INPUTS
|
|
|
|
for INPUT in $INPUTS; do
|
|
START=$(date +%s)
|
|
$COMMAND $INPUT
|
|
RUNTIME=$(( $(date +%s) - $START ))
|
|
|
|
"../tools/sched" time $INPUT $RUNTIME
|
|
done
|