Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Provide script(s) for running tests on a developer's local machine #547

Closed
chalin opened this issue Feb 11, 2014 · 11 comments
Closed

Provide script(s) for running tests on a developer's local machine #547

chalin opened this issue Feb 11, 2014 · 11 comments

Comments

@chalin
Copy link
Contributor

chalin commented Feb 11, 2014

run-test.sh doesn't work (#322) and a replacement is needed.

@bgourlie
Copy link
Contributor

run-test.sh does work, I've been running it locally on a linux vm. There are some hoops to jump through, but it is possible.

@chalin
Copy link
Contributor Author

chalin commented Feb 11, 2014

Would you mind sharing your recipe (hoop jumping course details :)?

On Tue, Feb 11, 2014 at 3:18 PM, W. Brian Gourlie
[email protected]:

run-test.sh does work, I've been running it locally on a linux vm. There
are some hoops to jump through, but it is possible.

Reply to this email directly or view it on GitHubhttps://github.com//issues/547#issuecomment-34808119
.

Patrice [image: View my LinkedIn
Profile.]http://www.linkedin.com/in/patricechalin
[image: Google+ Profile.] https://plus.google.com/+PatriceChalin

@bgourlie
Copy link
Contributor

This is off the top of my head, but here goes. My host machine machine is Windows 8.1 x64 and I'm using hyper-v for virtualization.

  • Install linux, either via VM or natively (I'm using Mint, but anything ubuntu based should work for these instructions).
  • Download dart editor from http://www.dartlang.org, extract to a convenient location.
  • Download node.js linux binaries from http://nodejs.org/download/ and extract to a convenient location.
  • open /etc/environment as a superuser and add both the nodejs bin directory and the dart-sdk bin directory to PATH. Add a new environment variable, CHROME_CANARY_BIN, that points to the dartium binary. Here, for example, is how my /etc/environment file looks:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/brian/Apps/nodejs/bin:/home/brian/Apps/dart/dart-sdk/bin"

CHROME_CANARY_BIN="/home/brian/Apps/dart/chromium/chrome"
  • Apply a dartium specific fix found here. From the command line, run: sudo ln -s /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0

I believe that's everything. Keep in mind you will have to run pub install before running run-test.sh, otherwise the tests will fail.

@mhevery mhevery added this to the Community PRs Welcomed milestone Feb 12, 2014
@chalin
Copy link
Contributor Author

chalin commented Feb 14, 2014

Thanks. I'll see if any of this can apply to my situation soon. (I might
just have to give up development under Mac OS X and work under Linux :).

On Tue, Feb 11, 2014 at 4:09 PM, W. Brian Gourlie
[email protected]:

This is off the top of my head, but here goes. My host machine machine is
Windows 8.1 x64 and I'm using hyper-v for virtualization.

Install linux, either via VM or natively (I'm using Mint, but anything
ubuntu based should work for these instructions).

Download dart editor from http://www.dartlang.org, extract to a
convenient location.

Download node.js linux binaries from http://nodejs.org/download/ and
extract to a convenient location.

open /etc/environment as a superuser and add both the nodejs bindirectory and the dart-sdk
bin directory to PATH. Add a new environment variable,
CHROME_CANARY_BIN, that points to the dartium binary. Here, for
example, is how my /etc/environment file looks:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/brian/Apps/nodejs/bin:/home/brian/Apps/dart/dart-sdk/bin"

CHROME_CANARY_BIN="/home/brian/Apps/dart/chromium/chrome"

  • Apply a dartium specific fix found herehttps://code.google.com/p/dart/issues/detail?id=12325.
    From the command line, run: sudo ln -s
    /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0

I believe that's everything. Keep in mind you will have to run pub installbefore running
run-test.sh, otherwise the tests will fail.

Reply to this email directly or view it on GitHubhttps://github.com//issues/547#issuecomment-34814237
.

Patrice [image: View my LinkedIn
Profile.]http://www.linkedin.com/in/patricechalin
[image: Google+ Profile.] https://plus.google.com/+PatriceChalin

@bgourlie
Copy link
Contributor

It's not working under OS X? I've actually been considering buying a MacBook just because I'm doing an increasing amount of work on projects that demand a POSIX environment. I'd assumed OS X would be the easiest to get started on with this.

