8000 Search node_modules in parent directories until the root is reached by jazzzz · Pull Request #991 · casperjs/casperjs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 19, 2020. It is now read-only.

Search node_modules in parent directories until the root is reached #991

Merged
merged 2 commits into from
Aug 1, 2014

Conversation

jazzzz
Copy link
Contributor
@jazzzz jazzzz commented Jul 31, 2014

This fixes #956.

@n1k0
Copy link
Member
n1k0 commented Jul 31, 2014

I suspect we don't really want to search up to the fs root, for security reason.

Also, could you please ensure that builds are green? Thanks.

@jazzzz
Copy link
Contributor Author
jazzzz commented Jul 31, 2014

I suspect we don't really want to search up to the fs root, for security reason.

That's what node.js does: http://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders

I'm trying to understand why the test fails on Travis...

@jazzzz
Copy link
Contributor Author
jazzzz commented Jul 31, 2014

I fixed the test.

@n1k0
Copy link
Member
n1k0 commented Jul 31, 2014

Nice, thanks. Do you think you could write a test? Typically one in https://github.com/n1k0/casperjs/blob/master/tests/clitests/runtests.py

That would help preventing further regressions.

@jazzzz
Copy link
Contributor Author
jazzzz commented Aug 1, 2014

I'll try to write a test.

@jazzzz
Copy link
Contributor Author
jazzzz commented Aug 1, 2014

I'm currently on Windows, and it seems the tests do not work on this platform, is it a known issue?

@n1k0
Copy link
Member
n1k0 commented Aug 1, 2014

Hmm I don't have a windows box at hand, but last time I did tests were running just fine. What errors do you get?

@jazzzz
Copy link
Contributor Author
jazzzz commented Aug 1, 2014

Many failures trying to use SIGALRM like that:

======================================================================
ERROR: test_help (__main__.BasicCommandsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/clitests/runtests.py", line 31, in f2
    old_handler = signal.signal(signal.SIGALRM, timeout_handler)
AttributeError: 'module' object has no attribute 'SIGALRM'

then these errors:

======================================================================
ERROR: test_xunit_report_failing (__main__.XUnitReportTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/clitests/runtests.py", line 436, in test_xunit_report_failing
    self.runCommand(command, failing=True)
  File "tests/clitests/runtests.py", line 54, in runCommand
    return subprocess.check_output(cmd_args).strip().decode('utf-8')
  File "c:\Python27\lib\subprocess.py", line 568, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "c:\Python27\lib\subprocess.py", line 711, in __init__
    errread, errwrite)
  File "c:\Python27\lib\subprocess.py", line 948, in _execute_child
    startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application

======================================================================
ERROR: test_xunit_report_passing (__main__.XUnitReportTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/clitests/runtests.py", line 430, in test_xunit_report_passing
    self.runCommand(command, failing=False)
  File "tests/clitests/runtests.py", line 54, in runCommand
    return subprocess.check_output(cmd_args).strip().decode('utf-8')
  File "c:\Python27\lib\subprocess.py", line 568, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "c:\Python27\lib\subprocess.py", line 711, in __init__
    errread, errwrite)
  File "c:\Python27\lib\subprocess.py", line 948, in _execute_child
    startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application

----------------------------------------------------------------------

@n1k0
Copy link
Member
n1k0 commented Aug 1, 2014

Sounds like Python/Windows things, a land where I'm kinda clueless :(

Poking @hexid and @laurentj here in case they have ideas.

@jazzzz
Copy link
Contributor Author
jazzzz commented Aug 1, 2014

I'm trying to setup a Linux VM to run the tests.

@n1k0
Copy link
Member
n1k0 commented Aug 1, 2014

Thanks a bunch, I truly appreciate. In the meanwhile, I filed issue #996 to track broken tests on Windows.

@jazzzz
Copy link
Contributor Author
jazzzz commented Aug 1, 2014

I implemented one test.

@n1k0
Copy link
Member
n1k0 commented Aug 1, 2014

This is good, thanks a lot! :)

n1k0 added a commit that referenced this pull request Aug 1, 2014
Search node_modules in parent directories until the root is reached
@n1k0 n1k0 merged commit 572224b into casperjs:master Aug 1, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0