Commit Graph

93 Commits

Author SHA1 Message Date
Ben Newman
5aee7a9a09 Use an appropriate module object in meteor shell. 2016-05-19 17:04:08 -04:00
Ben Newman
93d8281f48 Implement Console.setHeadless instead of Console.{enable,disable}Spinner. 2016-05-17 19:53:12 -04:00
David Glasser
2b6b02439d destroy universe
"universe" was an old attempt to allow you to run various MDG
servers (Meteor Developer Accounts, the package server, an old version
of the Galaxy deploy server, etc) on localhost and configure the tool to
talk to it not via a bunch of environment variables but via a file
called "universe" at the root of your checkout. Nobody uses this (and
most of the URLs have environment variables for them anyway).  Simplify
the code by removing this entirely.

Also remove some more dead code, and a test that claims it only runs if
you have universe set up.
2016-05-13 15:09:03 -07:00
Ben Newman
b3bcdbafda Disable progress spinner when running headless CI tests. 2016-05-09 18:00:32 -04:00
Jesse Rosenberger
454a76191c Allow --port in "test" to allow a bindaddr, same as non-test
The `test` mode wasn't passing the proper proxyHost and proxyPort values to runAll.  This changes the behaviour to work the same as the regular `run` mode and also adds tests for both modes to test the bindaddr (localAddress) is taking effect properly.

Fixes meteor/meteor#6961
2016-05-03 17:35:57 +03:00
Martijn Walraven
49c9d07be8 Always build web.cordova arch when --mobile-server is passed
Closes #6862.
2016-04-28 15:06:56 -07:00
Ben Newman
2dd511ff11 Remove logic for writing package.json files for binary npm packages.
We're going to be using programs/server/setup.sh to run `npm rebuild` in
these packages, which is a much cleaner solution for #6537.
2016-04-07 13:05:50 -04:00
Martijn Walraven
88d43a0f16 Only prepare instead of build the Cordova project for iOS
Building the iOS app for release should be done from Xcode anyway, to
correctly code sign and submit to TestFlight or the App Store.

Because building would override `build-extras.xcconfig`, this would
remove a temporary workaround for #6492, which is now correctly applied
on both `meteor run` and `meteor build`.
2016-03-30 13:37:01 +02:00
Tom Coleman
fe0c65c504 buildMode === "test" for both test and test-packages
I think we hadn't done this for back-compat reasons, however it doesn't make sense as it means that test-drivers and test utilities can't be `testOnly` if they want to be usable for `meteor test-packages`. Which kind of makes it pointless to have `testOnly`.

I don't anticipate it will cause problems, but I'm not entirely sure.
2016-03-14 11:05:07 +11:00
Tom Coleman
2c617225cd Ensure that runAll always sets NODE_ENV+buildMode sensibly.
Note there are a few use cases I can think of we want to worry about:

`meteor run` -- both should be "development"
`meteor run --production` - both should be "production"
`NODE_ENV=production meteor run` - as above
`NODE_ENV=development meteor run --production` - `--production` should win
`meteor test` - NODE_ENV should be "development", buildMode should be "test"
`NODE_ENV=production meteor test" - NODE_ENV should be "production", buildMode should be "test"
2016-03-11 12:29:36 +11:00
Tom Coleman
75749bb544 Fix problem with previous commit 2016-03-10 13:44:58 +11:00
Tom Coleman
5e4107b899 Actually test properly that things exist.
For the `meteor test` command when copying build directories into the test app
2016-03-10 12:35:13 +11:00
Tom Coleman
27faeefb31 Pass test metadata in via an environment variable.
[Only works on the server right now, fairly uselessly]

For #6331
2016-03-09 15:30:45 +11:00
Ben Newman
40857bdaff Propagate meteorEnv subset of process.env from server to client.
Fixes #6399.
2016-03-08 19:37:57 -05:00
Martijn Walraven
83474f9a1e Don't build web.cordova when not running on mobile targets
Closes #6417.
2016-03-05 08:44:06 +01:00
Tom Coleman
6c90662818 Removed examples and added a command to printout their repos.
See #6379
2016-03-03 19:06:51 +11:00
Tom Coleman
058002e7e4 Fix incorrect logic 2016-03-03 14:52:34 +11:00
Tom Coleman
59e3a5c1ff Merge pull request #6338 from meteor/release-1.3-change-test-paths-6321
Changes to testing file matching patterns #6321
2016-02-29 11:18:42 +11:00
Tom Coleman
ab5ab15768 Rename test-app -> test and test --full-app
Our old "unit" test mode didn't really enforce "unit-ness" and was perfectly capable of running integration test. So it was confusing to call the two modes unit and integration test modes.

Instead, we call them "test mode" and "full app test mode", run with `meteor test` and `meteor test --full-app`.

The rules for test files were also simplified -- simply *.test[s].* for test mode, and *.app-test[s].* for full app tests. `tests/` directories are simply ignored again.
2016-02-29 11:16:54 +11:00
Tom Coleman
bd92c15ee2 Add authorized --transfer command for Galaxy 2016-02-26 16:26:29 +11:00
Tom Coleman
121d875a20 Remove code that adds .meteor.com to hostnames in the tool
Instead let the server (both Galaxy and Mother do this) decide on how to postfix the hostname.
2016-02-26 15:53:37 +11:00
Tom Coleman
5b064f15df Allow arbitrary options on meteor deploy
And pass them through to both the /info and /deploy calls.
2016-02-26 15:24:25 +11:00
Tom Coleman
017e32e41a Change the message that we send when try to deploy when not logged in 2016-02-26 15:22:46 +11:00
Martijn Walraven
e129879702 Always try to use auto-detected IP as Cordova ROOT_URL
Fixes part of #5973.
2016-02-25 13:05:18 +01:00
Martijn Walraven
f578edf13b Add --server-only option to meteor build to skip building mobile apps
Closes #6270.
2016-02-25 12:39:51 +01:00
Martijn Walraven
b425d2271f Always warn if building inside the app directory, and fix warning 2016-02-25 12:32:09 +01:00
Avital Oliver
0bbae6a58d meteor test-app now works without ever running meteor run 2016-02-24 10:06:44 -08:00
Tom Coleman
a3ae963020 Require that you specify a driver package for app tests
#5784
2016-02-23 16:54:50 +11:00
Tom Coleman
f58a434d2d Take a test runner as commandline argument 2016-02-22 13:08:23 +11:00
Avital Oliver
af6b9df244 Merge branch 'release-1.3' into app-tests 2016-02-17 21:48:42 -08:00
Avital Oliver
6a37666346 Move test-packages section in CLI code
Moving it back to its original location to help with a merge
conflict.
2016-02-17 21:48:05 -08:00
Avital Oliver
08d1e3d81e Use the published avital:mocha test package by default 2016-02-17 18:00:10 -08:00
Avital Oliver
83922dfc3a Start support for unit tests.
You can now run `meteor test-app --unit` to load just test files
and their dependencies.

Also, `Meteor.isIntegrationTest` and `Meteor.isUnitTest` are now
available on the client side of your apps. This can be used to
only run some tests in either mode.

TODO: Find unit tests inside imports/ directories even if they're
not explicitly imported.
2016-02-16 09:32:05 -08:00
Avital Oliver
4592c74a60 Now both test-app and test-packages work 2016-02-16 08:27:00 -08:00
Avital Oliver
e4048680ce WIP: Unbreak meteor test-packages 2016-02-15 21:39:07 -08:00
Avital Oliver
94ca223d72 meteor test-app: Copy previous app build before rebuilding
This speeds up running tests significantly.

Copied from @Sanjo's work on Velocity.
2016-02-05 14:55:33 -08:00
Avital Oliver
283a55ee93 Unbreak test-packages due to previous refactor 2016-02-05 13:08:22 -08:00
Avital Oliver
6682972c3a Implement "testOnly" packages
These packages are only bundled with the app when running
`meteor test-app`.
2016-02-01 22:18:00 -08:00
Martijn Walraven
5404f9894b Rename plugins to pluginVersions 2016-01-25 15:02:41 -08:00
Martijn Walraven
bfe74aeaec Pass buildOptions as object for new cordova-lib version 2016-01-25 15:02:41 -08:00
Martijn Walraven
b05cd35577 Abort followup tasks if Cordova project creation doesn't succeed 2016-01-25 15:02:40 -08:00
Steven Edouard
00710d8657 Remove not-mobile-capable checks for Windows! 2016-01-25 15:02:02 -08:00
Avital Oliver
ac5a4bc809 WIP: Implement a meteor test-app command.
This command builds the app with a different directory for
`.meteor/local`, including built packages and the app database. This
allows running `meteor test-app` and `meteor test` in parallel
for a given app, with DB isolation.

Also, we've changed how test driver packages work (as used for
`meteor test-packages`, like "test-in-browser"). Instead of automatically
running tests when they load, they export a `runTests` function that
you should call when you're ready to run tests.

When running `meteor test-app` or `meteor test-packages` a new additional
last line of code is added that calls `Meteor.startup(...runTests()...)`

TODO:
* Implement `testOnly` packages. The current pattern of reading a global
  from `package.js` won't work for published packages, which are stored
  as metadata, not code.
* Let you choose a test driver package as an argument to `meteor test-app`
* Demonstrate that a Mocha test and driver package are possible to write.
* Expose Meteor.isTest, Meteor.isIntegrationTest, Meteor.isUnitTest
* Implement `meteor test-app --unit` which only loads test files
* `meteor test-app` should load ALL *.tests?.* files, including ones
  inside imports/ directories
2016-01-22 15:18:10 -08:00
Ben Newman
3869b7ed04 Eliminate Future from tools/commands.js. 2015-12-09 12:06:47 -05:00
Ben Newman
ed17924940 Add braces to every if/for(-in)/while statement in tools directory. 2015-11-13 12:25:19 -05:00
David Glasser
c929703790 One way of cross-compiling local binary packages
If $METEOR_BINARY_DEP_WORKAROUND is set, then when bundling for a
non-host platform (build/bundle/deploy commands only), if a package has
no server unibuild for the target architecture, use the host
architecture and replace the npm modules with a package.json and
npm-shrinkwrap.json.  Also write out a top-level setup.sh script (inside
programs/server) which runs npm install in all such directories.

To support this, we make sure to save the package.json and
npm-shrinkwrap.json files in various intermediate directories in case we
need them later.  (We put them inside node_modules because that is what
gets copied from source tree to isopack.)
2015-09-22 15:11:04 -07:00
Sashko Stubailo
a23cc02492 Merge branch 'master' into devel
Conflicts:
	History.md
	packages/babel-compiler/.npm/package/npm-shrinkwrap.json
	packages/babel-compiler/package.js
	packages/ecmascript/package.js
	packages/sha/package.js
	tools/upgraders.js
2015-09-21 20:12:55 -04:00
Martijn Walraven
e2e688e78e Print warning when attempting to build Cordova platforms on Windows 2015-09-15 10:16:17 +02:00
Martijn Walraven
984bd1307e Don't attempt to build Cordova platforms on Windows 2015-09-13 10:52:12 +02:00
Sashko Stubailo
ff3f2ee31b Fix create on Windows; don't copy git hooks on Windows 2015-09-10 20:52:21 -07:00