@bgourlie
Copy link
Contributor

I'm now unable to run tests locally. This is what I'm seeing:

INFO [karma]: Karma v0.10.9 server started at http://localhost:8765/
INFO [launcher]: Starting browser ChromeCanary
INFO [launcher]: Starting browser Chrome
INFO [generate-parser]: Generating parser for parser test: /home/brian/Desktop/angular.dart/test/core/parser/generated_functions.dart
INFO [generate-parser]: Generating parser for parser test: /home/brian/Desktop/angular.dart/test/core/parser/generated_getter_setter.dart
WARN [launcher]: ChromeCanary have not captured in 5000 ms, killing.
WARN [launcher]: Chrome have not captured in 5000 ms, killing.
INFO [launcher]: Trying to start Chrome again.
INFO [launcher]: Trying to start ChromeCanary again.
WARN [launcher]: Chrome have not captured in 5000 ms, killing.
INFO [launcher]: Trying to start Chrome again.
WARN [launcher]: ChromeCanary have not captured in 5000 ms, killing.
WARN [launcher]: Chrome have not captured in 5000 ms, killing.
INFO [launcher]: Trying to start ChromeCanary again.

@chalin
Copy link
Contributor Author

chalin commented Feb 16, 2014

I don't want to claim that it isn't working under Mac OS X. I just cannot
get it to work on my machine. I think I am making some progress in finding
out why but it make take a few more days before I can confirm that.

On Fri, Feb 14, 2014 at 9:22 AM, W. Brian Gourlie
[email protected]:

It's not working under OS X? I've actually been considering buying a
MacBook just because I'm doing an increasing amount of work on projects
that demand a POSIX environment. I'd assumed OS X would be the easiest to
get started on with this.

Reply to this email directly or view it on GitHubhttps://github.com//issues/547#issuecomment-35092614
.

Patrice [image: View my LinkedIn
Profile.]http://www.linkedin.com/in/patricechalin
[image: Google+ Profile.] https://plus.google.com/+PatriceChalin

@chalin
Copy link
Contributor Author

chalin commented Feb 16, 2014

But from the output you give it seems like karma isn't able to communicate
with Dartium nor Chromium.

On Sat, Feb 15, 2014 at 10:30 PM, W. Brian Gourlie <[email protected]

wrote:

I'm now unable to run tests locally. This is what I'm seeing:

INFO [karma]: Karma v0.10.9 server started at http://localhost:8765/
INFO [launcher]: Starting browser ChromeCanary
INFO [launcher]: Starting browser Chrome
INFO [generate-parser]: Generating parser for parser test: /home/brian/Desktop/angular.dart/test/core/parser/generated_functions.dart
INFO [generate-parser]: Generating parser for parser test: /home/brian/Desktop/angular.dart/test/core/parser/generated_getter_setter.dart
WARN [launcher]: ChromeCanary have not captured in 5000 ms, killing.
WARN [launcher]: Chrome have not captured in 5000 ms, killing.
INFO [launcher]: Trying to start Chrome again.
INFO [launcher]: Trying to start ChromeCanary again.
WARN [launcher]: Chrome have not captured in 5000 ms, killing.
INFO [launcher]: Trying to start Chrome again.
WARN [launcher]: ChromeCanary have not captured in 5000 ms, killing.
WARN [launcher]: Chrome have not captured in 5000 ms, killing.
INFO [launcher]: Trying to start ChromeCanary again.

Reply to this email directly or view it on GitHubhttps://github.com//issues/547#issuecomment-35177159
.

Patrice [image: View my LinkedIn
Profile.]http://www.linkedin.com/in/patricechalin
[image: Google+ Profile.] https://plus.google.com/+PatriceChalin

@mhevery
Copy link
Contributor

mhevery commented Mar 7, 2014

Is this issue resolved? can it be closed?

@chalin
Copy link
Contributor Author

chalin commented Mar 18, 2014

Update: I finally have tests running both under Dartium and Chrome. Unfortunately, I don't know what fixed it. Maybe it is just another intermittent problem like with the random number generation. Anyhow, I'll be able to finalize my edits to the scripts now. Will be done this week.

@chalin
Copy link
Contributor Author

chalin commented Mar 20, 2014

To be addressed by #482.

@chalin chalin closed this as completed Mar 20, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants