Giter VIP home page Giter VIP logo

atom-cargo-test-runner's People

Contributors

ferkulat avatar johncolanduoni avatar nguyenchr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

atom-cargo-test-runner's Issues

out-of-box failure to run tests

  • cargo new adder

  • cd adder/

  • edit src/lib.rs to contain:

    #[test]
    fn it_works() {
        assert!(false);
    }
    
  • cargo test

    Running target/debug/adder-3bcca25e15a281b5
    
    running 1 test
    test it_works ... FAILED
    
  • Packages menu > cargo-test-runner > run tests

    Cargo binary:   /usr/local/bin/cargo
    Root folder:    /Users/me/src/adder
    Test file:      lib.rs
    PATH:           /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
         Running target/debug/adder-3bcca25e15a281b5
    
    running 0 tests
    
    test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
    
       Doc-tests adder
    
    running 0 tests
    
    test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
    

The cargo path is right, as is the root folder, but you're not picking up the tests.

Versions:

  • cargo-test-runner: 0.0.4
  • Atom: 0.207.0
  • cargo: 0.2.0
  • rustc: 1.0.0

Uncaught TypeError: editor.getPath is not a function

[Enter steps to reproduce:]

  1. Execute the 'cargo-test-runner:run' command with no files open in Atom.

Atom: 1.29.0 x64
Electron: 2.0.5
OS: Mac OS X 10.13.6
Thrown From: cargo-test-runner package 0.1.0

Stack Trace

Uncaught TypeError: editor.getPath is not a function

At /Users/kevin/.atom/packages/cargo-test-runner/lib/context.coffee:6

TypeError: editor.getPath is not a function
    at Object.exports.find (/packages/cargo-test-runner/lib/context.coffee:6:32)
    at Object.run (/packages/cargo-test-runner/lib/cargo-test-runner.coffee:57:30)
    at /packages/cargo-test-runner/lib/cargo-test-runner.coffee:38:89)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:384:49)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:110:40)

Commands

  9x -0:32.8.0 core:close (input.hidden-input)
  5x -0:27 cargo-test-runner:run (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-solarized-light-syntax.theme-atom-light-ui)

Non-Core Packages

atom-ide-ui 0.13.0 
autocomplete 0.47.0 
busy-signal 1.4.3 
cargo-test-runner 0.1.0 
ide-rust 0.18.0 
intentions 1.1.5 
language-rust 0.4.12 
linter 2.2.0 
linter-ui-default 1.7.1 

Tests in the "tests" folder don't run

The tests in src/lib.rs run just fine, but if I open a file in my tests folder like tests/test_something.rs and try to run it, I just get "0 passed, 0 failed, 0 ignored, 0 measured".

Compiler error when test is run

Output with all debug options enabled.

Cargo binary:   /usr/local/bin/cargo
Root folder:    /home/alex/git/matasano-crypto/src
Test file:      fixed_xor.rs
       Fresh unsafe-any v0.2.2
       Fresh rustc-serialize v0.2.15
       Fresh matches v0.1.2
       Fresh gcc v0.2.1
       Fresh pkg-config v0.2.2
       Fresh gcc v0.1.7
       Fresh libc v0.1.2
       Fresh log v0.2.4
       Fresh rustc-serialize v0.3.0
       Fresh unicase v0.0.5
       Fresh url v0.2.21
       Fresh mime v0.0.8
       Fresh openssl-sys v0.4.3
       Fresh time v0.1.17
       Fresh openssl v0.4.3
       Fresh cookie v0.1.12
       Fresh hyper v0.2.0
   Compiling matasano v0.0.1 (file:///home/alex/git/matasano-crypto)
     Running `rustc lib.rs --crate-name matasano --crate-type lib -g --test -C metadata=6b887a824b8552d7 -C extra-filename=-6b887a824b8552d7 --out-dir /home/alex/git/matasano-crypto/target --emit=dep-info,link -L dependency=/home/alex/git/matasano-crypto/target -L dependency=/home/alex/git/matasano-crypto/target/deps --extern hyper=/home/alex/git/matasano-crypto/target/deps/libhyper-ab3f9d88ab41aa5e.rlib -L native=/usr/lib -L native=/home/alex/git/matesano-crypto/target/build/openssl-sys-26edf94d95ec3590/out -L native=/home/alex/git/matesano-crypto/target/build/time-3fdd29c1b6f5cc42/out`
     Running `rustc lib.rs --crate-name matasano --crate-type lib -g -C metadata=a04da09eb629d9b2 -C extra-filename=-a04da09eb629d9b2 --out-dir /home/alex/git/matasano-crypto/target --emit=dep-info,link -L dependency=/home/alex/git/matasano-crypto/target -L dependency=/home/alex/git/matasano-crypto/target/deps --extern hyper=/home/alex/git/matasano-crypto/target/deps/libhyper-ab3f9d88ab41aa5e.rlib -L native=/usr/lib -L native=/home/alex/git/matesano-crypto/target/build/openssl-sys-26edf94d95ec3590/out -L native=/home/alex/git/matesano-crypto/target/build/time-3fdd29c1b6f5cc42/out`
error: could not exec the linker `cc`: no such file or directory
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
error: could not exec `ar`: no such file or directory
error: aborting due to previous error
Could not compile `matasano`.

Caused by:
  Process didn't exit successfully: `rustc lib.rs --crate-name matasano --crate-type lib -g --test -C metadata=6b887a824b8552d7 -C extra-filename=-6b887a824b8552d7 --out-dir /home/alex/git/matasano-crypto/target --emit=dep-info,link -L dependency=/home/alex/git/matasano-crypto/target -L dependency=/home/alex/git/matasano-crypto/target/deps --extern hyper=/home/alex/git/matasano-crypto/target/deps/libhyper-ab3f9d88ab41aa5e.rlib -L native=/usr/lib -L native=/home/alex/git/matesano-crypto/target/build/openssl-sys-26edf94d95ec3590/out -L native=/home/alex/git/matesano-crypto/target/build/time-3fdd29c1b6f5cc42/out` (status=101)

In the terminal:

$ which cc
/usr/bin/cc
$ which ar
/usr/bin/ar

Don't use absolute path for cargo

Since the dawn of time Unix supported searching for binary in $PATH. Please just use cargo as the default value for cargoBinaryPath. Linux distros provide /usr/bin/cargo anyway, so defaulting to /usr/local/bin is really inconvenient.

Thanks!

Uncaught TypeError: undefined is not a function

[Enter steps to reproduce below:]

  1. dummy-project with one file 'main.rs'
fn main() {
    println!("Hello, world!");
}
  1. cargo-test-runner > run cargo tests
  2. results in compilation warning
   Compiling hello_world v0.0.1 (file:///home/colin/projects/rust/hello_world)
main.rs:1:1: 3:2 warning: function is never used: `main`, #[warn(dead_code)] on by default
main.rs:1 fn main() {
main.rs:2     println!("Hello, world!");
main.rs:3 }
     Running /home/colin/projects/rust/hello_world/target/debug/hello_world-f3cf2073485ef18a

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
  1. clock on 'main.rs:1:1' (which is clickable) results in an uncaught error

Atom Version: 1.0.0
System: Ubuntu 15.04
Thrown From: cargo-test-runner package, v0.0.4

Stack Trace

Uncaught TypeError: undefined is not a function

At /home/colin/.atom/packages/cargo-test-runner/lib/clickable-paths.coffee:30

TypeError: undefined is not a function
    at Object.module.exports.open (/home/colin/.atom/packages/cargo-test-runner/lib/clickable-paths.coffee:41:58)
    at HTMLAnchorElement.module.exports.clicked (/home/colin/.atom/packages/cargo-test-runner/lib/clickable-paths.coffee:28:27)
    at HTMLAnchorElement.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLAnchorElement.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

  2x -1:13.9.0 core:move-left (atom-text-editor.editor.is-focused)
     -1:13.3.0 editor:newline (atom-text-editor.editor.is-focused)
     -1:12.6.0 core:move-up (atom-text-editor.editor.is-focused)
     -1:09.7.0 cargo-test-runner:run (atom-text-editor.editor.is-focused)
     -1:07.7.0 core:save (atom-text-editor.editor.is-focused)
     -1:07.0 cargo-test-runner:run (atom-text-editor.editor.is-focused)
  3x -0:45.5.0 core:delete (atom-text-editor.editor.is-focused)
  2x -0:44 core:save (atom-text-editor.editor.is-focused)
     -0:41 cargo-test-runner:run (atom-text-editor.editor.is-focused)
     -0:31.4.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
     -0:30.8.0 editor:newline (atom-text-editor.editor.is-focused)
  3x -0:29.6.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:28 core:backspace (atom-text-editor.editor.is-focused)
     -0:16.9.0 core:delete (atom-text-editor.editor.is-focused)
     -0:11.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:06.9.0 cargo-test-runner:run (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "one-light-syntax"
    ],
    "disabledPackages": [
      "vim-mode",
      "linter"
    ],
    "autoHideMenuBar": true
  }
}

Installed Packages

# User
build, v0.38.0
cargo-test-runner, v0.0.4
keyboard-localization, v1.4.3
language-rust, v0.4.3
linter-rust, v0.1.0
minimap, v4.10.0
racer, v0.15.2
rust-api-docs-helper, v0.5.1

# Dev
No dev packages

Uncaught Error: spawn EACCES

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.3.2
System: Ubuntu 15.04
Thrown From: cargo-test-runner package, v0.0.4

Stack Trace

Uncaught Error: spawn EACCES

At internal/child_process.js:298

Error: spawn EACCES
    at exports._errnoException (util.js:837:11)
    at ChildProcess.spawn (internal/child_process.js:298:11)
    at exports.spawn (child_process.js:351:9)
    at CargoWrapper.module.exports.CargoWrapper.run (/home/lv9/.atom/packages/cargo-test-runner/lib/cargo.coffee:39:14)
    at Object.module.exports.execute (/home/lv9/.atom/packages/cargo-test-runner/lib/cargo-test-runner.coffee:90:11)
    at Object.module.exports.run (/home/lv9/.atom/packages/cargo-test-runner/lib/cargo-test-runner.coffee:58:6)
    at atom-workspace.subscriptions.add.atom.commands.add.cargo-test-runner:run (/home/lv9/.atom/packages/cargo-test-runner/lib/cargo-test-runner.coffee:38:89)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/usr/share/atom/resources/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/usr/share/atom/resources/app.asar/src/atom-environment.js:1010:28)
    at emitOne (events.js:77:13)
    at EventEmitter.emit (events.js:169:7)

Commands

     -0:00.5.0 cargo-test-runner:run (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "terminal-panel"
    ]
  },
  "cargo-test-runner": {
    "cargoBinaryPath": "/opt/sdks/rust-1.5.0-x86_64-unknown-linux-gnu/cargo/bin"
  }
}

Installed Packages

# User
build, v0.51.0
build-cargo, v0.10.0
cargo-test-runner, v0.0.4
eclipse-keybindings, v0.8.0
language-rust, v0.4.5
linter-rust, v0.3.0
racer, v0.17.2

# Dev
No dev packages

Uncaught TypeError: _ref1.getPath is not a function

[Enter steps to reproduce below:]

  1. Run a test. It happens on all of them.

Atom Version: 1.1.0
System: Linux Mint
Thrown From: cargo-test-runner package, v0.0.4

Stack Trace

Uncaught TypeError: _ref1.getPath is not a function

At /home/jnordwick/.atom/packages/cargo-test-runner/lib/clickable-paths.coffee:30

TypeError: _ref1.getPath is not a function
  at Object.module.exports.open (/home/jnordwick/.atom/packages/cargo-test-runner/lib/clickable-paths.coffee:30:31)
  at HTMLAnchorElement.module.exports.clicked (/home/jnordwick/.atom/packages/cargo-test-runner/lib/clickable-paths.coffee:20:18)
  at HTMLAnchorElement.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
  at HTMLAnchorElement.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -3:32.2.0 core:save (atom-text-editor.editor.is-focused)
     -3:22.9.0 core:move-left (atom-text-editor.editor.is-focused)
     -2:35.8.0 core:undo (atom-text-editor.editor.is-focused)
     -2:34.4.0 core:move-right (atom-text-editor.editor.is-focused)
  2x -2:33.9.0 core:backspace (atom-text-editor.editor.is-focused)
     -2:28.3.0 core:save (atom-text-editor.editor.is-focused)
  4x -2:22.8.0 core:backspace (atom-text-editor.editor.is-focused)
  3x -2:13.9.0 core:save (atom-text-editor.editor.is-focused)
 10x -1:49.2.0 core:undo (atom-text-editor.editor.is-focused)
  3x -1:40 core:move-left (atom-text-editor.editor.is-focused)
  3x -1:39.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:17.5.0 core:save (atom-text-editor.editor.is-focused)
  3x -1:14 core:undo (atom-text-editor.editor.is-focused)
 10x -1:11.6.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
     -1:02.0 core:save (atom-text-editor.editor.is-focused)
     -0:29.3.0 cargo-test-runner:run (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "packagesWithKeymapsDisabled": []
  }
}

Installed Packages

# User
build-cargo, v0.6.0
cargo-test-runner, v0.0.4
language-rust, v0.4.5
racer, v0.17.2
rust-api-docs-helper, v0.5.1

# Dev
No dev packages

Output cut off

I can't read the output of the tests runner because the display where it appears can't be scrolled or resized, so a lot of output gets cut off.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.