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

Create folders recursively for custom output{Dir|File} #48

Closed
seanzx85 opened this issue Jul 21, 2015 · 10 comments · Fixed by #49
Closed

Create folders recursively for custom output{Dir|File} #48

seanzx85 opened this issue Jul 21, 2015 · 10 comments · Fixed by #49

Comments

@seanzx85
Copy link

If i have the output file defined it caused ENOENT errors because it can't create the folder for the file name.

In this case I have the following:

        junitReporter: {
            outputDir: 'test/client/results/junit',
            outputFile: 'test-results.xml',
            suite: ''
        },

I receive the following error

21 07 2015 10:33:44.303:WARN [reporter.junit]: Cannot write JUnit xml
    ENOENT, open '/Users/XXXX/Code/XXX/XXX/test/client/results/junit/PhantomJS_1.9.8_(Mac_OS_X_0.0.0)/test-results.xml'

If I make the folder to match the name above, it works. However, these change quite regularly, so this should be handled by the reporter. I think it just needs to make the directory first before attempting file creation.

@dignifiedquire dignifiedquire changed the title outputFile ENOENT Error Create folders recursively for custom output{Dir|File} Jul 21, 2015
@killercentury
Copy link
Contributor

Found the same issue

@lukasz-karolewski
Copy link

+1
same here

@dignifiedquire
Copy link
Member

@kether667 can you confirm that #49 fixes the issue?

@lukasz-karolewski
Copy link

just tested, i confirm that #49 fixes #48

@dignifiedquire
Copy link
Member

Should be fixed in 0.3.3

@merlosy
Copy link

merlosy commented Aug 25, 2015

Hi all,

It seems I still have the issue:

PhantomJS 1.9.8 (Linux 0.0.0): Executed 21 of 23 (skipped 2) SUCCESS (0.047 secs / 0.099 secs)
�[33m25 08 2015 11:33:46.243:WARN [reporter.junit]: �[39mCannot write JUnit xml
    ENOENT, open '/test/results/PhantomJS_1.9.8_(Linux_0.0.0)/test-results-jenkins.xml'

I'm using:

  • node v0.12.7
  • grunt-cli v0.1.13
  • grunt v0.4.5
  • bower v1.4.1
  • karma-junit-reporter v0.3.3

Regarding my karma definition:

junitReporter: {
      outputDir: '/test/results/',
      outputFile: 'test-results-jenkins.xml'
},

I'm trying to build it with Jenkins.. If I have a look in my jenkins workspace, the 'result' folder is not created. Do I have to sudo the build process?

Any other ideas?

@watchwithmike
Copy link

Similar to @merlosy I'm still seeing this problem in 0.3.6

PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 250 of 250 SUCCESS (7.251 secs / 0.693 secs)
30 09 2015 21:01:52.134:WARN [reporter.junit]: Cannot write JUnit xml
    ENOENT, open '/Users/mike/git/project-name/build/test/PhantomJS_1.9.8_(Mac_OS_X_0.0.0)/test-results.xml'

When I role back to 0.2.2 and just use the outputFile parameter I get the expected results.

@adriaanthomas
Copy link
Contributor

The ENOENT error looks like #67. The problem is that the browser-specific directory was not created.

@watchwithmike
Copy link

@adriaanthomas Thank you, I agree that looks like the same problem. I'll await the next release.

@dignifiedquire
Copy link
Member

Release was cut this morning

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

Successfully merging a pull request may close this issue.

7 participants