Commit Graph

119 Commits

Author SHA1 Message Date
Ben Newman
8567390e7e Fix error stack trace parsing during Windows self-tests. 2019-11-12 16:38:22 -05:00
Michael Newman
e0eb210194 Convert tools/utils/processes.js to tools/utils/processes.ts (#10627) 2019-07-25 17:34:13 -04:00
Paulo Mogollón
2ae2690f3a Convert tools/utils/archinfo.js to TypeScript. (#10624)
* Updated code to use modern JS
* Added types
* Stopped using 2 underscore functions (1 remaining)
2019-07-21 12:01:24 -04:00
Ben Newman
01fb509fff Implement an official typescript compiler plugin. 2019-07-07 19:29:34 -04:00
Ben Newman
5ed64fb1db Remove explicit .js extension from tools/fs/files imports. 2019-07-04 10:32:09 -04:00
Ben Newman
5d88d9a1a4 Improve stack traces for self-test failures. 2019-01-05 16:54:38 -05:00
Toine van Kampen
499bb7ea25 Merge remote-tracking branch 'meteor/devel' into devel
Rebaseline
2018-06-06 20:28:03 +10:00
Ben Newman
6be0514eaf Add modern-browsers to self-test sandbox root packages list. 2018-04-25 11:39:30 -04:00
Toine van Kampen
f28710ec23 Add PhantomJS option back in
Per feedback keep PhantomJS
2018-04-19 21:34:33 +10:00
Ben Newman
c032b9c271 Disable longjohn, since Node 8 now supports async stack traces. 2018-04-18 18:36:44 -04:00
Toine van Kampen
4bbc204bb0 Remove PhantomJS from App-Config
Remove PhantomJS from App-Config, Dynamic Import and Modules.
Explicitly end page before browser to ensure both are null.
2018-04-16 06:40:31 +10:00
Toine van Kampen
cd28686c7c Fix comment
Make it clear that running with sandbox off is required for
Travis/Circle but is not recommended. This should be further enhanced.
2018-04-14 14:22:24 +10:00
Toine van Kampen
d2eabd74bc Initial Config for Puppeteer
Base config for puppeteer and replace PhantomJS
2018-04-14 12:58:36 +10:00
Ben Newman
5938e88a83 Scan packages/non-core in self-test, e.g. to find jquery. 2018-04-03 12:50:42 -04:00
Ben Newman
e7ad5d2a42 Call files.cp_r with { preserveSymlinks: true } in more places.
Now that symlinks can be used to enable selective compilation of
node_modules, it's important to preserve them.
2018-03-26 12:04:12 -04:00
Hugh Willson
540dc00230 Add a self-test skip option (#9579)
* Add a self-test skip option

Meteor's CI infrastructure is configured to exclude certain
`self-test`'s on each run. These excludes are specified in
each CI environment's config file, and included when running
`meteor self-test`. Developers running `meteor self-test`
locally however are not using these excludes by default,
so developer's have to manually look up the current exclude
list from one of the CI configs, then add these excludes to
their own `meteor self-test` call manually.

This commit adds a new `skip` option to Meteor's `self-test`
system, that can be used to skip adding/running a defined
`self-test` (similar in concept to Mocha's `skip` feature).
This provides a way to skip the running of older
`self-test`'s that are no longer needed, but allows them to
be preserved in the `self-test` suite, for future reference.
With this functionality in place, and the older test suites
updated to use it, Meteor's base CI excludes no longer need
to be maintained in their respective config files. The
excludes are all managed at the source (the test definition),
and can be leveraged by anyone/anything calling
`meteor self-test`.

* Log message describing skipped test

* Add manually-ignored count to self-test summary

* Small comment correction

* History.md entry with PR link
2018-01-29 14:25:09 +02:00
Jesse Rosenberger
1c796a69e1 Change some strings to be template literals.
There's probably a ways to go here, but these seemed like easy targets.
2017-11-29 21:51:15 +02:00
Jesse Rosenberger
936884e740 Address feedback from @benjamn regarding setRunningTest.
A great suggestion!

Refs: https://github.com/meteor/meteor/pull/9364#discussion_r150981769
2017-11-29 21:50:49 +02:00
Jesse Rosenberger
5475add47f Re-factor and re-enable BrowserStack Automate for meteor self-test.
Much of the infrastructure to run "self test" tests (those which test
core functionality of the `meteor` tool itself) in PhantomJS and
BrowserStack was already in place, though the BrowserStack portion had
been disabled some time ago, though the exact reason isn't entirely
clear.

BrowserStack could play an important roll in Meteor's future as Meteor
works to ensure that the bundle delivered to the client is appropriate
for that client's capabilities, including appropriate polyfills to
implement functionality not natively available in the browser (e.g.
ECMAScript features, SockJS, etc.).
2017-11-29 21:40:00 +02:00
Jesse Rosenberger
0ab298dd34 Change failedTests to live on the testList.
Since tests themselves already keep track of their failure, and the test
list (i.e. the `TestList` class) tracks other concepts of grouped tests,
such as "all tests", "filtered tests", etc. (like a `TestList` class
would!) I believe it makes sense for it to also maintain a collection of
"failed tests"... (in list form, of course!)

This will allow the `Run.runTest` logic to move into `run.js` file without
needing to pass back a separate `failed` variable in the event of a
failure, since that is already being tracked through the  `notifyFailed`
facility.
2017-11-29 21:33:26 +02:00
Jesse Rosenberger
204270694c Add support for a --retries flag to meteor self-test.
While running the tests three times might make a lot of sence in CI
environments, it certainly slows things down in development, especially
when you've failed a test on purpose, but still have to wait for it to
run three times to get the output.

This not only implements the `--retries` flag, but also activates it in
both CircleCI and AppVeyor test suites.
2017-11-23 18:39:34 +02:00
Jesse Rosenberger
d5ff826596 Decompose self-test logic into separate files.
The single file which represented the bulk of the `meteor self-test`
functionality had got a bit heavy and it stood to benefit from some
dissemination.

I embarked on this change originally when looking into replacing
PhantomJS with Chrome Headless (and a new `ChromeClient` class) within
self-test.  Unfortunately, I didn't have time to take this the last
step of actually implementing Chrome, but this should hopefully
facilitate that change in the future by providing what I believe to be
better compartmentalization of this logic.

I apologize for the (likely) difficulty of reviewing this commit.  Due
to heavy intertwining of existing code it was hard to arrange these
changes in an easy-to-review manner.  I believe a reviewer will
find that it's mainly copy and pasting into different files and
careful adjusting of those files (new) module dependencies.
2017-11-14 15:55:11 +02:00
Ben Newman
1a8efdc31f Merge branch 'devel' into release-1.6 2017-10-02 13:44:25 -04:00
Ben Newman
e85c69680d Combine all isopackets to share transitive dependencies. (#9168)
By my calculations, the sum of the sizes of the individual isopackets was
152MB, and the size of the combined isopacket is now just 36MB. That
remarkable difference goes to show how much duplication of transitive
dependencies was happening before this change.

That's a savings of 116MB for the (uncompressed) size of the meteor-tool
package. In Meteor 1.5.x, the meteor-tool package is about 544MB, but in
Meteor 1.6 it's considerably smaller: 373MB. In other words, this change
should reduce those sizes to 428MB (-21%) and 257MB (-31%), respectively.
2017-10-02 13:41:39 -04:00
Ben Newman
6804aedc6c Merge branch 'release-1.5.2' into release-1.6 2017-08-17 10:19:46 -04:00
Jesse Rosenberger
5626ad7dee JUnit support for meteor self-test test runner. (#9014) 2017-08-16 11:21:07 -04:00
Jesse Rosenberger
073fb0c1fd Remove duplicated import of ../tool-env/install-runtime.js.
From the d16552112e merge of `release-1.5.2`.
2017-08-11 22:53:32 +03:00
Ben Newman
d16552112e Merge branch 'release-1.5.2' into release-1.6 2017-08-10 16:16:03 -04:00
Ben Newman
0bf08a5f99 Merge branch 'release-1.5.2' into release-1.6 2017-08-08 18:40:46 -04:00
Jesse Rosenberger
4cdfd02e44 Auto-install meteor self-test dependencies upon use. (#8981)
* Auto-install `meteor self-test` dependencies upon use.

This uses the same new facilities which were created for auto-installing
Cordova (#8976) to also auto-install PhantomJS and BrowserStack WebDriver npms
into their appropriate home in the dev bundle when they're needed for running
self-tests.

* Use a more descriptive name for the reference to the `require`-d npm module.
2017-08-07 13:18:49 -04:00
Jesse Rosenberger
6a913ef251 (cleanup) Remove spaces between imports, which are fairly random. 2017-08-07 18:55:36 +03:00
Jesse Rosenberger
6e16ba901e (ecmascript) Replace underscore with native ECMAScript methods. 2017-08-07 18:55:02 +03:00
Jesse Rosenberger
769ca736eb (ecmascript) Imports: utils.{randomPort,randomToken,sleepMs,timeoutScaleFactor}. 2017-08-07 18:53:32 +03:00
Jesse Rosenberger
22e63b6d14 Use execFileSync from processes.js, not utils.js.
Confusingly, we are using two different `execFileSync`s in self-test, seemingly
for no particular reason.
2017-08-07 18:53:31 +03:00
Jesse Rosenberger
2a7be19728 (ecmascript) Imports: files.
Just use the entire `files` import rather than selectively importing specific
methods since it has so many methods used.
2017-08-07 18:53:30 +03:00
Jesse Rosenberger
43644412b5 (ecmascript) Imports: child_process.{spawn,execFile}. 2017-08-07 18:53:30 +03:00
Jesse Rosenberger
b1bed468a4 Just use processes' execFileSync directly, not via self-test re-export. 2017-08-07 18:53:22 +03:00
Jesse Rosenberger
7d96bf38ce (ecmascript) Change var to const or let as appropriate. 2017-08-07 18:52:04 +03:00
Jesse Rosenberger
762b86dc84 (cleanup) Remove unused Future symbol. 2017-08-07 18:51:08 +03:00
Jesse Rosenberger
55877e8fda Add missing semicolon. 2017-08-07 18:51:07 +03:00
Jesse Rosenberger
f8512af522 (ecmascript) Change functions to arrow functions, and self => this.
There were not any functions which were using `this` in self-test - all were
using `self`.
2017-08-07 18:50:55 +03:00
Jesse Rosenberger
4c81df6f28 (ecmascript) Change remaining top-level requires to imports. 2017-08-07 18:46:11 +03:00
Jesse Rosenberger
db47c78f54 (ecmascript) Imports: allUpgraders. 2017-08-07 18:45:10 +03:00
Jesse Rosenberger
7c2fc97a5a (ecmascript) Imports: release.current => releaseCurrent. 2017-08-07 18:45:09 +03:00
Jesse Rosenberger
ac7b2399d2 (ecmascript) Imports: PackageMap class. 2017-08-07 18:45:08 +03:00
Jesse Rosenberger
cd9d2cf924 (ecmascript) Imports: isopackets.load. 2017-08-07 18:45:07 +03:00
Jesse Rosenberger
d70cdece80 (ecmascript) Imports: DEFAULT_TRACK catalog constant. 2017-08-07 18:45:06 +03:00
Jesse Rosenberger
c7826b9f64 (ecmascript) Imports: FinishedUpgraders class. 2017-08-07 18:45:06 +03:00
Jesse Rosenberger
4b3954ccf0 (ecmascript) Imports: IsopackCache class. 2017-08-07 18:45:05 +03:00
Jesse Rosenberger
4e3e4ffa00 (ecmascript) Imports: httpHelpers.getUrlWithResuming. 2017-08-07 18:45:04 +03:00