forked from meteor/meteor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-tools-tests.sh
executable file
·57 lines (44 loc) · 1.29 KB
/
run-tools-tests.sh
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
#!/bin/bash
## Setup
cd `dirname $0`
METEOR_DIR=`pwd`/..
# Die with message on failure, print commands being executed
trap 'echo FAILED' EXIT
set -e -u -x
# linux mktemp requires at least 3 X's in the last component.
make_temp_dir() {
mktemp -d -t $1.XXXXXX
}
###
### Test the Meteor CLI from an installed tools (tests loading
### packages into the warehouse).
###
TEST_TMPDIR=$(make_temp_dir meteor-installed-cli-tests)
export METEOR_TOOLS_TREE_DIR="$TEST_TMPDIR/tools-tree" # used in cli-test.sh and tools-springboard-test.sh
TARGET_DIR="$METEOR_TOOLS_TREE_DIR" admin/build-tools-tree.sh
# Create a warehouse.
export METEOR_WAREHOUSE_DIR=$(make_temp_dir meteor-installed-cli-tests-warehouse)
# Download a bootstrap tarball into it. (launch-meteor recreates the directory.)
rmdir "$METEOR_WAREHOUSE_DIR"
admin/launch-meteor --version # downloads the bootstrap tarball
# Test springboarding specifically
./tools-springboard-test.sh
# CLI tests (without springboarding, but with a warehouse)
./cli-test.sh
unset METEOR_TOOLS_TREE_DIR
unset METEOR_WAREHOUSE_DIR
###
### Bundler unit tests
###
./bundler-test.sh
###
### Watcher unit tests
###
./watch-test.sh
###
### Test the Meteor CLI from a checkout. We do this last because it is least likely to fail.
###
./cli-test.sh
## Done
trap - EXIT
echo PASSED