mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
In addition to minor "make the tests match the code" changes, there's also:
- missing require('tar') in tarball download code
- fix an fd leak in the bundler that was causing EMFILE on mac
- switch run.js to listening for 'exit' to 'close' so that the end
of stdout/err can be read
- some concerningly necessary deletions of .build directories
Also, the version of cli-test.sh that runs against a fixed release is disabled,
since we're not building releases with the new package format for now.
60 lines
1.4 KiB
Bash
Executable File
60 lines
1.4 KiB
Bash
Executable File
#!/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)
|
|
# XXX For now, we turn this off, because it requires us to have a built release
|
|
# which is compatible with the current tools.
|
|
# ./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
|
|
|