Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2501 - Make temporary logfile location platform independent. #2502

Merged
merged 2 commits into from
Jun 18, 2018

Conversation

miketaylr
Copy link
Member

This uses /webcompat.com/tmp/, which is a location that is already gitignore'd.
@miketaylr miketaylr requested a review from karlcow June 18, 2018 19:08
@TravisBuddy
Copy link

TravisBuddy commented Jun 18, 2018

Travis tests have failed

Hey @miketaylr,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

npm run test:js -- --reporters="runner" --firefoxBinary=`which firefox`
> webcompat@ test:js /home/travis/build/webcompat/webcompat.com
> node ./tests/functional/_intern.js "--reporters=runner" "--firefoxBinary=/home/travis/firefox-58.0/firefox/firefox"

Error: 
        ======================================================
        Oops, something went wrong. Try restarting the server.
        Open another terminal and window type:
        npm run start:test
        or
        python run.py -t
        ======================================================
        
  at ClientRequest.<anonymous>  <tests/functional/lib/setup.js:55:9>
  at emitOne  <events.js:116:13>
  at ClientRequest.emit  <events.js:211:7>
  at Socket.socketErrorListener  <_http_client.js:387:9>
  at emitOne  <events.js:116:13>
  at Socket.emit  <events.js:211:7>
  at emitErrorNT  <internal/streams/destroy.js:64:8>
something bad happened inside intern.run()
{ Error: 
        ======================================================
        Oops, something went wrong. Try restarting the server.
        Open another terminal and window type:
        npm run start:test
        or
        python run.py -t
        ======================================================
        
    at ClientRequest.<anonymous> (/home/travis/build/webcompat/webcompat.com/tests/functional/lib/setup.js:55:9)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at Socket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9) reported: true }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webcompat@ test:js: `node ./tests/functional/_intern.js "--reporters=runner" "--firefoxBinary=/home/travis/firefox-58.0/firefox/firefox"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the webcompat@ test:js script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-06-18T20_52_39_501Z-debug.log

Copy link
Member

@karlcow karlcow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 Thanks @miketaylr to have made it easier for Windows developers. And to make it more accessible for everyone.

I have one concern only. The log is prone to destruction if we reinstall the project from zero. Maybe not an issue. :)

r+

tempfile.tempdir = os.path.join(os.getcwd(), 'tmp')
print('Writing logs to: {}'.format(tempfile.gettempdir()))

LOG_FILE = os.path.join(tempfile.gettempdir(), 'webcompat.log')

This comment was marked as abuse.

```bash
> python run.py
Statuses Initialization…
Writing logs to: /Users/acooluser/projects/webcompat.com/tmp

This comment was marked as abuse.

@karlcow
Copy link
Member

karlcow commented Jun 18, 2018

test failing with travis, but I suspect this is the project initialization.
Let me restart the build.

@miketaylr
Copy link
Member Author

miketaylr commented Jun 18, 2018

test failing with travis, but I suspect this is the project initialization.

Oh crud... next time that happens, please don't restart -- I want to see if any of our extra logging turned anything up. :)

edit: nice, it failed again:

The command "nosetests" exited with 0.
0.97s$ npm run test:js -- --reporters="runner" --firefoxBinary=`which firefox`
> webcompat@ test:js /home/travis/build/webcompat/webcompat.com
> node ./tests/functional/_intern.js "--reporters=runner" "--firefoxBinary=/home/travis/firefox-58.0/firefox/firefox"
Error: 
        ======================================================
        Oops, something went wrong. Try restarting the server.
        Open another terminal and window type:
        npm run start:test
        or
        python run.py -t
        ======================================================
        
  at ClientRequest.<anonymous>  <tests/functional/lib/setup.js:55:9>
  at emitOne  <events.js:116:13>
  at ClientRequest.emit  <events.js:211:7>
  at Socket.socketErrorListener  <_http_client.js:387:9>
  at emitOne  <events.js:116:13>
  at Socket.emit  <events.js:211:7>
  at emitErrorNT  <internal/streams/destroy.js:64:8>
something bad happened inside intern.run()
{ Error: 
        ======================================================
        Oops, something went wrong. Try restarting the server.
        Open another terminal and window type:
        npm run start:test
        or
        python run.py -t
        ======================================================
        
    at ClientRequest.<anonymous> (/home/travis/build/webcompat/webcompat.com/tests/functional/lib/setup.js:55:9)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at Socket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9) reported: true }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webcompat@ test:js: `node ./tests/functional/_intern.js "--reporters=runner" "--firefoxBinary=/home/travis/firefox-58.0/firefox/firefox"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the webcompat@ test:js script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-06-18T20_43_11_179Z-debug.log
The command "npm run test:js -- --reporters="runner" --firefoxBinary=`which firefox`" exited with 1.
cache.2
store build cache
0.00s
2.56snothing changed, not updating cache
Done. Your build exited with 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants